GNU/Linux Tip: Using ffmpeg to make a screencast – easy!

Here’s a terrific program that can perform almost any kind of media operation you want. Convert, strip, record, etc, etc – Amazing!

ffmpeg is an all in one terminal based program that really can do it all. There is way too much to cover here, but I often find myself needing to record a quick and dirty screencast. Here’s a quick example for recording a flash video:

ffmpeg -f x11grab -s hd720 -b 2000k -r 25 -i :0.0 /tmp/test.flv

where,

-f x11grab – tells ffmpeg to grab all X11 data (what is displayed by X11 on your screen)

-s hd720 – is the size, which in this case works out to 1280×720

-b 2000k – is the bitrate, which we set to 2000k/s

-r 25 – is framerate

-i :0.0 – tells ffmpeg which screen to use, useful if you’re outputting to your TV as well me

and finally the filename, where you specify .flv for flash or whatever format you’d like.

you could use:

sleep 2 && ffmpeg -f x11grab -s hd720 -b 2000k -r 25 -i :0.0 /tmp/test.flv

which tells GNU/Linux to sleep for 2 seconds, and then once that is done, to perform the ffmpeg function we want here.

 

 

 

 

 

Bookmark the permalink.

Leave a Reply