mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-04 12:15:02 -04:00
[hls] Enable --hls-use-mpegts
by default when downloading live-streams
* Also added option `--no-hls-use-mpegts` to disable this Related: #96
This commit is contained in:
@@ -398,7 +398,10 @@ class FFmpegFD(ExternalFD):
|
||||
args += ['-fs', compat_str(self._TEST_FILE_SIZE)]
|
||||
|
||||
if protocol in ('m3u8', 'm3u8_native'):
|
||||
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
|
||||
use_mpegts = (tmpfilename == '-') or self.params.get('hls_use_mpegts')
|
||||
if use_mpegts is None:
|
||||
use_mpegts = info_dict.get('is_live')
|
||||
if use_mpegts:
|
||||
args += ['-f', 'mpegts']
|
||||
else:
|
||||
args += ['-f', 'mp4']
|
||||
|
Reference in New Issue
Block a user