aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/models/videos/video-transcoding.model.ts
blob: 52b468a965818e6da2166d91b5456ecd57e1bef2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                         
                        

































                                                                
import { VideoResolution } from './video-resolution.enum'

// Types used by plugins and ffmpeg-utils

export type EncoderOptionsBuilder = (params: {
  input: string
  resolution: VideoResolution
  fps?: number
  streamNum?: number
}) => Promise<EncoderOptions> | EncoderOptions

export interface EncoderOptions {
  copy?: boolean // Copy stream? Default to false

  inputOptions: string[]
  outputOptions: string[]
}

// All our encoders

export interface EncoderProfile <T> {
  [ profile: string ]: T

  default: T
}

export type AvailableEncoders = {
  available: {
    live: {
      [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
    }

    vod: {
      [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder>
    }
  }

  encodersToTry: {
    vod: {
      video: string[]
      audio: string[]
    }

    live: {
      video: string[]
      audio: string[]
    }
  }
}