mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
stricter youtubedl format selectors (#3516)
* stricter youtubedl format selectors make sure selectors avoid av1, and otherwise match as closely to the maximum resolution enabled for transcoding * add support for merge formats in youtubedl * avoid vp9.2 in youtubedl to avoid any HDR * move getEnabledResolutions, safer replace of imported extension * add test for youtube-dl selectors
This commit is contained in:
parent
d43c6b1ffc
commit
454c20fa7c
15 changed files with 196 additions and 61 deletions
|
@ -201,6 +201,16 @@ function generateHlsPlaylist (options: {
|
|||
})
|
||||
}
|
||||
|
||||
function getEnabledResolutions (type: 'vod' | 'live') {
|
||||
const transcoding = type === 'vod'
|
||||
? CONFIG.TRANSCODING
|
||||
: CONFIG.LIVE.TRANSCODING
|
||||
|
||||
return Object.keys(transcoding.RESOLUTIONS)
|
||||
.filter(key => transcoding.ENABLED && transcoding.RESOLUTIONS[key] === true)
|
||||
.map(r => parseInt(r, 10))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
|
@ -208,7 +218,8 @@ export {
|
|||
generateHlsPlaylistFromTS,
|
||||
optimizeOriginalVideofile,
|
||||
transcodeNewResolution,
|
||||
mergeAudioVideofile
|
||||
mergeAudioVideofile,
|
||||
getEnabledResolutions
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue