[ffmpeg] fix adding metadata when using --hls-prefer-native(#8350)
authorremitamine <remitamine@gmail.com>
Tue, 2 Feb 2016 21:14:23 +0000 (22:14 +0100)
committerremitamine <remitamine@gmail.com>
Tue, 2 Feb 2016 21:14:23 +0000 (22:14 +0100)
youtube_dl/postprocessor/ffmpeg.py

index d3d9d4f1da13be926b05714f04f801ce0f664613..e293e03e681b431a13ac3681e0e7b256c2e3be98 100644 (file)
@@ -392,7 +392,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
             options.extend(['-metadata', '%s=%s' % (name, value)])
 
         # https://github.com/rg3/youtube-dl/issues/8350
-        if info['protocol'] == 'm3u8_native':
+        if info['protocol'] == 'm3u8_native' or self._downloader.params.get('hls_prefer_native', False):
             options.extend(['-bsf:a', 'aac_adtstoasc'])
 
         self._downloader.to_screen('[ffmpeg] Adding metadata to \'%s\'' % filename)