Recordscreen.py : video and audio capture

Published on

Update 2018:
This article is obviously obsolete now we have OBS and SimpleScreenRecorder on GNU/Linux. I invite you to directly give them a try if you are looking for a solution to record your desktop and accidentally found this archive of my blog and this solution that was working in 2012...


Recordscreen.py is a script to do screen record and video on Linux , developed in 2011 by Nathan Vegdahl my friend and colleague from the project Sintel . With this script , screen-capture from command line is easier via ffmpeg/libAv with a Python script. I update here the old blog post, to maintain the script for the LTS version of Ubuntu and it switch to AVconv.

Ubuntu Linux 12.04 and Ubuntu based distribution :

Install those libraries ( inside a terminal ) :

sudo apt-get install wget libav-tools ffmpeg libavc1394-0 libavformat-extra-53 libavfilter2 libavutil-extra-51 mencoder libavahi-common-data

Then still in the terminal , do this line after line , to install the script :

wget http://www.davidrevoy.com/data/documents/recordscreen_12-04.zip  
unzip recordscreen_12-04.zip  
rm recordscreen_12-04.zip  
chmod +x recordscreen.py

( or install it manually from this link : recordscreen_12-04.zip )

Usage :

If you want to screencapture go with a terminal where the script is and type :

./recordscreen.py

The terminal windows will start recording, and gives you feedback on the frame recorded.
Reduce the terminal windows, and start recording your demo.
To stop the process, call back the terminal windows and press 'Ctrl+C' twice on the keyboard over it.
Your video file will be saved next to your recordscreen.py file.
You can play it using VLC player. For more informations, the script has a nice --help page ; with many flags to customise your settings ( width / high / ratio / framerate / audio / etc .... ) . Don't hesitate to read the documention :

./recordscreen.py --help

Note about file compression :

I use here the default setting. The raw videos are very large but recording is smooth. Before working on them on my favorite open-source video editor Kdenlive , I compress my source video with Avconv , in a terminal, like this :

avconv -i input.mkv -vcodec libx264 -r 30 -pre libx264-slower -an -threads 0 output.mkv  

Then I can delete my sources , and keep my new compressed sources.
( ex : old file = 50MB , newer compressed file = 2.5MB )

For developpers :

Nathan's sources version from the GIT sources :

git clone git://git.cessen.com/recordscreen.git

Illustration credit on the visual : microphone and camera icons of the Faenza icon set



License: "Recordscreen.py : video and audio capture" by David Revoy − CC-BY 4.0
Tags:  #linux  #install   | Download: Markdown
25 comments