View Single Post
Posts: 7 | Thanked: 0 times | Joined on Nov 2007
#109
It seems that someone else was having issues converting from Vorbis audio in a .mkv container with MEncoder but wrote a script. It appears that the script extracts and decompresses the Vorbis stream to WAV and then points MEncoder to use the WAV stream during the main conversion. Here's what they're code basically looks like.

Code:
#!/bin/sh
 
INPUT=$1
OUTPUT=$2
 
mplayer "$INPUT" -ao pcm:fast:file=audio.wav -vc null -vo null
mencoder "$INPUT" \
    -ffourcc divx \
    -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=400 \
    -audiofile audio.wav \
    -oac mp3lame -lameopts vbr=3 \
    -slang eng \
    -o "$OUTPUT"
 
rm -f audio.wav
It doesn't appear too complex. However, when I tried to run the audio extraction script, it took a rather long time. With Audacity, I could convert a demuxed Vorbis stream in about 20 seconds. Yet with MPlayer, it looked like it was extracting and decompressing in real time, that is a minute of running will only result in a minute of audio. And I'm fairly sure that I put the options in correctly. Maybe it's because this was written for MPlayer in Linux rather than MPlayer in Windows.