aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-transcoding.ts
diff options
context:
space:
mode:
authorFelix Ableitner <me@nutomic.com>2019-05-13 13:02:42 +0200
committerFelix Ableitner <me@nutomic.com>2019-05-13 13:02:42 +0200
commit658a47ab6812586537c3db8a5a003e287c47beb7 (patch)
tree699d836080b86dc0f6a6c06f4571e2e059cdb15b /server/lib/video-transcoding.ts
parent7ed2c1a46fd11caca16d5aec80d9f90d7a2d3429 (diff)
downloadPeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.tar.gz
PeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.tar.zst
PeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.zip
Added comments for transcode functions
Diffstat (limited to 'server/lib/video-transcoding.ts')
-rw-r--r--server/lib/video-transcoding.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts
index 81aa7a4c4..8e906a1eb 100644
--- a/server/lib/video-transcoding.ts
+++ b/server/lib/video-transcoding.ts
@@ -11,6 +11,9 @@ import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-pla
11import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' 11import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
12import { CONFIG } from '../initializers/config' 12import { CONFIG } from '../initializers/config'
13 13
14/**
15 * Optimize the original video file and replace it. The resolution is not changed.
16 */
14async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFileModel) { 17async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFileModel) {
15 const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR 18 const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR
16 const newExtname = '.mp4' 19 const newExtname = '.mp4'
@@ -55,6 +58,9 @@ async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFi
55 } 58 }
56} 59}
57 60
61/**
62 * Transcode the original video file to a lower resolution.
63 */
58async function transcodeOriginalVideofile (video: VideoModel, resolution: VideoResolution, isPortrait: boolean) { 64async function transcodeOriginalVideofile (video: VideoModel, resolution: VideoResolution, isPortrait: boolean) {
59 const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR 65 const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR
60 const extname = '.mp4' 66 const extname = '.mp4'