mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-25 04:40:09 +09:00
add to extract libavformat build version
This commit is contained in:
parent
7b0a9430da
commit
9aa66caa5b
@ -321,7 +321,7 @@ class FFmpegFD(ExternalFD):
|
|||||||
args += ['-f', 'mpegts']
|
args += ['-f', 'mpegts']
|
||||||
else:
|
else:
|
||||||
args += ['-f', 'mp4']
|
args += ['-f', 'mp4']
|
||||||
if (ffpp.basename == 'ffmpeg' and is_outdated_version(ffpp._lavf_version, '57.56.100', False)) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
|
if (ffpp.basename == 'ffmpeg' and is_outdated_version(ffpp._lavf_version.get('runtime'), '57.56.100', False)) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
|
||||||
args += ['-bsf:a', 'aac_adtstoasc']
|
args += ['-bsf:a', 'aac_adtstoasc']
|
||||||
elif protocol == 'rtmp':
|
elif protocol == 'rtmp':
|
||||||
args += ['-f', 'flv']
|
args += ['-f', 'flv']
|
||||||
|
@ -81,11 +81,14 @@ class FFmpegPostProcessor(PostProcessor):
|
|||||||
# get ffmpeg and libavformat runtime versions
|
# get ffmpeg and libavformat runtime versions
|
||||||
vers = get_exe_version(
|
vers = get_exe_version(
|
||||||
path, args=['-version'],
|
path, args=['-version'],
|
||||||
version_re=r'(?s)version\s+([-0-9._a-zA-Z]+)(?:.*?libavformat.*?/\s+([0-9. ]+))?')
|
version_re=r'(?s)version\s+([-0-9._a-zA-Z]+)(?:.*?libavformat\s+([0-9. ]+)\s+/\s+([0-9. ]+))?')
|
||||||
if isinstance(vers, (list, tuple)):
|
if isinstance(vers, (list, tuple)):
|
||||||
ver = vers[0]
|
ver = vers[0]
|
||||||
if len(vers) > 1 and vers[1]:
|
if len(vers) > 2 and vers[1] and vers[2]:
|
||||||
self._lavf_version = vers[1].replace(' ', '')
|
self._lavf_version = {
|
||||||
|
'build': vers[1].replace(' ', ''),
|
||||||
|
'runtime': vers[2].replace(' ', '')
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
ver = vers
|
ver = vers
|
||||||
else:
|
else:
|
||||||
@ -107,7 +110,7 @@ class FFmpegPostProcessor(PostProcessor):
|
|||||||
|
|
||||||
self._paths = None
|
self._paths = None
|
||||||
self._versions = None
|
self._versions = None
|
||||||
self._lavf_version = None
|
self._lavf_version = {}
|
||||||
if self._downloader:
|
if self._downloader:
|
||||||
prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', True)
|
prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', True)
|
||||||
location = self._downloader.params.get('ffmpeg_location')
|
location = self._downloader.params.get('ffmpeg_location')
|
||||||
|
Loading…
Reference in New Issue
Block a user