[FFmpeg-user] Right audio channel shifted
Celal Yasar Sahinoz
yasar.sahinoz at hotmail.com
Tue Oct 14 14:07:54 CEST 2014
Just joined the mailing list.
Looking for a video player in a browser, that will play:
mp4 video codec, aac audio codec, and floor audio, en, fr, ger, tr translations.
Each audio channel will be selected in the browser in most platforms.
I have managed to:
ffmpeg -i 00.mp4 -i 01.mp4 -i 02.mp4 -i 03.mp4 -map 0:0 -map 0:1 -map 1:0 -map 2:0 -map 3:0 -acodec copy -vcodec copy output.mp4
where output.mp4 is the video file with 4 audio stream muxed together. Now how can i play it in a browser.
Celal Yasar Sahinoz
> Date: Tue, 14 Oct 2014 13:59:41 +0200
> From: barsnick at gmx.net
> To: ffmpeg-user at ffmpeg.org
> Subject: Re: [FFmpeg-user] Right audio channel shifted
> 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 kb/s
> > Stream #0:1: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
> 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]" test_new.mxf
> (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?)
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user