aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/ffmpeg/src/ffmpeg-utils.ts
blob: 56fd8c0b3b9bfaffdd2c6147a36bac567d08bc4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { EncoderOptions } from '@peertube/peertube-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'
}