LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-13-2009, 10:45 PM   #1
ranban282
LQ Newbie
 
Registered: Jul 2006
Location: Hyderabad
Distribution: Fedora 8
Posts: 28

Rep: Reputation: 2
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
 
Old 10-14-2009, 08:42 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ranban282 View Post
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.
 
Old 10-14-2009, 07:48 PM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dvd -> avi and audio sync FunkyRes Linux - Software 2 02-15-2008 08:46 AM
Normalizing AVI Audio in Transcode juanbobo Linux - Software 2 10-17-2007 11:19 PM
AVI File - Audio not Synced Snump Linux - Software 1 03-23-2006 09:35 AM
MPlayer unable to find appropriate audio codec for avi file hbbtstar Linux - Software 1 05-23-2005 04:51 PM
AVI Audio to MP3 File Obi Perrin Linux - Software 2 03-10-2003 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration