aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/ffmpeg/ffmpeg-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/ffmpeg/ffmpeg-utils.ts')
-rw-r--r--shared/ffmpeg/ffmpeg-utils.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/shared/ffmpeg/ffmpeg-utils.ts b/shared/ffmpeg/ffmpeg-utils.ts
new file mode 100644
index 000000000..7d09c32ca
--- /dev/null
+++ b/shared/ffmpeg/ffmpeg-utils.ts
@@ -0,0 +1,17 @@
1import { EncoderOptions } from '@shared/models'
2
3export type StreamType = 'audio' | 'video'
4
5export function buildStreamSuffix (base: string, streamNum?: number) {
6 if (streamNum !== undefined) {
7 return `${base}:${streamNum}`
8 }
9
10 return base
11}
12
13export function getScaleFilter (options: EncoderOptions): string {
14 if (options.scaleFilter) return options.scaleFilter.name
15
16 return 'scale'
17}