LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 11:45 PM   #1
ranban282
LQ Newbie
 
Registered: Jul 2006
Location: Hyderabad
Distribution: Fedora 8
Posts: 28

Rep: Reputation: 1
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, 09:42 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,105

Rep: Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720Reputation: 2720
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, 08:48 PM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:46 AM
Normalizing AVI Audio in Transcode juanbobo Linux - Software 2 10-18-2007 12:19 AM
AVI File - Audio not Synced Snump Linux - Software 1 03-23-2006 10:35 AM
MPlayer unable to find appropriate audio codec for avi file hbbtstar Linux - Software 1 05-23-2005 05:51 PM
AVI Audio to MP3 File Obi Perrin Linux - Software 2 03-10-2003 11:27 AM


All times are GMT -5. The time now is 02:49 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration