[FFmpeg-user] Dropping audio streams confuses vlc?

Andrey Aleksandrovich andrey.aleksandrovich at googlemail.com
Mon Apr 1 19:42:02 CEST 2013

Meybe your source mpg is broken. Try to demux it first:
$ projectx file.mpg -demux
(projectx homepage - http://project-x.sourceforge.net/ )
and then to make your target file from 2 appropriate sources.
ffmpeg -i video.file -i audio.file -vcodec copy -acodec copy output.mpg

On 4/1/13, hcoin <hcoin at quietfountain.com> wrote:
> On 4/1/2013 11:45 AM, Andrey Aleksandrovich wrote:
>> On 4/1/13, hcoin <hcoin at quietfountain.com> wrote:
>>> Hi all, thanks for ffmpeg!
>>> I'm struggling to drop two of three audio streams from an mpeg2
>>> audio+video source, and can't puzzle out my mistake.
>>> I've given the following command on a mpeg2 file with one video and
>>> three ac3 audio streams.  The source and all three streams play
>>> perfectly on vlc.   I want the result to be exactly what was input,
>>> except with one audio stream: only the second of the three in the
>>> original.   But, when I give the command the result is a file which when
>>> played in vlc shows around 56 or so audio streams, and otherwise
>>> produces no sound whatever, though the picture is correct.   Am I making
>>> some newbie mistake?
>>> ffmpeg -i sourcevid.mpg -vcodec copy -acodec copy  outvid.mpg -map 0.0
>>> -map 0.2
>>> ffmpeg -i sourcevid.mpg -vcodec copy -acodec copy  outvid.mpg -map 0.0
>>> -map 0.2 -ac 1
>>> Both cases process normally, showing the entire and correct length, then
>>> exiting.  Yet - no sound on playback.
>>> I tried it on freebsd 9.1 release, and I tried it on debian wheezy (0:0
>>> and 0:2 instead of 0.0 and 0.2) --  same result.  What have I
>>> overlooked?
>>> Thanks!
>>> Harry
>> Try this:
>> ffmpeg -i INPUT.file -vcodec copy -acodec copy -map 0:0 -map 0:2
>> OUTPUT.file
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> Thanks for the quick response.   The ffmpeg processing was normal. The
> video was normal.  vlc reports 26 audio streams.  No sound was
> produced.  Same as before, basically, though the number of audio streams
> in the output file (which should be 1) is 26 instead of 50 something on
> my prior run.   Actually I checked it again during the same vlc
> playback, somehow the number of audio streams has grown to 72 now.
> mplayer too produces no sound.  Both vlc and mplayer work normally on
> the source mpg.

More information about the ffmpeg-user mailing list