[FFmpeg-user] Dropping audio streams confuses vlc?

hcoin hcoin at quietfountain.com
Tue Apr 2 05:32:27 CEST 2013


On 4/1/2013 12:42 PM, Andrey Aleksandrovich wrote:
> 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.
>>
>>
>>
>>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Well, some more detail and an interesting development.

As I wrote, both vlc and mplayer play the whole original thing perfectly 
allowing any audio stream to be chosen.  In my world that means 'no file 
corruption'.    Project-x completed and managed to produce audio and 
video files that left out a huge chunk of the middle of the file.  But, 
the 'demux' idea worked with ffmpeg.   It split the whole file into a 
video only mpg, and one ac3 stream. Both the broken out files played 
perfectly.

Here's the interesting bit.  When I gave this command:

ffmpeg -i video.mpg -i audio.ac3 -acodec copy -vcodec copy whole_show.mpg

The result was identical to my initial failed runs:  No audio produced 
by the combined result, and vlc shows 56 audio streams.

So, either I've missed something obvious, or ffmpeg can't handle muxing 
together an mpeg2 file and an ac3 audio stream.

Or?





-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4261 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130401/926dab92/attachment.p7s>


More information about the ffmpeg-user mailing list