1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00:00

[ffmpeg] Detect libavformat version for aac_adtstoasc

and print available features in verbose head
Based on https://github.com/ytdl-org/youtube-dl/pull/29581
This commit is contained in:
pukkandan
2021-11-04 03:10:49 +05:30
parent 832e9000c7
commit 8913ef74d7
3 changed files with 15 additions and 4 deletions

View File

@ -21,7 +21,6 @@ from ..utils import (
encodeArgument,
handle_youtubedl_headers,
check_executable,
is_outdated_version,
Popen,
sanitize_open,
)
@ -459,7 +458,7 @@ class FFmpegFD(ExternalFD):
args += ['-f', 'mpegts']
else:
args += ['-f', 'mp4']
if (ffpp.basename == 'ffmpeg' and is_outdated_version(ffpp._versions['ffmpeg'], '3.2', False)) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
if (ffpp.basename == 'ffmpeg' and ffpp._features.get('needs_adtstoasc')) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
args += ['-bsf:a', 'aac_adtstoasc']
elif protocol == 'rtmp':
args += ['-f', 'flv']