Showing posts with label screen capture. Show all posts
Showing posts with label screen capture. Show all posts

16 November, 2012

Screen Capture with FFMpeg with Audio

Found it useful to capture the Linux desktop using FFMpeg, most useful with audio. Accomplished it using the following command:

$ ffmpeg -y -f alsa -i pulse -f x11grab -r 25 -s 1366x768 -i :0.0 -qscale 1 -s 1024x768  screenCap.mpg
First dimension specified is the resolution of the desktop, the second dimension is the desired resized video dimension. Cheers.

18 June, 2009

Capturing Radio Broadcast Streams with Mplayer

My wife and I took our honeymoon in Australia and I can admit that there are numerous occasions where I hunger for a bit of Aussie. I recently explored how to capture an audio stream to play back on my MP3 player (since our office frowns on streaming).

This is how I've been capturing Triple-J streams for fun;


$ mplayer http://202.6.74.107:8060/triplej.mp3 -dumpstream -dumpfile /tmp/audio.mp3

12 June, 2009

Screen Capture with FFmpeg

Sometimes it's useful to capture the display output as a means of archiving a procedure or to demonstrate a user experience. The following command will capture the display region 1680x1050 at 30fps for 90 seconds and shrink it to a 640x480 video at near raw resolution (fixed quantizer scale of 1).

The important thing is to confirm your ffmpeg format supports x11grab, otherwise you'll get the following error:

Unknown input or output format: x11grab



ffmpeg -y -f x11grab -r 30 -s 1680x1050 -i :0.0 -t 90 -qscale 1 -s 640x480 out.mpg


As you can imagine, capturing 30fps adds significant resource loading, if you so choose you can down-sample the frame rate but you may need to use an alternative encoder for non-compliant frame rates of some codecs.

The MJPEG encoder seems to work well enough for slow frame rates, like 1 Hz.


ffmpeg -y -f x11grab -r 1/1 -s 1680x1050 -i :0.0 -t 90 -qscale 1 -s 640x480 -vcodec mjpeg out.avi