diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-01-15 15:56:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 15:56:56 +0100 |
commit | 454c20fa7cdb05eba7f1be3c83389b54807af0b3 (patch) | |
tree | e9b364da69eaf88f0470414c506c3b5631984c60 /server/controllers/static.ts | |
parent | d43c6b1ffc5e6c895f9e9f9de6625f17a9755c20 (diff) | |
download | PeerTube-454c20fa7cdb05eba7f1be3c83389b54807af0b3.tar.gz PeerTube-454c20fa7cdb05eba7f1be3c83389b54807af0b3.tar.zst PeerTube-454c20fa7cdb05eba7f1be3c83389b54807af0b3.zip |
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
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index bdb9c3041..a7b28704c 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -19,13 +19,14 @@ import { VideoCommentModel } from '../models/video/video-comment' | |||
19 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo' | 19 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo' |
20 | import { join } from 'path' | 20 | import { join } from 'path' |
21 | import { root } from '../helpers/core-utils' | 21 | import { root } from '../helpers/core-utils' |
22 | import { getEnabledResolutions } from '../lib/video-transcoding' | ||
22 | import { CONFIG, isEmailEnabled } from '../initializers/config' | 23 | import { CONFIG, isEmailEnabled } from '../initializers/config' |
23 | import { getPreview, getVideoCaption } from './lazy-static' | 24 | import { getPreview, getVideoCaption } from './lazy-static' |
24 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' | 25 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' |
25 | import { MVideoFile, MVideoFullLight } from '@server/types/models' | 26 | import { MVideoFile, MVideoFullLight } from '@server/types/models' |
26 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' | 27 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' |
27 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' | 28 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' |
28 | import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' | 29 | import { getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' |
29 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | 30 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' |
30 | import { serveIndexHTML } from '@server/lib/client-html' | 31 | import { serveIndexHTML } from '@server/lib/client-html' |
31 | 32 | ||