aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video-transcoding.ts')
-rw-r--r--server/lib/video-transcoding.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts
index c62b3c1ce..e267b1397 100644
--- a/server/lib/video-transcoding.ts
+++ b/server/lib/video-transcoding.ts
@@ -1,5 +1,9 @@
1import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants' 1import { copyFile, ensureDir, move, remove, stat } from 'fs-extra'
2import { basename, extname as extnameUtil, join } from 'path' 2import { basename, extname as extnameUtil, join } from 'path'
3import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
4import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models'
5import { VideoResolution } from '../../shared/models/videos'
6import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
3import { 7import {
4 canDoQuickTranscode, 8 canDoQuickTranscode,
5 getDurationFromVideoFile, 9 getDurationFromVideoFile,
@@ -9,18 +13,13 @@ import {
9 TranscodeOptions, 13 TranscodeOptions,
10 TranscodeOptionsType 14 TranscodeOptionsType
11} from '../helpers/ffmpeg-utils' 15} from '../helpers/ffmpeg-utils'
12import { copyFile, ensureDir, move, remove, stat } from 'fs-extra'
13import { logger } from '../helpers/logger' 16import { logger } from '../helpers/logger'
14import { VideoResolution } from '../../shared/models/videos' 17import { CONFIG } from '../initializers/config'
18import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants'
15import { VideoFileModel } from '../models/video/video-file' 19import { VideoFileModel } from '../models/video/video-file'
16import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls'
17import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' 20import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
18import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' 21import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls'
19import { CONFIG } from '../initializers/config'
20import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models'
21import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
22import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' 22import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths'
23import { spawn } from 'child_process'
24 23
25/** 24/**
26 * Optimize the original video file and replace it. The resolution is not changed. 25 * Optimize the original video file and replace it. The resolution is not changed.