EXAMPLES
Video and Audio grabbing
If you specify the input format and device then ffmpeg can grab video and audio directly.
ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
Note that you must activate the right video source and channel before launching ffmpeg with any TV viewer such as
xawtv ("http://linux.bytesex.org/xawtv/") by Gerd Knorr. You also have to set the audio recording levels correctly with a standard mixer.
X11 grabbing
Grab the X11 display with ffmpeg via
ffmpeg -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable.
ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
10 is the x-offset and 20 the y-offset for the grabbing.
ffmpeg -f x11grab -follow_mouse centered -s cif -r 25 -i :0.0 /tmp/out.mpg
The grabbing region follows the mouse pointer, which stays at the center of region.
ffmpeg -f x11grab -follow_mouse 100 -s cif -r 25 -i :0.0 /tmp/out.mpg
Only follows when mouse pointer reaches within 100 pixels to the edge of region.
ffmpeg -f x11grab -show_region 1 -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
The grabbing region will be indicated on screen.
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -s cif -r 25 -i :0.0 /tmp/out.mpg
The grabbing region indication will follow the mouse pointer.
Grabbing input from other devices:
http://ffmpeg.org/ffmpeg.html
Video and Audio grabbing
ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg |
ffmpeg -f alsa -ac 1 -i hw:1 -f video4linux2 -i /dev/video0 /tmp/out.mpg |
No comments:
Post a Comment