Skip to content

Commit

Permalink
[FFmpegFixupM3u8PP] Check audio codec before fixup (yt-dlp#6778)
Browse files Browse the repository at this point in the history
Closes yt-dlp#6673
Authored by: bashonly
  • Loading branch information
bashonly authored Apr 13, 2023
1 parent 9259369 commit 3f7e2bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yt_dlp/postprocessor/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,11 @@ def _needs_fixup(self, info):
@PostProcessor._restrict_to(images=False)
def run(self, info):
if all(self._needs_fixup(info)):
args = ['-f', 'mp4']
if self.get_audio_codec(info['filepath']) == 'aac':
args.extend(['-bsf:a', 'aac_adtstoasc'])
self._fixup('Fixing MPEG-TS in MP4 container', info['filepath'], [
*self.stream_copy_opts(), '-f', 'mp4', '-bsf:a', 'aac_adtstoasc'])
*self.stream_copy_opts(), *args])
return [], info


Expand Down

0 comments on commit 3f7e2bd

Please sign in to comment.