extracting vorbis audio from MKV file.
|
|
Senior Member
|
24. April 2007 @ 15:08 |
Link to this message
|
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
|
Advertisement
|
  |
|
celtic_d
AfterDawn Addict
|
24. April 2007 @ 18:09 |
Link to this message
|
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...
|
Senior Member
|
24. April 2007 @ 18:52 |
Link to this message
|
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
|
celtic_d
AfterDawn Addict
|
25. April 2007 @ 01:30 |
Link to this message
|
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.
|
janrocks
Suspended permanently
|
25. April 2007 @ 04:01 |
Link to this message
|
This message has been edited since posting. Last time this message was edited on 25. April 2007 @ 04:04
|
celtic_d
AfterDawn Addict
|
25. April 2007 @ 05:04 |
Link to this message
|
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.
|
Senior Member
|
25. April 2007 @ 08:29 |
Link to this message
|
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?
|
janrocks
Suspended permanently
|
25. April 2007 @ 09:12 |
Link to this message
|
Not quite out of the box for me.. I always have to manually set the vo device.
|
celtic_d
AfterDawn Addict
|
25. April 2007 @ 19:08 |
Link to this message
|
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.
|
Advertisement
|
  |
|
Senior Member
|
25. April 2007 @ 20:19 |
Link to this message
|
Thanks celtic_d,
it was a wide screen monitor, your suggestion worked.
|