LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to sample mp3 from mkv (Matroska) video? (https://www.linuxquestions.org/questions/linux-software-2/how-to-sample-mp3-from-mkv-matroska-video-435582/)

conn-fused 04-16-2006 01:18 AM

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!

David the H. 04-16-2006 04:52 AM

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.

conn-fused 04-16-2006 06:52 PM

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!


All times are GMT -5. The time now is 09:10 AM.