Rebuilding ffmpeg to create screencast in Ubuntu
I was assigned to record a screencast for demonstrating look-and-feel of a portal. By the way, my laptop is Ubuntu right now. I don't want to find another machine to do this job so I have to find a way to record my screen effectively. I found How to Create a Screencast in Ubuntu. This is a good article which helps me realize additional capability of ffmpeg. Anyway, the standard ffmpeg does not support this functionality so I have to recompile ffmpeg by myself. Well, I do not like this idea because I will have two versions of ffmpeg in different directory. So I continue finding and finally found how to rebuild ffmpeg in proper way. As a result, I combined 2 approaches as follows.
Technorati Tags: ubuntu, ffmpeg, mplayer, screencast
- Prepare all necessary packages to build ffmpeg from source
$ sudo apt-get build-dep ffmpeg
- Install additional packages to build risky addons of ffmpeg
sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev fakeroot
sudo apt-get install build-essential xlibs-dev devscripts
- Get ffmpeg source
sudo apt-get source ffmpeg
- Get x11grab patch
wget http://un.sh.nu/screencasts/ffmpeg-0.4.9-p20051216.diff
- Apply the patch (You may get 2 failures in file configure. Don't worry. Edit the file manually will help.)
cd ffmpeg_0.cvs20050918
patch -Np1 -i ../ffmpeg-0.4.9-p20051216.diff
- Modify debian/rules to include below line
confflags += --enable-x11grab
- Modify debian/changelog to describe about your modification and version number to prevent autoupdater override this package automatically
ffmpeg (3:0.cvs20050918-5ubuntu1.x11grab) dapper; urgency=low
* x11grab:
+ Add support for x11grab
-- Sugree Phatanapherom <> Wed, 21 Jun 2006 21:50:00 +0700
- Rebuild ffmpeg
$ DEB_BUILD_OPTIONS=risky debuild -us -uc
- Install the package
$ cd ..
$ dpkg -i ffmpeg_0.cvs20050918-5ubuntu1.x11grab_i386.deb
$ ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1280x768 -an test.aviwhere:
- -vd x11:0,0 specify x11 as video device at offset x=0 and y=0
- -b 1000 specify video bitrate
- -r 10 specify video frame rate
- -s 1280x768 specify video size
- -an specify to exclude audio
$ ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -i test.avi -s 800x600 test-800-600.aviNow it's time to play.
$ mplayer -vo x11 test.aviHappy screencast!
Technorati Tags: ubuntu, ffmpeg, mplayer, screencast
- sugree's blog
- 4650 reads
Post new comment