X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fvideo-transcoding.ts;h=4fd1d62a9140f0655d976741ebbcdae83d0919ff;hb=32c68d67d9125df62ead71668efca4da30132786;hp=ab5200936595b7ba7b4c41a9a40a7fecb7fbce50;hpb=3a149e9f8b2e99507c72792b80cee3a90df003b2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts index ab5200936..4fd1d62a9 100644 --- a/server/lib/video-transcoding.ts +++ b/server/lib/video-transcoding.ts @@ -105,7 +105,7 @@ async function mergeAudioVideofile (video: MVideoWithAllFiles, resolution: Video const transcodeDirectory = CONFIG.STORAGE.TMP_DIR const newExtname = '.mp4' - const inputVideoFile = video.getMaxQualityFile() + const inputVideoFile = video.getMinQualityFile() const audioInputPath = getVideoFilePath(video, inputVideoFile) const videoTranscodedPath = join(transcodeDirectory, video.id + '-transcoded' + newExtname) @@ -205,10 +205,8 @@ async function generateHlsPlaylist (video: MVideoWithFile, resolution: VideoReso await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile) - const updatedVideoFile = await newVideoFile.save() - + await newVideoFile.save() videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles') as VideoFileModel[] - videoStreamingPlaylist.VideoFiles.push(updatedVideoFile) video.setHLSPlaylist(videoStreamingPlaylist)