1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-30 22:25:19 +00:00

Infer acodec for single-codec containers

This commit is contained in:
pukkandan
2024-03-31 22:12:27 +05:30
parent 50c2935231
commit 86a972033e
2 changed files with 5 additions and 2 deletions

View File

@@ -2813,6 +2813,9 @@ class YoutubeDL:
format['url'] = sanitize_url(format['url'])
if format.get('ext') is None:
format['ext'] = determine_ext(format['url']).lower()
if format['ext'] in ('aac', 'opus', 'mp3', 'flac', 'vorbis'):
if format.get('acodec') is None:
format['acodec'] = format['ext']
if format.get('protocol') is None:
format['protocol'] = determine_protocol(format)
if format.get('resolution') is None: