Fix failure to detect vp9.2 and mp4v.20.3 codecs

This commit is contained in:
Jesus E 2023-05-28 20:47:47 -04:00
parent 9890617098
commit 7b60751e99
No known key found for this signature in database
GPG Key ID: 159C8F8BC9AED8B6

View File

@ -388,14 +388,13 @@ def _extract_watch_info_desktop(top_level):
return info return info
def update_format_with_codec_info(fmt, codec): def update_format_with_codec_info(fmt, codec):
if (codec.startswith('av') if any(codec.startswith(c) for c in ('av', 'vp', 'h263', 'h264', 'mp4v')):
or codec in ('vp9', 'vp8', 'vp8.0', 'h263', 'h264', 'mp4v')):
if codec == 'vp8.0': if codec == 'vp8.0':
codec = 'vp8' codec = 'vp8'
conservative_update(fmt, 'vcodec', codec) conservative_update(fmt, 'vcodec', codec)
elif (codec.startswith('mp4a') elif (codec.startswith('mp4a')
or codec in ('opus', 'mp3', 'aac', 'dtse', 'ec-3', 'vorbis')): or codec in ('opus', 'mp3', 'aac', 'dtse', 'ec-3', 'vorbis',
conservative_update(fmt, 'acodec', codec) 'ac-3')):
else: else:
print('Warning: unrecognized codec: ' + codec) print('Warning: unrecognized codec: ' + codec)