Edit .avi file remove one of the sound streams

Questions involving a Windows version of FFmpeg.
Post Reply
Posts: 1
Joined: Fri May 31, 2019 4:12 pm

Edit .avi file remove one of the sound streams

Post by ipokrov » Fri May 31, 2019 4:33 pm

Hello everyone!

Question from total newbie!

I have a bunch of avi files that I downloaded and they have 2 sound tracks - russian and english. I need to remove the russian steam, someone recommended ffmpeg with these instructions "Use ffmpeg with "-acodec copy" and "-vcodec copy" options and specify which audio stream you would like to keep."

I muddled around and kinda figured out the syntax
ffmpeg -i in.avi out.avi -acodec copy -vcodec copy

I did not specify the audio stream to keep and the russian was gone :D ! but the input was 1.4 GB and output was about 260MB

I read-up more and used switch -qscale 0

ffmpeg -i in.avi -qscale 0 out.avi -acodec copy -vcodec copy

but output file now 2.6GB ( russian is still gone )

This is the input video information that I get when I run "ffmpeg -i in.avi"

Input #0, avi, from 'in.avi':
encoder : VirtualDubMod (build 2540/release)
Duration: 01:05:52.12, start: 0.000000, bitrate: 2974 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x544 [SAR 1:1 DAR 45:34], 2384 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/s

Can someone help me with command line parameters that I need to use to keep the same quality video/size? and if you can tell me how to specify which audio steam to keep that would be awesome!

Thank you

Posts: 184
Joined: Mon Feb 24, 2014 1:46 pm

Re: Edit .avi file remove one of the sound streams

Post by pandy » Mon Jun 03, 2019 9:33 pm

You need to use map to explicitly select desired audio track.
Use this as guidelines https://trac.ffmpeg.org/wiki/Map

Post Reply