When I started looking for a Screencast recording solution for Linux, I wasn’t satisfied much with the available software. The best was recordmydesktop which always recorded in the open OGV (Part of OGG) format. There was little I could do. So I looked further and then I came across the powerful FFMpeg.
Using FFMpeg
It is a command-line tool with over whelming options. Until Ubuntu 11.10, I have used it with the following set of commands:
To install ffmpeag sudo apt-get install libav-tools
Some additional packages required:
sudo apt-get install libavcodec-extra-53 sudo apt-get install mencoder sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly sudo apt-get install gstreamer0.10-plugins-bad sudo apt-get install libx264-120 sudo apt-get install libx264-dev
Record quality AVI screencast:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1280x800 -i :0.0 -acodec libmp3lame -vcodec libx264 -vpre libx264-lossless_ultrafast -threads 0 out.avi
Trim video from the end:
mencoder -endpos 00:05:42 -oac copy -ovc copy html.avi -o html-whitespaces_en.avi
Remove the audio:
ffmpeg -i html-whitespaces_en.avi -vcodec copy -an html2.avi
Add a different audio:
ffmpeg -i html2.avi -i urdu.wav -vcodec copy -acodec libmp3lame html-whitespaces_ur.avi -newaudio
Using recordmydesktop
As mentioned earlier I wasn’t happy with its provided options but non-the-less it is a recording solution which supports command-line also.
sudo apt-get install recordmydesktop recordmydesktop --width 1280 --height 800 --full-shots --fps 15 --channels 1 --device hw:0,0 --delay 10
If this gives an error, try hw:1,0 instead.
sudo apt-get install mencoder
To show a list of all the output formats supported:
mencoder -of help mencoder -endpos 00:00:30 -oac mp3lame -ovc x264 out.ogv -o output5.avi recordmydesktop --help
Using anconv
It is the replacement of FFmpeg and it should be considered now instead of FFmpeg.
sudo apt-get install ubuntu-restricted-extras mencoder sleep 10 && avconv -f alsa -i pulse -f x11grab -r 30 -s 1280x800 -i :0.0 -vcodec libx264 -acodec libmp3lame myscreencast.avi
To get the info about the recorded clip:
avconv -i myscreencast.avi
To cut the video from the end:
mencoder -endpos 00:00:08 -oac copy -ovc copy myscreencast.avi -o myscreencast2.avi
where -endpos is the ending time, remaining will be removed.
Remove sound using mencoder:
mencoder -ovc copy -nosound myscreencast2.avi -o nosound.avi
Finally add a different audio to the nosound.avi
mencoder -ovc copy -audiofile sound.mp3 -oac mp3lame nosound.avi -o final.avi
instead of mp3lame the word copy can also be used.
Pingback: Rotate & Flip Video Files in Ubuntu (Linux) | step4wd.com
Excellent blog you have here.. It’s hard to find good quality writing like yours these days. I seriously appreciate people like you! Take care!!
Thanks for the appreciation! 🙂
Hey! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone. I’m trying
to find a template or plugin that might be able to resolve this issue.
If you have any suggestions, please share. With thanks!
Read about CSS3 Media Queries
Pingback: Remove Unwanted Audio Tracks from Video Files | step4wd.com