indevs.texi 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. @chapter Input Devices
  2. @c man begin INPUT DEVICES
  3. Input devices are configured elements in FFmpeg which enable accessing
  4. the data coming from a multimedia device attached to your system.
  5. When you configure your FFmpeg build, all the supported input devices
  6. are enabled by default. You can list all available ones using the
  7. configure option "--list-indevs".
  8. You can disable all the input devices using the configure option
  9. "--disable-indevs", and selectively enable an input device using the
  10. option "--enable-indev=@var{INDEV}", or you can disable a particular
  11. input device using the option "--disable-indev=@var{INDEV}".
  12. The option "-formats" of the ff* tools will display the list of
  13. supported input devices (amongst the demuxers).
  14. A description of the currently available input devices follows.
  15. @section alsa
  16. ALSA (Advanced Linux Sound Architecture) input device.
  17. To enable this input device during configuration you need libasound
  18. installed on your system.
  19. This device allows capturing from an ALSA device. The name of the
  20. device to capture has to be an ALSA card identifier.
  21. An ALSA identifier has the syntax:
  22. @example
  23. hw:@var{CARD}[,@var{DEV}[,@var{SUBDEV}]]
  24. @end example
  25. where the @var{DEV} and @var{SUBDEV} components are optional.
  26. The three arguments (in order: @var{CARD},@var{DEV},@var{SUBDEV})
  27. specify card number or identifier, device number and subdevice number
  28. (-1 means any).
  29. To see the list of cards currently recognized by your system check the
  30. files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
  31. For example to capture with @command{ffmpeg} from an ALSA device with
  32. card id 0, you may run the command:
  33. @example
  34. ffmpeg -f alsa -i hw:0 alsaout.wav
  35. @end example
  36. For more information see:
  37. @url{http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html}
  38. @section bktr
  39. BSD video input device.
  40. @section dshow
  41. Windows DirectShow input device.
  42. DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
  43. Currently only audio and video devices are supported.
  44. Multiple devices may be opened as separate inputs, but they may also be
  45. opened on the same input, which should improve synchronism between them.
  46. The input name should be in the format:
  47. @example
  48. @var{TYPE}=@var{NAME}[:@var{TYPE}=@var{NAME}]
  49. @end example
  50. where @var{TYPE} can be either @var{audio} or @var{video},
  51. and @var{NAME} is the device's name.
  52. @subsection Options
  53. If no options are specified, the device's defaults are used.
  54. If the device does not support the requested options, it will
  55. fail to open.
  56. @table @option
  57. @item video_size
  58. Set the video size in the captured video.
  59. @item framerate
  60. Set the frame rate in the captured video.
  61. @item sample_rate
  62. Set the sample rate (in Hz) of the captured audio.
  63. @item sample_size
  64. Set the sample size (in bits) of the captured audio.
  65. @item channels
  66. Set the number of channels in the captured audio.
  67. @item list_devices
  68. If set to @option{true}, print a list of devices and exit.
  69. @item list_options
  70. If set to @option{true}, print a list of selected device's options
  71. and exit.
  72. @item video_device_number
  73. Set video device number for devices with same name (starts at 0,
  74. defaults to 0).
  75. @item audio_device_number
  76. Set audio device number for devices with same name (starts at 0,
  77. defaults to 0).
  78. @item pixel_format
  79. Select pixel format to be used by DirectShow. This may only be set when
  80. the video codec is not set or set to rawvideo.
  81. @item audio_buffer_size
  82. Set audio device buffer size in milliseconds (which can directly
  83. impact latency, depending on the device).
  84. Defaults to using the audio device's
  85. default buffer size (typically some multiple of 500ms).
  86. Setting this value too low can degrade performance.
  87. See also
  88. @url{http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx}
  89. @end table
  90. @subsection Examples
  91. @itemize
  92. @item
  93. Print the list of DirectShow supported devices and exit:
  94. @example
  95. $ ffmpeg -list_devices true -f dshow -i dummy
  96. @end example
  97. @item
  98. Open video device @var{Camera}:
  99. @example
  100. $ ffmpeg -f dshow -i video="Camera"
  101. @end example
  102. @item
  103. Open second video device with name @var{Camera}:
  104. @example
  105. $ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
  106. @end example
  107. @item
  108. Open video device @var{Camera} and audio device @var{Microphone}:
  109. @example
  110. $ ffmpeg -f dshow -i video="Camera":audio="Microphone"
  111. @end example
  112. @item
  113. Print the list of supported options in selected device and exit:
  114. @example
  115. $ ffmpeg -list_options true -f dshow -i video="Camera"
  116. @end example
  117. @end itemize
  118. @section dv1394
  119. Linux DV 1394 input device.
  120. @section fbdev
  121. Linux framebuffer input device.
  122. The Linux framebuffer is a graphic hardware-independent abstraction
  123. layer to show graphics on a computer monitor, typically on the
  124. console. It is accessed through a file device node, usually
  125. @file{/dev/fb0}.
  126. For more detailed information read the file
  127. Documentation/fb/framebuffer.txt included in the Linux source tree.
  128. To record from the framebuffer device @file{/dev/fb0} with
  129. @command{ffmpeg}:
  130. @example
  131. ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
  132. @end example
  133. You can take a single screenshot image with the command:
  134. @example
  135. ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
  136. @end example
  137. See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
  138. @section iec61883
  139. FireWire DV/HDV input device using libiec61883.
  140. To enable this input device, you need libiec61883, libraw1394 and
  141. libavc1394 installed on your system. Use the configure option
  142. @code{--enable-libiec61883} to compile with the device enabled.
  143. The iec61883 capture device supports capturing from a video device
  144. connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
  145. FireWire stack (juju). This is the default DV/HDV input method in Linux
  146. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  147. Specify the FireWire port to be used as input file, or "auto"
  148. to choose the first port connected.
  149. @subsection Options
  150. @table @option
  151. @item dvtype
  152. Override autodetection of DV/HDV. This should only be used if auto
  153. detection does not work, or if usage of a different device type
  154. should be prohibited. Treating a DV device as HDV (or vice versa) will
  155. not work and result in undefined behavior.
  156. The values @option{auto}, @option{dv} and @option{hdv} are supported.
  157. @item dvbuffer
  158. Set maxiumum size of buffer for incoming data, in frames. For DV, this
  159. is an exact value. For HDV, it is not frame exact, since HDV does
  160. not have a fixed frame size.
  161. @item dvguid
  162. Select the capture device by specifying it's GUID. Capturing will only
  163. be performed from the specified device and fails if no device with the
  164. given GUID is found. This is useful to select the input if multiple
  165. devices are connected at the same time.
  166. Look at /sys/bus/firewire/devices to find out the GUIDs.
  167. @end table
  168. @subsection Examples
  169. @itemize
  170. @item
  171. Grab and show the input of a FireWire DV/HDV device.
  172. @example
  173. ffplay -f iec61883 -i auto
  174. @end example
  175. @item
  176. Grab and record the input of a FireWire DV/HDV device,
  177. using a packet buffer of 100000 packets if the source is HDV.
  178. @example
  179. ffmpeg -f iec61883 -i auto -hdvbuffer 100000 out.mpg
  180. @end example
  181. @end itemize
  182. @section jack
  183. JACK input device.
  184. To enable this input device during configuration you need libjack
  185. installed on your system.
  186. A JACK input device creates one or more JACK writable clients, one for
  187. each audio channel, with name @var{client_name}:input_@var{N}, where
  188. @var{client_name} is the name provided by the application, and @var{N}
  189. is a number which identifies the channel.
  190. Each writable client will send the acquired data to the FFmpeg input
  191. device.
  192. Once you have created one or more JACK readable clients, you need to
  193. connect them to one or more JACK writable clients.
  194. To connect or disconnect JACK clients you can use the @command{jack_connect}
  195. and @command{jack_disconnect} programs, or do it through a graphical interface,
  196. for example with @command{qjackctl}.
  197. To list the JACK clients and their properties you can invoke the command
  198. @command{jack_lsp}.
  199. Follows an example which shows how to capture a JACK readable client
  200. with @command{ffmpeg}.
  201. @example
  202. # Create a JACK writable client with name "ffmpeg".
  203. $ ffmpeg -f jack -i ffmpeg -y out.wav
  204. # Start the sample jack_metro readable client.
  205. $ jack_metro -b 120 -d 0.2 -f 4000
  206. # List the current JACK clients.
  207. $ jack_lsp -c
  208. system:capture_1
  209. system:capture_2
  210. system:playback_1
  211. system:playback_2
  212. ffmpeg:input_1
  213. metro:120_bpm
  214. # Connect metro to the ffmpeg writable client.
  215. $ jack_connect metro:120_bpm ffmpeg:input_1
  216. @end example
  217. For more information read:
  218. @url{http://jackaudio.org/}
  219. @section lavfi
  220. Libavfilter input virtual device.
  221. This input device reads data from the open output pads of a libavfilter
  222. filtergraph.
  223. For each filtergraph open output, the input device will create a
  224. corresponding stream which is mapped to the generated output. Currently
  225. only video data is supported. The filtergraph is specified through the
  226. option @option{graph}.
  227. @subsection Options
  228. @table @option
  229. @item graph
  230. Specify the filtergraph to use as input. Each video open output must be
  231. labelled by a unique string of the form "out@var{N}", where @var{N} is a
  232. number starting from 0 corresponding to the mapped input stream
  233. generated by the device.
  234. The first unlabelled output is automatically assigned to the "out0"
  235. label, but all the others need to be specified explicitly.
  236. If not specified defaults to the filename specified for the input
  237. device.
  238. @item graph_file
  239. Set the filename of the filtergraph to be read and sent to the other
  240. filters. Syntax of the filtergraph is the same as the one specified by
  241. the option @var{graph}.
  242. @end table
  243. @subsection Examples
  244. @itemize
  245. @item
  246. Create a color video stream and play it back with @command{ffplay}:
  247. @example
  248. ffplay -f lavfi -graph "color=c=pink [out0]" dummy
  249. @end example
  250. @item
  251. As the previous example, but use filename for specifying the graph
  252. description, and omit the "out0" label:
  253. @example
  254. ffplay -f lavfi color=c=pink
  255. @end example
  256. @item
  257. Create three different video test filtered sources and play them:
  258. @example
  259. ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
  260. @end example
  261. @item
  262. Read an audio stream from a file using the amovie source and play it
  263. back with @command{ffplay}:
  264. @example
  265. ffplay -f lavfi "amovie=test.wav"
  266. @end example
  267. @item
  268. Read an audio stream and a video stream and play it back with
  269. @command{ffplay}:
  270. @example
  271. ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
  272. @end example
  273. @end itemize
  274. @section libdc1394
  275. IIDC1394 input device, based on libdc1394 and libraw1394.
  276. @section openal
  277. The OpenAL input device provides audio capture on all systems with a
  278. working OpenAL 1.1 implementation.
  279. To enable this input device during configuration, you need OpenAL
  280. headers and libraries installed on your system, and need to configure
  281. FFmpeg with @code{--enable-openal}.
  282. OpenAL headers and libraries should be provided as part of your OpenAL
  283. implementation, or as an additional download (an SDK). Depending on your
  284. installation you may need to specify additional flags via the
  285. @code{--extra-cflags} and @code{--extra-ldflags} for allowing the build
  286. system to locate the OpenAL headers and libraries.
  287. An incomplete list of OpenAL implementations follows:
  288. @table @strong
  289. @item Creative
  290. The official Windows implementation, providing hardware acceleration
  291. with supported devices and software fallback.
  292. See @url{http://openal.org/}.
  293. @item OpenAL Soft
  294. Portable, open source (LGPL) software implementation. Includes
  295. backends for the most common sound APIs on the Windows, Linux,
  296. Solaris, and BSD operating systems.
  297. See @url{http://kcat.strangesoft.net/openal.html}.
  298. @item Apple
  299. OpenAL is part of Core Audio, the official Mac OS X Audio interface.
  300. See @url{http://developer.apple.com/technologies/mac/audio-and-video.html}
  301. @end table
  302. This device allows one to capture from an audio input device handled
  303. through OpenAL.
  304. You need to specify the name of the device to capture in the provided
  305. filename. If the empty string is provided, the device will
  306. automatically select the default device. You can get the list of the
  307. supported devices by using the option @var{list_devices}.
  308. @subsection Options
  309. @table @option
  310. @item channels
  311. Set the number of channels in the captured audio. Only the values
  312. @option{1} (monaural) and @option{2} (stereo) are currently supported.
  313. Defaults to @option{2}.
  314. @item sample_size
  315. Set the sample size (in bits) of the captured audio. Only the values
  316. @option{8} and @option{16} are currently supported. Defaults to
  317. @option{16}.
  318. @item sample_rate
  319. Set the sample rate (in Hz) of the captured audio.
  320. Defaults to @option{44.1k}.
  321. @item list_devices
  322. If set to @option{true}, print a list of devices and exit.
  323. Defaults to @option{false}.
  324. @end table
  325. @subsection Examples
  326. Print the list of OpenAL supported devices and exit:
  327. @example
  328. $ ffmpeg -list_devices true -f openal -i dummy out.ogg
  329. @end example
  330. Capture from the OpenAL device @file{DR-BT101 via PulseAudio}:
  331. @example
  332. $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
  333. @end example
  334. Capture from the default device (note the empty string '' as filename):
  335. @example
  336. $ ffmpeg -f openal -i '' out.ogg
  337. @end example
  338. Capture from two devices simultaneously, writing to two different files,
  339. within the same @command{ffmpeg} command:
  340. @example
  341. $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
  342. @end example
  343. Note: not all OpenAL implementations support multiple simultaneous capture -
  344. try the latest OpenAL Soft if the above does not work.
  345. @section oss
  346. Open Sound System input device.
  347. The filename to provide to the input device is the device node
  348. representing the OSS input device, and is usually set to
  349. @file{/dev/dsp}.
  350. For example to grab from @file{/dev/dsp} using @command{ffmpeg} use the
  351. command:
  352. @example
  353. ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
  354. @end example
  355. For more information about OSS see:
  356. @url{http://manuals.opensound.com/usersguide/dsp.html}
  357. @section pulse
  358. PulseAudio input device.
  359. To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
  360. The filename to provide to the input device is a source device or the
  361. string "default"
  362. To list the PulseAudio source devices and their properties you can invoke
  363. the command @command{pactl list sources}.
  364. More information about PulseAudio can be found on @url{http://www.pulseaudio.org}.
  365. @subsection Options
  366. @table @option
  367. @item server
  368. Connect to a specific PulseAudio server, specified by an IP address.
  369. Default server is used when not provided.
  370. @item name
  371. Specify the application name PulseAudio will use when showing active clients,
  372. by default it is the @code{LIBAVFORMAT_IDENT} string.
  373. @item stream_name
  374. Specify the stream name PulseAudio will use when showing active streams,
  375. by default it is "record".
  376. @item sample_rate
  377. Specify the samplerate in Hz, by default 48kHz is used.
  378. @item channels
  379. Specify the channels in use, by default 2 (stereo) is set.
  380. @item frame_size
  381. Specify the number of bytes per frame, by default it is set to 1024.
  382. @item fragment_size
  383. Specify the minimal buffering fragment in PulseAudio, it will affect the
  384. audio latency. By default it is unset.
  385. @end table
  386. @subsection Examples
  387. Record a stream from default device:
  388. @example
  389. ffmpeg -f pulse -i default /tmp/pulse.wav
  390. @end example
  391. @section sndio
  392. sndio input device.
  393. To enable this input device during configuration you need libsndio
  394. installed on your system.
  395. The filename to provide to the input device is the device node
  396. representing the sndio input device, and is usually set to
  397. @file{/dev/audio0}.
  398. For example to grab from @file{/dev/audio0} using @command{ffmpeg} use the
  399. command:
  400. @example
  401. ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
  402. @end example
  403. @section video4linux2, v4l2
  404. Video4Linux2 input video device.
  405. "v4l2" can be used as alias for "video4linux2".
  406. If FFmpeg is built with v4l-utils support (by using the
  407. @code{--enable-libv4l2} configure option), it is possible to use it with the
  408. @code{-use_libv4l2} input device option.
  409. The name of the device to grab is a file device node, usually Linux
  410. systems tend to automatically create such nodes when the device
  411. (e.g. an USB webcam) is plugged into the system, and has a name of the
  412. kind @file{/dev/video@var{N}}, where @var{N} is a number associated to
  413. the device.
  414. Video4Linux2 devices usually support a limited set of
  415. @var{width}x@var{height} sizes and frame rates. You can check which are
  416. supported using @command{-list_formats all} for Video4Linux2 devices.
  417. Some devices, like TV cards, support one or more standards. It is possible
  418. to list all the supported standards using @command{-list_standards all}.
  419. The time base for the timestamps is 1 microsecond. Depending on the kernel
  420. version and configuration, the timestamps may be derived from the real time
  421. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  422. boot time, unaffected by NTP or manual changes to the clock). The
  423. @option{-timestamps abs} or @option{-ts abs} option can be used to force
  424. conversion into the real time clock.
  425. Some usage examples of the video4linux2 device with @command{ffmpeg}
  426. and @command{ffplay}:
  427. @itemize
  428. @item
  429. Grab and show the input of a video4linux2 device:
  430. @example
  431. ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
  432. @end example
  433. @item
  434. Grab and record the input of a video4linux2 device, leave the
  435. frame rate and size as previously set:
  436. @example
  437. ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
  438. @end example
  439. @end itemize
  440. For more information about Video4Linux, check @url{http://linuxtv.org/}.
  441. @subsection Options
  442. @table @option
  443. @item standard
  444. Set the standard. Must be the name of a supported standard. To get a
  445. list of the supported standards, use the @option{list_standards}
  446. option.
  447. @item channel
  448. Set the input channel number. Default to -1, which means using the
  449. previously selected channel.
  450. @item video_size
  451. Set the video frame size. The argument must be a string in the form
  452. @var{WIDTH}x@var{HEIGHT} or a valid size abbreviation.
  453. @item pixel_format
  454. Select the pixel format (only valid for raw video input).
  455. @item input_format
  456. Set the preferred pixel format (for raw video) or a codec name.
  457. This option allows one to select the input format, when several are
  458. available.
  459. @item framerate
  460. Set the preferred video frame rate.
  461. @item list_formats
  462. List available formats (supported pixel formats, codecs, and frame
  463. sizes) and exit.
  464. Available values are:
  465. @table @samp
  466. @item all
  467. Show all available (compressed and non-compressed) formats.
  468. @item raw
  469. Show only raw video (non-compressed) formats.
  470. @item compressed
  471. Show only compressed formats.
  472. @end table
  473. @item list_standards
  474. List supported standards and exit.
  475. Available values are:
  476. @table @samp
  477. @item all
  478. Show all supported standards.
  479. @end table
  480. @item timestamps, ts
  481. Set type of timestamps for grabbed frames.
  482. Available values are:
  483. @table @samp
  484. @item default
  485. Use timestamps from the kernel.
  486. @item abs
  487. Use absolute timestamps (wall clock).
  488. @item mono2abs
  489. Force conversion from monotonic to absolute timestamps.
  490. @end table
  491. Default value is @code{default}.
  492. @end table
  493. @section vfwcap
  494. VfW (Video for Windows) capture input device.
  495. The filename passed as input is the capture driver number, ranging from
  496. 0 to 9. You may use "list" as filename to print a list of drivers. Any
  497. other filename will be interpreted as device number 0.
  498. @section x11grab
  499. X11 video input device.
  500. This device allows one to capture a region of an X11 display.
  501. The filename passed as input has the syntax:
  502. @example
  503. [@var{hostname}]:@var{display_number}.@var{screen_number}[+@var{x_offset},@var{y_offset}]
  504. @end example
  505. @var{hostname}:@var{display_number}.@var{screen_number} specifies the
  506. X11 display name of the screen to grab from. @var{hostname} can be
  507. omitted, and defaults to "localhost". The environment variable
  508. @env{DISPLAY} contains the default display name.
  509. @var{x_offset} and @var{y_offset} specify the offsets of the grabbed
  510. area with respect to the top-left border of the X11 screen. They
  511. default to 0.
  512. Check the X11 documentation (e.g. man X) for more detailed information.
  513. Use the @command{dpyinfo} program for getting basic information about the
  514. properties of your X11 display (e.g. grep for "name" or "dimensions").
  515. For example to grab from @file{:0.0} using @command{ffmpeg}:
  516. @example
  517. ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
  518. @end example
  519. Grab at position @code{10,20}:
  520. @example
  521. ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  522. @end example
  523. @subsection Options
  524. @table @option
  525. @item draw_mouse
  526. Specify whether to draw the mouse pointer. A value of @code{0} specify
  527. not to draw the pointer. Default value is @code{1}.
  528. @item follow_mouse
  529. Make the grabbed area follow the mouse. The argument can be
  530. @code{centered} or a number of pixels @var{PIXELS}.
  531. When it is specified with "centered", the grabbing region follows the mouse
  532. pointer and keeps the pointer at the center of region; otherwise, the region
  533. follows only when the mouse pointer reaches within @var{PIXELS} (greater than
  534. zero) to the edge of region.
  535. For example:
  536. @example
  537. ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
  538. @end example
  539. To follow only when the mouse pointer reaches within 100 pixels to edge:
  540. @example
  541. ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
  542. @end example
  543. @item framerate
  544. Set the grabbing frame rate. Default value is @code{ntsc},
  545. corresponding to a frame rate of @code{30000/1001}.
  546. @item show_region
  547. Show grabbed region on screen.
  548. If @var{show_region} is specified with @code{1}, then the grabbing
  549. region will be indicated on screen. With this option, it is easy to
  550. know what is being grabbed if only a portion of the screen is grabbed.
  551. For example:
  552. @example
  553. ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  554. @end example
  555. With @var{follow_mouse}:
  556. @example
  557. ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
  558. @end example
  559. @item video_size
  560. Set the video frame size. Default value is @code{vga}.
  561. @end table
  562. @c man end INPUT DEVICES