aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLesmiscore <nao20010128@gmail.com>2022-12-19 11:36:14 +0900
committerGitHub <noreply@github.com>2022-12-19 11:36:14 +0900
commit5424dbaf91728aaf77458e68d993ba6c34e8e222 (patch)
tree93f9169d0af3447c0e559212c980444b649ef852
parentc73355510629e3eda5a79d4e2876a35316ca6ed2 (diff)
downloadhypervideo-pre-5424dbaf91728aaf77458e68d993ba6c34e8e222.tar.lz
hypervideo-pre-5424dbaf91728aaf77458e68d993ba6c34e8e222.tar.xz
hypervideo-pre-5424dbaf91728aaf77458e68d993ba6c34e8e222.zip
Deprioritize HEVC-over-FLV formats (#5823)
Authored by: Lesmiscore
-rw-r--r--yt_dlp/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 9697ba1c1..65408bf19 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -6307,6 +6307,12 @@ class FormatSorter:
# if format.get('preference') is None and format.get('ext') in ('f4f', 'f4m'): # Not supported?
# format['preference'] = -1000
+ if format.get('preference') is None and format.get('ext') == 'flv' and re.match('[hx]265|he?vc?', format.get('vcodec') or ''):
+ # HEVC-over-FLV is out-of-spec by FLV's original spec
+ # ref. https://trac.ffmpeg.org/ticket/6389
+ # ref. https://github.com/yt-dlp/yt-dlp/pull/5821
+ format['preference'] = -100
+
# Determine missing bitrates
if format.get('tbr') is None:
if format.get('vbr') is not None and format.get('abr') is not None: