// Important to do this before getVideoFilename() to take in account the new file extension
inputVideoFile.extname = newExtname
+ inputVideoFile.filename = generateVideoFilename(video, false, inputVideoFile.resolution, newExtname)
const videoOutputPath = getVideoFilePath(video, inputVideoFile)
// ffmpeg generated a new video file, so update the video duration
videoFile.fps = fps
videoFile.metadata = metadata
- await createTorrentAndSetInfoHash(video, video, videoFile)
+ await createTorrentAndSetInfoHash(video, videoFile)
await VideoFileModel.customUpsert(videoFile, 'video', undefined)
video.VideoFiles = await video.$get('VideoFiles')
newVideoFile.fps = await getVideoFileFPS(videoFilePath)
newVideoFile.metadata = await getMetadataFromFile(videoFilePath)
- await createTorrentAndSetInfoHash(videoStreamingPlaylist, video, newVideoFile)
+ await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile)
await VideoFileModel.customUpsert(newVideoFile, 'streaming-playlist', undefined)
videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles')