Skip to content

Commit

Permalink
Fix regressions in handling VP9.2 video streams after 8f76bef
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Oct 29, 2024
1 parent 26ddea3 commit 9bd9163
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions resources/lib/youtube_plugin/youtube/helper/stream_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ def _process_stream_data(self, stream_data, default_lang_code='und'):
codec = 'dts'
if codec not in isa_capabilities:
continue
preferred_codec = codec in stream_features
preferred_codec = codec.split('.')[0] in stream_features
media_type, container = mime_type.split('/')
bitrate = stream.get('bitrate', 0)

Expand Down Expand Up @@ -1911,8 +1911,11 @@ def _process_stream_data(self, stream_data, default_lang_code='und'):
if fps > 30 and not allow_hfr:
continue

hdr = ('colorInfo' in stream
or 'HDR' in stream.get('qualityLabel', ''))
if 'colorInfo' in stream:
hdr = not any(value.endswith('BT709')
for value in stream['colorInfo'].values())
else:
hdr = 'HDR' in stream.get('qualityLabel', '')
if hdr and not allow_hdr:
continue

Expand Down

0 comments on commit 9bd9163

Please sign in to comment.