From: Felix Ableitner Date: Mon, 13 May 2019 11:02:42 +0000 (+0200) Subject: Added comments for transcode functions X-Git-Tag: v1.4.0-rc.1~239^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=658a47ab6812586537c3db8a5a003e287c47beb7;p=github%2FChocobozzz%2FPeerTube.git Added comments for transcode functions --- 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 import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' import { CONFIG } from '../initializers/config' +/** + * Optimize the original video file and replace it. The resolution is not changed. + */ async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFileModel) { const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR const newExtname = '.mp4' @@ -55,6 +58,9 @@ async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFi } } +/** + * Transcode the original video file to a lower resolution. + */ async function transcodeOriginalVideofile (video: VideoModel, resolution: VideoResolution, isPortrait: boolean) { const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR const extname = '.mp4'