From 337b39724b2150a8ab94dd0075fa0aadd0cea38a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 27 Apr 2011 20:07:58 -0400 Subject: [PATCH] Add screen recording post. --- posts/Screen_recording.mdwn | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 posts/Screen_recording.mdwn 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]] -- 2.26.2