LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Removing dual audio from an avi file. (http://www.linuxquestions.org/questions/linux-software-2/removing-dual-audio-from-an-avi-file-761730/)

ranban282 10-13-2009 10:45 PM

Removing dual audio from an avi file.
 
Hello,
I have a dual audio avi file. The first channel is Italian and the second channel is English. Is there any way I can remove the Italian Audio using mencoder/ffmpeg? Are there any other good open source tools for doing this kind of stuff?
Thanks

TB0ne 10-14-2009 08:42 AM

Quote:

Originally Posted by ranban282 (Post 3718367)
Hello,
I have a dual audio avi file. The first channel is Italian and the second channel is English. Is there any way I can remove the Italian Audio using mencoder/ffmpeg? Are there any other good open source tools for doing this kind of stuff?
Thanks

Mencoder can do it, you just have to select the audio you want. Check out the "-alang" and "-aid" flags on the man page. Personally, I've had better luck with the -aid flag.

To see which audio tracks are available:
Code:

mplayer -vo null -ao null -frames 0 -v filename | grep aid
That should barf back a list of what audio tracks are there. After that, you can pick one for mencoder to use.

Shadow_7 10-14-2009 07:48 PM

do you need the space, or do you just want to avoid confusion? -alang en for mplayer should select the right track.

Beyond that ffmpeg can extract audio only and video only and rejoin them without re-encoding. -acodec copy -aid # / -vcodec copy. ffprobe / mediainfo / ffmpeg -i and other ways to tell what is what.

ffmpeg -an -i video.format -vcodec copy -y video_only.format
ffmpeg -vn -i video.format -aid 1 -acodec copy -y audio_only.format
ffmpeg -i video_only.format -i audio_only.format -acodec copy -vcodec copy -y fixed_video.format

Perhaps there's a simpler way or an ffmepg way to do that in a one liner. But I like ffmpeg for it's memorable command line options. mencoder can be downright cryptic at times.


All times are GMT -5. The time now is 10:43 PM.