[FFmpeg-user] Right audio channel shifted
doenerbudenchef at yahoo.de
Tue Oct 14 15:35:07 CEST 2014
Moritz Barsnick wrote
> Hi Alex,
>> I guess there is somehing wrong with the channel mapping, but without the
>> fliter_complex the mapping seems to be okay.
> I think the filter_complex messes up the mapping. Note this mapping
> from your output:
>> Stream mapping:
>> Stream #0:2 (pcm_s24le) -> atrim
>> atrim -> Stream #0:0 (pcm_s24le)
>> Stream #0:0 -> #0:1 (copy)
> and this result:
>> Output #0, mxf, to 'test_new.mxf':
>> Stream #0:0: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152
>> Stream #0:1: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR
> and this warning:
>> [mxf @ 00000000003b69c0] there must be exactly one video stream and it
>> must be the first one
> I'm sure that's your issue. The filter seems to be messing up the
> mapping, at least in this automatic case.
> Instead of
>> C:\>ffmpeg -i test.mxf -vcodec copy -map 0:v -acodec pcm_s24le -map 0:1
>> -map 0:2 -filter_complex "[a:1]atrim=start=0.035" test_new.mxf
> you probably need something like
> ffmpeg -i test.mxf -vcodec copy -map 0:v -acodec pcm_s24le -map 0:1
> -filter_complex "[a:1]atrim=start=0.035[ashifted]" -map "[ashifted]"
> (Untested) Note that I'm trying to explicitly map the filter output to
> a particular stream, avoiding automatic mapping. You may have to play
> around a bit more with the map options.
> Is this a bug, BTW? Documentation on "-map" states:
>> The first -map option on the command line specifies the source for
>> output stream 0, the second -map option specifies the source for
>> output stream 1, etc.
> Digging further, documentation of "-filter_complex" clarifies:
>> Output link labels are referred to with ‘-map’. Unlabeled outputs
>> are added to the first output file.
> So the first documentation section is somewhat unclear, as it is
> "disturbed" by the second behavior. (And in the second section: "first
> output file" -> "first output stream", right?)
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:
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
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Right-audio-channel-shifted-tp4667730p4667768.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user