[FFmpeg-user] Right audio channel shifted

Moritz Barsnick barsnick at gmx.net
Tue Oct 14 16:21:11 CEST 2014


On Tue, Oct 14, 2014 at 06:35:07 -0700, Alex wrote:
> thanks for your help, works great! The mapping thing is still a bit
> confusing to me. :)

:-)

> One last problem: I would like to set the sample format of the second stream
> back to s32. I tried the follwoing, but it won't work:

In this case, since you didn't include the output, I was quite lost. I
use "-loglevel debug" to inspect the filter chain, by the way.

> ffmpeg -i test.mxf -vcodec copy -map 0:v -map 0:1 -sample_fmt s32 -c:a:0
> copy -c:a:1 pcm_s24le -sample_fmt:a:1 s32 -filter_complex
> "[a:1]atrim=start=0.035[ashifted]" -map "[ashifted]"  test_new.mxf 

Using one artificial audio source, I was able to experiment a bit.

It appears that it's only the default output of pcm_s16le that is
incorrectly selected for you, your choice of -c:a pcm_s24le is fine,
and atrim seems to handle s32 fine.

In other words: "-c:a:0 copy -c:a:1 pcm_s24le" should work fine in your
case, you can omit "-sample_fmt:a:1 s32". Furthermore, I was able to
make "-c:a:1 pcm_s24le -sample_fmt:a:1 s32" work. Perhaps your first
"-sample_fmt s32" is incorrect (apart from being unneeded). I can't
even tell what it applies to.

As I said: No output messages, no idea. :-)

Moritz


More information about the ffmpeg-user mailing list