0c9668f779
Move ffmpeg functions to @shared
17 lines
399 B
TypeScript
17 lines
399 B
TypeScript
import { EncoderOptions } from '@shared/models'
|
|
|
|
export type StreamType = 'audio' | 'video'
|
|
|
|
export function buildStreamSuffix (base: string, streamNum?: number) {
|
|
if (streamNum !== undefined) {
|
|
return `${base}:${streamNum}`
|
|
}
|
|
|
|
return base
|
|
}
|
|
|
|
export function getScaleFilter (options: EncoderOptions): string {
|
|
if (options.scaleFilter) return options.scaleFilter.name
|
|
|
|
return 'scale'
|
|
}
|