Jeff Carr - 2005-04-24

Here would be the commands to convert the .avi file into a .ogm file. sox can be used to remove the audio drift that is commonly found on the resulting .avi file. If someone knows how to correctly merge in the subtitle tracks let me know.

mplayer "$1.avi" -vc dummy -vo null -ao pcm -waveheader -aofile outfile.wav
# hardcode the aplitude or gain if it is still too quiet
# normalize-audio -vvv --amplitude=-15dbFS outfile.wav
# normalize-audio -vvv --gain=15dB outfile.wav
normalize-audio -vvv outfile.wav
sox outfile.wav test.wav trim 10 30
oggenc -q 6 outfile.wav
ogmmerge -o "$1.ogm" -A "$1.avi" outfile.ogg
rm -f outfile.*