From: W. Trevor King Date: Thu, 28 Apr 2011 00:07:58 +0000 (-0400) Subject: Add screen recording post. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=337b39724b2150a8ab94dd0075fa0aadd0cea38a;p=mw2txt.git Add screen recording post. --- diff --git a/posts/Screen_recording.mdwn b/posts/Screen_recording.mdwn new file mode 100644 index 0000000..d302e78 --- /dev/null +++ b/posts/Screen_recording.mdwn @@ -0,0 +1,42 @@ +I've been learning about screen recording in Linux so I can make a +demo/tutorial for [[Hooke]]. There seem to be a number of options +([Xvidcap][], [recordMyDesktop][], etc.), but my favorite approach is +to use [ffmpeg][] directly from the command line. You may recall +ffmpeg from my earlier post about [[video encoding|video]]. For those +to lazy to read the man page, here are some highlights: + +Record audio: + + $ ffmpeg -f alsa -i hw:0 out.wav + +Record video: + + $ ffmpeg -f x11grab -r 30 -s 1280x1024 -i :0.0 out.mpg + +Record audio and video: + + $ ffmpeg -f alsa -i hw:0 -f x11grab -r 30 -s svga -i :0.0 out.mpg + +The trouble will be getting your audio/video captured, encoded, and +stored to disk fast enough to keep up with your desired frame rate. +Smaller sizes, slower frame rates, simpler encodings, and writing to +ramdisks will all help with that. You can create a ramdisk with +something like + + $ mkdir /tmp/ramdisk + $ sudo mount -t tmpfs none /tmp/ramdisk -o size=256m + +It's also possible that passing the `-sameq` option to ffmpeg will +help, but I'm not entirely convinced. + +Anything recorded or encoded by ffmpeg should be playable in mplayer +(as far as I know), or you can transcode it into a format of your +choice (see my [[video encoding|video]] post for hints. + +Note to Gentoo users: you'll need to compile ffmpeg with the `X` flag +enabled to get the x11grab video input device. + +[Xvidcap]: http://xvidcap.sourceforge.net/ +[recordMyDesktop]: http://recordmydesktop.sourceforge.net/ + +[[!tag tags/linux]]