mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 22:17:07 +01:00
[downloader/external:ffmpeg] minimize the use of aac_adtstoasc filter
This commit is contained in:
parent
020c5df52d
commit
8bdc149441
@ -17,6 +17,7 @@
|
|||||||
encodeArgument,
|
encodeArgument,
|
||||||
handle_youtubedl_headers,
|
handle_youtubedl_headers,
|
||||||
check_executable,
|
check_executable,
|
||||||
|
is_outdated_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -264,7 +265,9 @@ def _call_downloader(self, tmpfilename, info_dict):
|
|||||||
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
|
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
|
||||||
args += ['-f', 'mpegts']
|
args += ['-f', 'mpegts']
|
||||||
else:
|
else:
|
||||||
args += ['-f', 'mp4', '-bsf:a', 'aac_adtstoasc']
|
args += ['-f', 'mp4']
|
||||||
|
if (ffpp.basename == 'ffmpeg' and is_outdated_version(ffpp._versions['ffmpeg'], '3.2')) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
|
||||||
|
args += ['-bsf:a', 'aac_adtstoasc']
|
||||||
elif protocol == 'rtmp':
|
elif protocol == 'rtmp':
|
||||||
args += ['-f', 'flv']
|
args += ['-f', 'flv']
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user