aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-transcoding.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-11 10:54:05 +0200
committerChocobozzz <me@florianbigard.com>2021-05-11 11:32:31 +0200
commit1bcb03a100d172903b877d6a0e4ed11d63b14f3d (patch)
tree704cf506d2099bbcc0f1db39e95c981ecc21548f /server/lib/video-transcoding.ts
parentac2a5b54271e3c3090f863754350907ec916bac2 (diff)
downloadPeerTube-1bcb03a100d172903b877d6a0e4ed11d63b14f3d.tar.gz
PeerTube-1bcb03a100d172903b877d6a0e4ed11d63b14f3d.tar.zst
PeerTube-1bcb03a100d172903b877d6a0e4ed11d63b14f3d.zip
Use a class for youtube-dl
Diffstat (limited to 'server/lib/video-transcoding.ts')
-rw-r--r--server/lib/video-transcoding.ts13
1 files changed, 1 insertions, 12 deletions
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts
index c949dca2e..51949f51a 100644
--- a/server/lib/video-transcoding.ts
+++ b/server/lib/video-transcoding.ts
@@ -215,16 +215,6 @@ function generateHlsPlaylistResolution (options: {
215 }) 215 })
216} 216}
217 217
218function getEnabledResolutions (type: 'vod' | 'live') {
219 const transcoding = type === 'vod'
220 ? CONFIG.TRANSCODING
221 : CONFIG.LIVE.TRANSCODING
222
223 return Object.keys(transcoding.RESOLUTIONS)
224 .filter(key => transcoding.ENABLED && transcoding.RESOLUTIONS[key] === true)
225 .map(r => parseInt(r, 10))
226}
227
228// --------------------------------------------------------------------------- 218// ---------------------------------------------------------------------------
229 219
230export { 220export {
@@ -232,8 +222,7 @@ export {
232 generateHlsPlaylistResolutionFromTS, 222 generateHlsPlaylistResolutionFromTS,
233 optimizeOriginalVideofile, 223 optimizeOriginalVideofile,
234 transcodeNewWebTorrentResolution, 224 transcodeNewWebTorrentResolution,
235 mergeAudioVideofile, 225 mergeAudioVideofile
236 getEnabledResolutions
237} 226}
238 227
239// --------------------------------------------------------------------------- 228// ---------------------------------------------------------------------------