diff options
author | Felix Ableitner <me@nutomic.com> | 2019-05-13 13:02:42 +0200 |
---|---|---|
committer | Felix Ableitner <me@nutomic.com> | 2019-05-13 13:02:42 +0200 |
commit | 658a47ab6812586537c3db8a5a003e287c47beb7 (patch) | |
tree | 699d836080b86dc0f6a6c06f4571e2e059cdb15b /server/lib | |
parent | 7ed2c1a46fd11caca16d5aec80d9f90d7a2d3429 (diff) | |
download | PeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.tar.gz PeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.tar.zst PeerTube-658a47ab6812586537c3db8a5a003e287c47beb7.zip |
Added comments for transcode functions
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/video-transcoding.ts | 6 |
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 | |||
11 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' | 11 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' |
12 | import { CONFIG } from '../initializers/config' | 12 | import { CONFIG } from '../initializers/config' |
13 | 13 | ||
14 | /** | ||
15 | * Optimize the original video file and replace it. The resolution is not changed. | ||
16 | */ | ||
14 | async function optimizeVideofile (video: VideoModel, inputVideoFileArg?: VideoFileModel) { | 17 | async 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 | */ | ||
58 | async function transcodeOriginalVideofile (video: VideoModel, resolution: VideoResolution, isPortrait: boolean) { | 64 | async 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' |