[FFmpeg-user] Can I use ffmpeg to combine audio streams in .ts file?

skyscanner at gmx.ca skyscanner at gmx.ca
Tue Sep 30 18:35:53 CEST 2014

On Tue, 30 Sep 2014 16:13:20 +0200, barsnick at gmx.net wrote:
> See my other response from a few minutes ago:
> Something like
> pan=5.1:FL=c0+c4:FR=c1+c5:BL=c4:BR=c5:FC=c7
> or whatever you think is correct. You may have to throw in some factors
> such as "0.5*". :-)

Following up on that, this seems to be the answer:

ffmpeg -i "original program.ts" -c:v copy -filter_complex '[0:1][0:2][0:3][0:4]amerge=inputs=4,pan=5.1:FL=c0:FR=c1:FC=c2:BL=c4:BR=c5:LFE=c3' -c:a mp2 test.ts

I figured out that the right channel of track 2 appears to be the low frequency audio. This actually doesn't map anything from stream 4 but it winds up sounding like true 5.1 and more importantly there is no audio distortion!

> That's likely either a bug in ffmpeg or one of the libraries. There are
> instructions around to report that correctly. You will need to rebuild
> latest ffmpeg from git, as this is too old (the issue may have been
> resolved):

That's WAY beyond my ability, especially in OS X. And I think your way is better!

Thank you, it might have taken me months to figure this out without your help!

More information about the ffmpeg-user mailing list