import { basename, extname as extnameUtil, join } from 'path'
import {
canDoQuickTranscode,
- getMetadataFromFile,
getDurationFromVideoFile,
+ getMetadataFromFile,
getVideoFileFPS,
transcode,
TranscodeOptions,
import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/typings/models'
import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths'
-import { extractVideo } from './videos'
/**
* Optimize the original video file and replace it. The resolution is not changed.
await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile)
- await newVideoFile.save()
+ await VideoFileModel.customUpsert(newVideoFile, 'streaming-playlist', undefined)
videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles')
video.setHLSPlaylist(videoStreamingPlaylist)