mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Support transcoding options/encoders by plugins
This commit is contained in:
parent
529b37527c
commit
1896bca09e
32 changed files with 754 additions and 135 deletions
48
shared/models/videos/video-transcoding.model.ts
Normal file
48
shared/models/videos/video-transcoding.model.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
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
|
||||
|
||||
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[]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue