mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Add ability to run transcoding jobs
This commit is contained in:
parent
b46cf4b920
commit
ad5db1044c
54 changed files with 715 additions and 103 deletions
|
@ -206,7 +206,7 @@ async function getVideoStreamFromFile (path: string, existingProbe?: FfprobeData
|
|||
return metadata.streams.find(s => s.codec_type === 'video') || null
|
||||
}
|
||||
|
||||
function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') {
|
||||
function computeLowerResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') {
|
||||
const configResolutions = type === 'vod'
|
||||
? CONFIG.TRANSCODING.RESOLUTIONS
|
||||
: CONFIG.LIVE.TRANSCODING.RESOLUTIONS
|
||||
|
@ -214,7 +214,7 @@ function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod'
|
|||
const resolutionsEnabled: number[] = []
|
||||
|
||||
// Put in the order we want to proceed jobs
|
||||
const resolutions = [
|
||||
const resolutions: VideoResolution[] = [
|
||||
VideoResolution.H_NOVIDEO,
|
||||
VideoResolution.H_480P,
|
||||
VideoResolution.H_360P,
|
||||
|
@ -327,7 +327,7 @@ export {
|
|||
getVideoFileFPS,
|
||||
ffprobePromise,
|
||||
getClosestFramerateStandard,
|
||||
computeResolutionsToTranscode,
|
||||
computeLowerResolutionsToTranscode,
|
||||
getVideoFileBitrate,
|
||||
canDoQuickTranscode,
|
||||
canDoQuickVideoTranscode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue