Added comments for transcode functions 1785/head
authorFelix Ableitner <me@nutomic.com>
Mon, 13 May 2019 11:02:42 +0000 (13:02 +0200)
committerFelix Ableitner <me@nutomic.com>
Mon, 13 May 2019 11:02:42 +0000 (13:02 +0200)
server/lib/video-transcoding.ts

index 81aa7a4c425c1cad162c8f94927a4d8ffa72db8b..8e906a1eba60df6f755f047bd165f51c6de8c010 100644 (file)
@@ -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'