Grab X11 input and create an MPEG at 25 fps with the resolution 800x600
Proper screencast with audio using ffmpeg and x264, as per http://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/
This will grab the image from desktop, starting with the upper-left corner at x=100, y=200 with a width and height of 1024?768.
This is identical to the original command, but allows you to specify an offset if you have multiple monitors. In this case you'll record a 1366x768 window that's offset by 1366 pixels in the x axis and 0 pixels in the y axis. Note also that the -sameq option has been replaced by -qscale - at least in ffmpeg version 1.2.1 on Fedora 19.
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
ffmpeg -f x11grab -s sxga -r 25 -i :0.0 -sameq ~/tst.mpg
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec--disable-vis --enable-shared --disable-static libavutil version: 49.6.0 libavcodec version: 51.50.0 libavformat version: 52.7.0 libavdevice version: 52.0.0 built on Oct 3 2008 22:40:31, gcc: 4.3.2 [x11grab @ 0xb7ec4388]device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1280 height: 1024 No protocol specified [x11grab @ 0xb7ec4388]Could not open X display. :0.0: I/O error occured Usually that means that input file is truncated and/or corrupted. Sad -:( now I have to read mans...