[clug] Recording screencasts on Linux?

Carlo Hamalainen carlo at carlo-hamalainen.net
Sat Jul 20 20:13:40 MDT 2013


Hi everyone,

Thanks for all the responses.

For the list archive, here is what I have working so far.

I'm using the MATE desktop with a few virtual desktops. I want to resize
the terminal windows to all be of size 1280x720 at offset 100x100. The
utility wmctrl does this:

$ wmctrl -l
0x01000003 -1 x1 Top Expanded Edge Panel
0x01000028 -1 x1 Bottom Expanded Edge Panel
0x0140001e -1 x1 x-caja-desktop
0x0280008a  0 x1 Recording screencasts on Linux? -
carlo at carlo-hamalainen.net - Mail - Mozilla Firefox
0x02600003  0 x1 Transmission
0x01800158  0 x1
0x02c00004  8 x1 Terminal
0x02c007f9  1 x1 Terminal
0x02c0085b  2 x1 Terminal
0x02c008aa  7 x1 Terminal
0x02c0315a  8 x1 Terminal
0x02c03da7  6 x1 Terminal
0x02c03e99  0 x1 Terminal

$ wmctrl -l | grep Terminal | cut -f 1 -d ' ' | xargs -n 1 wmctrl -e
0,100,100,1280,720 -i -r

So I can move directly to a particular terminal using Alt-n for n in 1..8.
(desktop 9 is where ffmpeg is running).

I work out that my usb headset is hardware device 1, subdevice 0:

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [Plantronics .Audio 478 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So now the capture command is:

sleep 5s; ffmpeg -f alsa -ac 2 -i hw:1,0 -acodec pcm_s16le -f x11grab
-show_region 1 -s cif -r 25 -s 1280x720 -i :0.0+100,100 -vcodec ffv1
screencast.avi

For some reason I had to use -sameq when I ran ffmpeg on my work laptop
otherwise quality was quite low.

Somewhat surprisingly, my brand new Lenovo X1 Carbon doesn't have enough
grunt to play the screencast file using mplayer, vlc, or totem. My work
laptop (Dell E6530) had no problems. So for previewing I convert it to an
ogv using ffmpeg2theora:

ffmpeg2theora screencast.avi -v 10 -o screencast.ogv

Here is a sample on vimeo, using the smaller ogv file for upload:

http://vimeo.com/m/70705321

I tried YouTube but the quality was much lower; fonts were unreadable.

There is a bit of background buzz in the audio so I may look into using
Audacity or similar for post processing.

--
Carlo Hamalainen
http://carlo-hamalainen.net


More information about the linux mailing list