Merge pull request #9358 from dstftw/hls-native-to-ffmpeg-delegation
[youtube-dl] / youtube_dl / downloader / external.py
index 30277dc205787d226360cfc950e5c08796a5fc03..45f49c350a8a1e790f042c25ad87c4ef5b5a85b5 100644 (file)
@@ -224,8 +224,8 @@ class FFmpegFD(ExternalFD):
                 args += ['-rtmp_live', 'live']
 
         args += ['-i', url, '-c', 'copy']
-        if protocol == 'm3u8':
-            if self.params.get('hls_use_mpegts', False):
+        if protocol in ('m3u8', 'm3u8_native'):
+            if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
                 args += ['-f', 'mpegts']
             else:
                 args += ['-f', 'mp4', '-bsf:a', 'aac_adtstoasc']