I’m consternated with my Debian sid, I can’t capture my screen with xvidcap or istanbul anymore, marvil told me that they work in Ubuntu, why not in Debian?

It was a pain the ass to research for a good an usable solution for me, because I have an old laptop CPU(Centrino 1.8Ghz), but 2 weeks later, here is the best solution I found at the moment. Sox is a “Swiss army knife of sound processing” with sound recording capabilities and ffmpeg is a “multimedia player, server and encoder” with screen capture capabilities.

At first time, I’ve tried to capture video and sound with ffmpeg, but sound was terrible, there must be some problem with his alsa support. Capture video with ffmpeg is not easy but I got and acceptable resolution and file weight. So, I had to look for a way to insert good quality sound into my videos BUT ON-FLY, and then I noticed that the param “-i -” is used to receive an stream from stdin… and eureka!!! sox can capture sound with extremely good quality and also put it to stout.

The resulting command line is:
sox -t alsa “hw:0,0” -t ogg -A -2 -c1 -r11025 - | ffmpeg -y -i - -ar 11025 -ab 52 -ac 1 -f x11grab -s 800x600 -i :0.0+10,20 -b 200 -r 12 -aspect 4:3 -f flv test.flv

It is recommend for screencasting to use a resolution of 800x600, you can adjust the position of capture with :0.0+10,20 (play increasing and decreasing both).

And you can view my tests at: develcuy.blip.tv

Technorati Tags: , , , , ,