Monday, March 03, 2008

Adding Sound to Theora Screencast

Finally figured out how to dump audio from no$gba running through wine into a file for screencasts. Adding the following to my ~/.asoundrc stores all sound played through the default ALSA device into file tap.raw in my home directory:
pcm.!default {
type plug
slave {
pcm "tee:hw,/home/user/tee.raw"
}
}
This will store all audio output from now on in tee.raw, so don't keep it like that permanently! I copy that to the file when I need to dump audio, and remove it after... not really a perfect setup, but can't seem to instruct wine to chose another device, not matter how i set $ALSA_PCM_DEVICE or try to fiddle with winecfg.

After getting the raw audio, I trim it using audacity, converting it at the same time to ogg vorbis. I get the theora video out from the screencast using oggzrip, and then combine that with the audio using oggzmerge.
oggzrip -c theora -o video.ogg original_recording.ogg
oggzmerge -o final.ogg video.ogg audio.ogg
The result is final.ogg, containing ogg vorbis audio and theora video, which can then be directly uploaded as a video on blogger/blogspot, and I would assume youtube.

No comments: