mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Merge pull request #9195 from remitamine/ffmpeg-pipe
[downloader/external] enable piping for FFmpegFD(closes #2124)
This commit is contained in:
commit
3014b0ae83
2 changed files with 3 additions and 2 deletions
|
@ -225,7 +225,7 @@ def _call_downloader(self, tmpfilename, info_dict):
|
||||||
|
|
||||||
args += ['-i', url, '-c', 'copy']
|
args += ['-i', url, '-c', 'copy']
|
||||||
if protocol == 'm3u8':
|
if protocol == 'm3u8':
|
||||||
if self.params.get('hls_use_mpegts', False):
|
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', '-bsf:a', 'aac_adtstoasc']
|
||||||
|
|
|
@ -175,7 +175,8 @@ def _ffmpeg_filename_argument(self, fn):
|
||||||
# Always use 'file:' because the filename may contain ':' (ffmpeg
|
# Always use 'file:' because the filename may contain ':' (ffmpeg
|
||||||
# interprets that as a protocol) or can start with '-' (-- is broken in
|
# interprets that as a protocol) or can start with '-' (-- is broken in
|
||||||
# ffmpeg, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details)
|
# ffmpeg, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details)
|
||||||
return 'file:' + fn
|
# Also leave '-' intact in order not to break streaming to stdout.
|
||||||
|
return 'file:' + fn if fn != '-' else fn
|
||||||
|
|
||||||
|
|
||||||
class FFmpegExtractAudioPP(FFmpegPostProcessor):
|
class FFmpegExtractAudioPP(FFmpegPostProcessor):
|
||||||
|
|
Loading…
Reference in a new issue