diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-06 10:57:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 053aed43fb255b4ae4324a845534f2f562c3b6cc (patch) | |
tree | 04cae6af371a1ee869051c67be28acea5581d16d /server/lib/video-transcoding.ts | |
parent | 3bc68dfd6183078fb56b53e24e74f889c85c4ae0 (diff) | |
download | PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.tar.gz PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.tar.zst PeerTube-053aed43fb255b4ae4324a845534f2f562c3b6cc.zip |
Regenerate miniature on live save
Diffstat (limited to 'server/lib/video-transcoding.ts')
-rw-r--r-- | server/lib/video-transcoding.ts | 17 |
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 @@ | |||
1 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants' | 1 | import { copyFile, ensureDir, move, remove, stat } from 'fs-extra' |
2 | import { basename, extname as extnameUtil, join } from 'path' | 2 | import { basename, extname as extnameUtil, join } from 'path' |
3 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | ||
4 | import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models' | ||
5 | import { VideoResolution } from '../../shared/models/videos' | ||
6 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' | ||
3 | import { | 7 | import { |
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' |
12 | import { copyFile, ensureDir, move, remove, stat } from 'fs-extra' | ||
13 | import { logger } from '../helpers/logger' | 16 | import { logger } from '../helpers/logger' |
14 | import { VideoResolution } from '../../shared/models/videos' | 17 | import { CONFIG } from '../initializers/config' |
18 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants' | ||
15 | import { VideoFileModel } from '../models/video/video-file' | 19 | import { VideoFileModel } from '../models/video/video-file' |
16 | import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls' | ||
17 | import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' | 20 | import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' |
18 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' | 21 | import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls' |
19 | import { CONFIG } from '../initializers/config' | ||
20 | import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models' | ||
21 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | ||
22 | import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' | 22 | import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' |
23 | import { 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. |