aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffprobe-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-18 14:35:08 +0100
committerChocobozzz <me@florianbigard.com>2021-11-18 15:20:57 +0100
commitad5db1044c8599eaaaa2a578b350777ae996b068 (patch)
tree3e003cccf021152405d49b21c6c91b703c8ae96c /server/helpers/ffprobe-utils.ts
parentb46cf4b920984492df598c1b61179acfc7f6f22e (diff)
downloadPeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz
PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst
PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip
Add ability to run transcoding jobs
Diffstat (limited to 'server/helpers/ffprobe-utils.ts')
-rw-r--r--server/helpers/ffprobe-utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts
index 907f13651..e15628e2a 100644
--- a/server/helpers/ffprobe-utils.ts
+++ b/server/helpers/ffprobe-utils.ts
@@ -206,7 +206,7 @@ async function getVideoStreamFromFile (path: string, existingProbe?: FfprobeData
206 return metadata.streams.find(s => s.codec_type === 'video') || null 206 return metadata.streams.find(s => s.codec_type === 'video') || null
207} 207}
208 208
209function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') { 209function computeLowerResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') {
210 const configResolutions = type === 'vod' 210 const configResolutions = type === 'vod'
211 ? CONFIG.TRANSCODING.RESOLUTIONS 211 ? CONFIG.TRANSCODING.RESOLUTIONS
212 : CONFIG.LIVE.TRANSCODING.RESOLUTIONS 212 : CONFIG.LIVE.TRANSCODING.RESOLUTIONS
@@ -214,7 +214,7 @@ function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod'
214 const resolutionsEnabled: number[] = [] 214 const resolutionsEnabled: number[] = []
215 215
216 // Put in the order we want to proceed jobs 216 // Put in the order we want to proceed jobs
217 const resolutions = [ 217 const resolutions: VideoResolution[] = [
218 VideoResolution.H_NOVIDEO, 218 VideoResolution.H_NOVIDEO,
219 VideoResolution.H_480P, 219 VideoResolution.H_480P,
220 VideoResolution.H_360P, 220 VideoResolution.H_360P,
@@ -327,7 +327,7 @@ export {
327 getVideoFileFPS, 327 getVideoFileFPS,
328 ffprobePromise, 328 ffprobePromise,
329 getClosestFramerateStandard, 329 getClosestFramerateStandard,
330 computeResolutionsToTranscode, 330 computeLowerResolutionsToTranscode,
331 getVideoFileBitrate, 331 getVideoFileBitrate,
332 canDoQuickTranscode, 332 canDoQuickTranscode,
333 canDoQuickVideoTranscode, 333 canDoQuickVideoTranscode,