Saturday, September 22, 2012

How To Do Screen Casts In Linux

If you have an rpm-based OS, do :

else if you have a debian based OS, do:

After the packages are installed,

Run the the following command for a screen cast (without audio):

-f           ==  force format
x11grab ==  Grab the X11 display
-s          ==  size

 wxga    == 1366x768
-r          == set frame rate
-i           == in file

-sameq  == same quality

This will create a file out.mpg in the directory /tmp.

Run the the following command for a screen cast (with audio):

-y   == Overwrite output files
alsa ==  ALSA (Advanced Linux Sound Architecture) input device
-ac  == set number of audio channels
-i    == pulse [Refers to pulseaudio]

`xdpyinfo | grep 'dimensions:'|awk '{print $2}'` == get the max resolution of your screen
-acodec == foce audio codec
-an == Disable audio recording
-video == foce video codec

This will create two files my_output.wav and my_output.mp4 in the current directory.

This correspond to the audio and video recorded.

To join combine the audio and video in a single file, just type:

The required video will be stored in Output.mp4

Update: In fedora, Ctrl + Shift + Alt + R -- Records a Screencast of your entire desktop and saves it to your Videos folder.

To detect crop dimensions:
ffmpeg -i in.mpg -vf "cropdetect=24:16:0" out.mpg
To crop video:
ffmpeg -i input.mpg -vf "crop=1280:768:43:0" -qscale 0 output.mpg
To change aspect ratio:
ffmpeg -i input.mpg -s 1366x768 -aspect 16:9 -qscale 0 output.mpg
To concatenate media files:
ffmpeg -f concat -i mylist.txt -c copy -qscale 0 out_.mpg
cat mylist.txt
file out1.mpg
file out2.mpg

No comments: