1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

extracting vorbis audio from MKV file.

Discussion in 'Other video questions' started by davexnet, Apr 24, 2007.

  1. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Hello,
    I have the haali filter and avisynth installed.
    I also have mkvextractGUI and VLC.

    I've been successful with mkvextract in the past, but there's something
    odd that happens with the ogg audio. It gets extracted, but the audio,
    when played back has glitches.

    This file plays fine in VLC. Previously, I've been able to extract the WAV using VLC,
    but not sure if I can do it this time because the MKV file has two audio tracks and I want to select the second one.
    There is a way I know of, but it is long-winded.
    Open the mkv file in mkvmerge and create a new file with just the
    video and audio that you want, then use VLC to get a clean WAV file.
    There *has* to be a better way!
    Thanks
     
  2. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    mplayer.exe -aid 2 -ao pcm:fast:file=audio_out.wav -vo null -vc null input.mkv

    mkvextract shouldn't have any problem extracting vorbis audio though. Still if you were only going to decode it anyway...
     
  3. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    mkvextract extracted the audio, it plays but it has squawks and odd
    sounds every few seconds, clearly there's some garbage data that
    crept in somewhere.
    I've seen this before when attempting to get vorbis audio via this
    nethod.
    Instead, I've used VLC - this is cut and paste
    from a txt file I saved on my PC, not sure where it originally came from:
    "1. Start the "VLC media player".

    2. Click on Ctrl-F (or the "File" tab and select "Open file...")

    3. Click on the "Browse" button and find the .mpg you want
    to extract the audio from. Double click on it.

    4. Put a check mark in the "Stream output" box. Then click on
    the "Settings..." button next to it.

    5. Put a check mark in the "File" box under "Output methods".
    Then use the "Browse..." Button to find the folder you want to
    put your .wav file into. Enter the file name you want with a .wav
    extension. Click on the "Save" button.

    6. Put a dot in the circle next to "WAV" in the "Encapsulation
    Method" box.

    7. Put a check mark in the "Audio codec" box in the "Transcoding
    options" box. Use the dropdown arrow to select "s16l".

    8. Click on the "OK" button.

    9. Click on the "OK" button at the bottom of the page now displayed.

    VLC will now make the 16 bit Stereo .wav file"

    What is this mplayer tool? I've not seen that one.
    Not sure what you meant by "Still if you were only going to decode it anyway..."
    I wanted to reencode it to mp3 so I can build an avi that plays
    in my set top dvd player..
    Dave
     
  4. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    I meant that if you were going to decode it anyway, demuxing and decoding to PCM in one go makes more sense anyway.

    mplayer is like VLC. It is a cross platform, open source, free player with built in decoders/parsers, also based mostly on libavcodec. Personally I prefer it over VLC.
     
  5. janrocks

    janrocks Guest

    Hi guys.. concerning mplayer.

    It's one of the essential linux tools, we use it's engine for just about all demux and transcode operations. Without it a linux system doesn't have much video capability. http://www.mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html

    VLC on the other hand is a better general media player, easy to configure, generally works out of the box (unlike mplayer) and doesn't need lots of tweaks. http://www.videolan.org/doc/vlc-user-guide/en/vlc-user-guide-en.html
    Thanks for that audio-rip with vlc info Dave.. I will give it a go and see if it works for me.
     
    Last edited by a moderator: Apr 25, 2007
  6. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    mplayer works out of the box. Just download run ./configure && make && make install and it works or just apt-get mplayer or similar.

    For linux you also have libxine and gstreamer.

    The main drawback to mplayer is the lack of on the fly configuration. Not an issue here though.
     
  7. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Regarding Mplayer...
    I'm using windows xp, so I downloaded a pre-built version.
    I do have "make" on my PC, but I haven't tried it. What's the benefit to building my own?

    Using the one I have, the first thing I see is the aspect ratio is
    wrong for both avi and mpg2. Do I have to do something to tweak it?



     
  8. janrocks

    janrocks Guest

    Not quite out of the box for me.. I always have to manually set the vo device.
     
  9. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    If your monitor isn't 4:3 (slightly off for 5:4, way off for 16:9/10) then you will need to set the monitor aspect ratio.

    Just add "monitoraspect=16/10" to your config file. Other than that I have never had any AR issues. Only other thing could be due to the files themselves. mplayer fully supports ARS (Aspect Ratio Signalling)
    including ODML AR flags. So if a file is flagged, then it will resize where other players may not.

    For decoding the audio though you should have -vo null, which means no video. So AR really shouldn't come into it.

    So you get no video with the default vo? When I said works out of the box, obviously there is still plenty of stuff that you may want to set in your config file. But it should still at least work.
     
  10. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Thanks celtic_d,
    it was a wide screen monitor, your suggestion worked.
     

Share This Page