LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-02-2011, 12:30 AM   #1
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511
Blog Entries: 12

Rep: Reputation: Disabled
Question extracting audio from "dual audio" video file ?


i've a video file(.mkv) having two audio tracks in english & german.
I want to extract the english audio.
I tried converting the file to .mp3 using ffmpeg but its output is german audio !
 
Old 08-02-2011, 12:55 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

Have you ever tried using mkvextract? http://linux.die.net/man/1/mkvextract

Cheers,

Josh
 
Old 08-02-2011, 02:03 AM   #3
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511

Original Poster
Blog Entries: 12

Rep: Reputation: Disabled
Question

Quote:
Originally Posted by corp769 View Post
Hello,

Have you ever tried using mkvextract? http://linux.die.net/man/1/mkvextract

Cheers,

Josh
I already read it but didn't really got how to make it work.
Please elaborate !
 
Old 08-02-2011, 07:48 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Ok, here it goes....

Say you have a file called movie5.mkv.... From the command line, run the following:
Code:
mkvinfo movie5.mkv
Typing that on my computer results in the following:
Code:
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 106828593
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 187)
|+ EbmlVoid (size: 4096)
|+ Segment information
| + Segment UID: 0xbb 0x91 0xd8 0x17 0x1b 0x2c 0x4c 0x51 0xca 0x2c 0xd7 0x52 0x06 0x1d 0x33 0x6d
| + Writing application: HandBrake 0.9.4
| + Timecode scale: 1000000
| + Duration: 267.267s (00:04:27.267)
|+ Segment tracks
| + A track
|  + Track number: 1
|  + Track UID: 254519045
|  + Track type: video
|  + Lacing flag: 0
|  + Codec ID: V_MPEG4/ISO/AVC
|  + CodecPrivate, length 44
|  + Default duration: 33.367ms (29.970 fps for a video track)
|  + Default flag: 1
|  + MinCache: 1
|  + Video track
|   + Pixel width: 526
|   + Pixel height: 296
|   + Display width: 526
|   + Display height: 296
| + A track
|  + Track number: 2
|  + Track UID: 1116757863
|  + Track type: audio
|  + Lacing flag: 0
|  + Codec ID: A_AC3
|  + Language: und
|  + Default flag: 1
|  + Audio track
|   + Sampling frequency: 48000
|   + Channels: 2
|+ Cluster
Now, knowing that information, we can see that the audio we want to extract is located on track 2, and it is encoded as AC3. From here, we can now do the following:
Code:
mkvextract tracks movie5.mkv 2:audio_track.ac3
From here, you can convert it using whatever you would like. Hope this helps.

Cheers,

Josh
 
1 members found this post helpful.
Old 08-02-2011, 07:47 PM   #5
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511

Original Poster
Blog Entries: 12

Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by corp769 View Post
Code:
mkvextract tracks movie5.mkv 2:audio_track.ac3
From here, you can convert it using whatever you would like. Hope this helps.

Cheers,

Josh
i got it now !
thanks !!
 
Old 08-02-2011, 07:48 PM   #6
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511

Original Poster
Blog Entries: 12

Rep: Reputation: Disabled
Exclamation

marking thread as solved !
 
Old 08-02-2011, 07:55 PM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
No problem, and cheers!

-Josh
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How i can remove the "eco" present on the audio on some video? AleLinuxBSD Linux - Desktop 4 03-28-2011 01:18 AM
Sound - ASUS K42 laptop "dual audio" plug does nothing jburford Linux - Hardware 2 09-11-2010 11:02 AM
Extracting audio from a video file DesignerX Mandriva 2 06-29-2007 03:43 PM
No audio on those crazy "imbedded video" clips on webpages tw001_tw Slackware 7 05-14-2006 06:25 PM
k3b: "error decoding audio tracks" and "could not unlock cd driver" lefty.crupps Linux - Software 7 10-13-2005 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:02 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