LinuxQuestions.org
Help answer threads with 0 replies.
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 04-16-2006, 01:18 AM   #1
conn-fused
Member
 
Registered: Jun 2004
Posts: 124

Rep: Reputation: 15
How to sample mp3 from mkv (Matroska) video?


Hi all,

I'd like to extract a small sound clip from an MKV video file, but I haven't had any luck so far. So, sound and video experts, how can I use a tool like mencoder to extract the audio stream and (if necessary) convert it to mp3. And how can I then take a small sample from that mp3?

Thanks!
 
Old 04-16-2006, 04:52 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Try Audacity. If you direct it to open the file, it should import the audio track automatically. Then you can pretty easily clip out the section you want and save it to a new file. It may take some time for it to import if it's a long video though.

If you want to go command line only, i suggest you demultiplex the audio into a separate file so that you can work with it without complication. Mplayer should be able to do that pretty easily. You might also want to check out sox, a very versatile command-line audio editor.
 
Old 04-16-2006, 06:52 PM   #3
conn-fused
Member
 
Registered: Jun 2004
Posts: 124

Original Poster
Rep: Reputation: 15
Thanks for the suggestions. I tried Audacity, but it repeatedly hung about 5% of the way through openning the mp3 from the mkv. I gave it over an hour, but no luck.

Here's what did work for me:

-Install MKVToolsNix

mkvinfo WhateverFile.mkv

-Note the audio track number

mkextract tracks WhateverFile.mkv n:OutputFile (where n=audio track number)

-In my case, the audio was OGG, so I then used Audacity for the conversion to MP3.

Thanks again!

Last edited by conn-fused; 04-17-2006 at 12:45 AM.
 
  


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
MPlayer and Matroska Video: Audio Problem foucault Linux - Software 1 04-10-2006 09:50 AM
h.264 Matroska video choppy under ffmpeg? mrchaos Linux - Software 0 12-28-2005 02:27 AM
Zaurus SL-c3000 playing video (avi, ogm, mkv) sadarax Linux - Laptop and Netbook 2 10-24-2005 08:03 PM
mplayer matroska h2gofast Linux - Software 1 08-06-2004 09:19 AM
Mplayer + New Matroska exodist Linux - Software 12 05-04-2004 10:50 AM

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

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