aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-transcoding.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-06 10:57:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit053aed43fb255b4ae4324a845534f2f562c3b6cc (patch)
tree04cae6af371a1ee869051c67be28acea5581d16d /server/lib/video-transcoding.ts
parent3bc68dfd6183078fb56b53e24e74f889c85c4ae0 (diff)
downloadPeerTube-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.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.