aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/transcoding
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/lib/transcoding
parentb46cf4b920984492df598c1b61179acfc7f6f22e (diff)
downloadPeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz
PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst
PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip
Add ability to run transcoding jobs
Diffstat (limited to 'server/lib/transcoding')
-rw-r--r--server/lib/transcoding/video-transcoding.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/transcoding/video-transcoding.ts b/server/lib/transcoding/video-transcoding.ts
index 250a678eb..d0db05216 100644
--- a/server/lib/transcoding/video-transcoding.ts
+++ b/server/lib/transcoding/video-transcoding.ts
@@ -35,7 +35,7 @@ function optimizeOriginalVideofile (video: MVideoFullLight, inputVideoFile: MVid
35 const transcodeDirectory = CONFIG.STORAGE.TMP_DIR 35 const transcodeDirectory = CONFIG.STORAGE.TMP_DIR
36 const newExtname = '.mp4' 36 const newExtname = '.mp4'
37 37
38 return VideoPathManager.Instance.makeAvailableVideoFile(video, inputVideoFile, async videoInputPath => { 38 return VideoPathManager.Instance.makeAvailableVideoFile(inputVideoFile.withVideoOrPlaylist(video), async videoInputPath => {
39 const videoTranscodedPath = join(transcodeDirectory, video.id + '-transcoded' + newExtname) 39 const videoTranscodedPath = join(transcodeDirectory, video.id + '-transcoded' + newExtname)
40 40
41 const transcodeType: TranscodeOptionsType = await canDoQuickTranscode(videoInputPath) 41 const transcodeType: TranscodeOptionsType = await canDoQuickTranscode(videoInputPath)
@@ -81,7 +81,7 @@ function transcodeNewWebTorrentResolution (video: MVideoFullLight, resolution: V
81 const transcodeDirectory = CONFIG.STORAGE.TMP_DIR 81 const transcodeDirectory = CONFIG.STORAGE.TMP_DIR
82 const extname = '.mp4' 82 const extname = '.mp4'
83 83
84 return VideoPathManager.Instance.makeAvailableVideoFile(video, video.getMaxQualityFile(), async videoInputPath => { 84 return VideoPathManager.Instance.makeAvailableVideoFile(video.getMaxQualityFile().withVideoOrPlaylist(video), async videoInputPath => {
85 const newVideoFile = new VideoFileModel({ 85 const newVideoFile = new VideoFileModel({
86 resolution, 86 resolution,
87 extname, 87 extname,
@@ -134,7 +134,7 @@ function mergeAudioVideofile (video: MVideoFullLight, resolution: VideoResolutio
134 134
135 const inputVideoFile = video.getMinQualityFile() 135 const inputVideoFile = video.getMinQualityFile()
136 136
137 return VideoPathManager.Instance.makeAvailableVideoFile(video, inputVideoFile, async audioInputPath => { 137 return VideoPathManager.Instance.makeAvailableVideoFile(inputVideoFile.withVideoOrPlaylist(video), async audioInputPath => {
138 const videoTranscodedPath = join(transcodeDirectory, video.id + '-transcoded' + newExtname) 138 const videoTranscodedPath = join(transcodeDirectory, video.id + '-transcoded' + newExtname)
139 139
140 // If the user updates the video preview during transcoding 140 // If the user updates the video preview during transcoding