Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
ffmpeg-devices.html2439 linesDownload Raw Back to doc
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">2<html>3<!-- Created by , GNU Texinfo 7.1.1 -->4  <head>5    <meta charset="utf-8">6    <title>7      FFmpeg Devices Documentation8    </title>9    <meta name="viewport" content="width=device-width,initial-scale=1.0">10    <link rel="stylesheet" type="text/css" href="bootstrap.min.css">11    <link rel="stylesheet" type="text/css" href="style.min.css">12  </head>13  <body>14    <div class="container">15      <h1>16      FFmpeg Devices Documentation17      </h1>18 19 20<a name="SEC_Top"></a>21 22<div class="element-contents" id="SEC_Contents">23<h2 class="contents-heading">Table of Contents</h2>24 25<div class="contents">26 27<ul class="toc-numbered-mark">28  <li><a id="toc-Description" href="#Description">1 Description</a></li>29  <li><a id="toc-Device-Options" href="#Device-Options">2 Device Options</a></li>30  <li><a id="toc-Input-Devices" href="#Input-Devices">3 Input Devices</a>31  <ul class="toc-numbered-mark">32    <li><a id="toc-alsa" href="#alsa">3.1 alsa</a>33    <ul class="toc-numbered-mark">34      <li><a id="toc-Options" href="#Options">3.1.1 Options</a></li>35    </ul></li>36    <li><a id="toc-android_005fcamera" href="#android_005fcamera">3.2 android_camera</a>37    <ul class="toc-numbered-mark">38      <li><a id="toc-Options-1" href="#Options-1">3.2.1 Options</a></li>39    </ul></li>40    <li><a id="toc-avfoundation" href="#avfoundation">3.3 avfoundation</a>41    <ul class="toc-numbered-mark">42      <li><a id="toc-Options-2" href="#Options-2">3.3.1 Options</a></li>43      <li><a id="toc-Examples" href="#Examples">3.3.2 Examples</a></li>44    </ul></li>45    <li><a id="toc-decklink" href="#decklink">3.4 decklink</a>46    <ul class="toc-numbered-mark">47      <li><a id="toc-Options-3" href="#Options-3">3.4.1 Options</a></li>48      <li><a id="toc-Examples-1" href="#Examples-1">3.4.2 Examples</a></li>49    </ul></li>50    <li><a id="toc-dshow" href="#dshow">3.5 dshow</a>51    <ul class="toc-numbered-mark">52      <li><a id="toc-Options-4" href="#Options-4">3.5.1 Options</a></li>53      <li><a id="toc-Examples-2" href="#Examples-2">3.5.2 Examples</a></li>54    </ul></li>55    <li><a id="toc-fbdev" href="#fbdev">3.6 fbdev</a>56    <ul class="toc-numbered-mark">57      <li><a id="toc-Options-5" href="#Options-5">3.6.1 Options</a></li>58    </ul></li>59    <li><a id="toc-gdigrab" href="#gdigrab">3.7 gdigrab</a>60    <ul class="toc-numbered-mark">61      <li><a id="toc-Options-6" href="#Options-6">3.7.1 Options</a></li>62    </ul></li>63    <li><a id="toc-iec61883" href="#iec61883">3.8 iec61883</a>64    <ul class="toc-numbered-mark">65      <li><a id="toc-Options-7" href="#Options-7">3.8.1 Options</a></li>66      <li><a id="toc-Examples-3" href="#Examples-3">3.8.2 Examples</a></li>67    </ul></li>68    <li><a id="toc-jack" href="#jack">3.9 jack</a>69    <ul class="toc-numbered-mark">70      <li><a id="toc-Options-8" href="#Options-8">3.9.1 Options</a></li>71    </ul></li>72    <li><a id="toc-kmsgrab" href="#kmsgrab">3.10 kmsgrab</a>73    <ul class="toc-numbered-mark">74      <li><a id="toc-Options-9" href="#Options-9">3.10.1 Options</a></li>75      <li><a id="toc-Examples-4" href="#Examples-4">3.10.2 Examples</a></li>76    </ul></li>77    <li><a id="toc-lavfi" href="#lavfi">3.11 lavfi</a>78    <ul class="toc-numbered-mark">79      <li><a id="toc-Options-10" href="#Options-10">3.11.1 Options</a></li>80      <li><a id="toc-Examples-5" href="#Examples-5">3.11.2 Examples</a></li>81    </ul></li>82    <li><a id="toc-libcdio" href="#libcdio">3.12 libcdio</a>83    <ul class="toc-numbered-mark">84      <li><a id="toc-Options-11" href="#Options-11">3.12.1 Options</a></li>85    </ul></li>86    <li><a id="toc-libdc1394" href="#libdc1394">3.13 libdc1394</a>87    <ul class="toc-numbered-mark">88      <li><a id="toc-Options-12" href="#Options-12">3.13.1 Options</a></li>89    </ul></li>90    <li><a id="toc-openal" href="#openal">3.14 openal</a>91    <ul class="toc-numbered-mark">92      <li><a id="toc-Options-13" href="#Options-13">3.14.1 Options</a></li>93      <li><a id="toc-Examples-6" href="#Examples-6">3.14.2 Examples</a></li>94    </ul></li>95    <li><a id="toc-oss" href="#oss">3.15 oss</a>96    <ul class="toc-numbered-mark">97      <li><a id="toc-Options-14" href="#Options-14">3.15.1 Options</a></li>98    </ul></li>99    <li><a id="toc-pulse" href="#pulse">3.16 pulse</a>100    <ul class="toc-numbered-mark">101      <li><a id="toc-Options-15" href="#Options-15">3.16.1 Options</a></li>102      <li><a id="toc-Examples-7" href="#Examples-7">3.16.2 Examples</a></li>103    </ul></li>104    <li><a id="toc-sndio" href="#sndio">3.17 sndio</a>105    <ul class="toc-numbered-mark">106      <li><a id="toc-Options-16" href="#Options-16">3.17.1 Options</a></li>107    </ul></li>108    <li><a id="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">3.18 video4linux2, v4l2</a>109    <ul class="toc-numbered-mark">110      <li><a id="toc-Options-17" href="#Options-17">3.18.1 Options</a></li>111    </ul></li>112    <li><a id="toc-vfwcap" href="#vfwcap">3.19 vfwcap</a>113    <ul class="toc-numbered-mark">114      <li><a id="toc-Options-18" href="#Options-18">3.19.1 Options</a></li>115    </ul></li>116    <li><a id="toc-x11grab" href="#x11grab">3.20 x11grab</a>117    <ul class="toc-numbered-mark">118      <li><a id="toc-Options-19" href="#Options-19">3.20.1 Options</a></li>119    </ul></li>120  </ul></li>121  <li><a id="toc-Output-Devices" href="#Output-Devices">4 Output Devices</a>122  <ul class="toc-numbered-mark">123    <li><a id="toc-alsa-1" href="#alsa-1">4.1 alsa</a>124    <ul class="toc-numbered-mark">125      <li><a id="toc-Examples-8" href="#Examples-8">4.1.1 Examples</a></li>126    </ul></li>127    <li><a id="toc-AudioToolbox" href="#AudioToolbox">4.2 AudioToolbox</a>128    <ul class="toc-numbered-mark">129      <li><a id="toc-Options-20" href="#Options-20">4.2.1 Options</a></li>130      <li><a id="toc-Examples-9" href="#Examples-9">4.2.2 Examples</a></li>131    </ul></li>132    <li><a id="toc-caca" href="#caca">4.3 caca</a>133    <ul class="toc-numbered-mark">134      <li><a id="toc-Options-21" href="#Options-21">4.3.1 Options</a></li>135      <li><a id="toc-Examples-10" href="#Examples-10">4.3.2 Examples</a></li>136    </ul></li>137    <li><a id="toc-decklink-1" href="#decklink-1">4.4 decklink</a>138    <ul class="toc-numbered-mark">139      <li><a id="toc-Options-22" href="#Options-22">4.4.1 Options</a></li>140      <li><a id="toc-Examples-11" href="#Examples-11">4.4.2 Examples</a></li>141    </ul></li>142    <li><a id="toc-fbdev-1" href="#fbdev-1">4.5 fbdev</a>143    <ul class="toc-numbered-mark">144      <li><a id="toc-Options-23" href="#Options-23">4.5.1 Options</a></li>145      <li><a id="toc-Examples-12" href="#Examples-12">4.5.2 Examples</a></li>146    </ul></li>147    <li><a id="toc-oss-1" href="#oss-1">4.6 oss</a></li>148    <li><a id="toc-pulse-1" href="#pulse-1">4.7 pulse</a>149    <ul class="toc-numbered-mark">150      <li><a id="toc-Options-24" href="#Options-24">4.7.1 Options</a></li>151      <li><a id="toc-Examples-13" href="#Examples-13">4.7.2 Examples</a></li>152    </ul></li>153    <li><a id="toc-sndio-1" href="#sndio-1">4.8 sndio</a></li>154    <li><a id="toc-v4l2" href="#v4l2">4.9 v4l2</a></li>155    <li><a id="toc-xv" href="#xv">4.10 xv</a>156    <ul class="toc-numbered-mark">157      <li><a id="toc-Options-25" href="#Options-25">4.10.1 Options</a></li>158      <li><a id="toc-Examples-14" href="#Examples-14">4.10.2 Examples</a></li>159    </ul></li>160  </ul></li>161  <li><a id="toc-See-Also" href="#See-Also">5 See Also</a></li>162  <li><a id="toc-Authors" href="#Authors">6 Authors</a></li>163</ul>164</div>165</div>166 167<a name="Description"></a>168<h2 class="chapter">1 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>169 170<p>This document describes the input and output devices provided by the171libavdevice library.172</p>173 174<a name="Device-Options"></a>175<h2 class="chapter">2 Device Options<span class="pull-right"><a class="anchor hidden-xs" href="#Device-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Device-Options" aria-hidden="true">TOC</a></span></h2>176 177<p>The libavdevice library provides the same interface as178libavformat. Namely, an input device is considered like a demuxer, and179an output device like a muxer, and the interface and generic device180options are the same provided by libavformat (see the ffmpeg-formats181manual).182</p>183<p>In addition each input or output device may support so-called private184options, which are specific for that component.185</p>186<p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the187FFmpeg tools, or by setting the value explicitly in the device188<code class="code">AVFormatContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API189for programmatic use.190</p>191 192<a name="Input-Devices"></a>193<h2 class="chapter">3 Input Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Input-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Input-Devices" aria-hidden="true">TOC</a></span></h2>194 195<p>Input devices are configured elements in FFmpeg which enable accessing196the data coming from a multimedia device attached to your system.197</p>198<p>When you configure your FFmpeg build, all the supported input devices199are enabled by default. You can list all available ones using the200configure option &quot;&ndash;list-indevs&quot;.201</p>202<p>You can disable all the input devices using the configure option203&quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the204option &quot;&ndash;enable-indev=<var class="var">INDEV</var>&quot;, or you can disable a particular205input device using the option &quot;&ndash;disable-indev=<var class="var">INDEV</var>&quot;.206</p>207<p>The option &quot;-devices&quot; of the ff* tools will display the list of208supported input devices.209</p>210<p>A description of the currently available input devices follows.211</p>212<a name="alsa"></a>213<h3 class="section">3.1 alsa<span class="pull-right"><a class="anchor hidden-xs" href="#alsa" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alsa" aria-hidden="true">TOC</a></span></h3>214 215<p>ALSA (Advanced Linux Sound Architecture) input device.216</p>217<p>To enable this input device during configuration you need libasound218installed on your system.219</p>220<p>This device allows capturing from an ALSA device. The name of the221device to capture has to be an ALSA card identifier.222</p>223<p>An ALSA identifier has the syntax:224</p><div class="example">225<pre class="example-preformatted">hw:<var class="var">CARD</var>[,<var class="var">DEV</var>[,<var class="var">SUBDEV</var>]]226</pre></div>227 228<p>where the <var class="var">DEV</var> and <var class="var">SUBDEV</var> components are optional.229</p>230<p>The three arguments (in order: <var class="var">CARD</var>,<var class="var">DEV</var>,<var class="var">SUBDEV</var>)231specify card number or identifier, device number and subdevice number232(-1 means any).233</p>234<p>To see the list of cards currently recognized by your system check the235files <samp class="file">/proc/asound/cards</samp> and <samp class="file">/proc/asound/devices</samp>.236</p>237<p>For example to capture with <code class="command">ffmpeg</code> from an ALSA device with238card id 0, you may run the command:239</p><div class="example">240<pre class="example-preformatted">ffmpeg -f alsa -i hw:0 alsaout.wav241</pre></div>242 243<p>For more information see:244<a class="url" href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>245</p>246<a name="Options"></a>247<h4 class="subsection">3.1.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options" aria-hidden="true">TOC</a></span></h4>248 249<dl class="table">250<dt><samp class="option">sample_rate</samp></dt>251<dd><p>Set the sample rate in Hz. Default is 48000.252</p>253</dd>254<dt><samp class="option">channels</samp></dt>255<dd><p>Set the number of channels. Default is 2.256</p>257</dd>258</dl>259 260<a name="android_005fcamera"></a>261<h3 class="section">3.2 android_camera<span class="pull-right"><a class="anchor hidden-xs" href="#android_005fcamera" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-android_005fcamera" aria-hidden="true">TOC</a></span></h3>262 263<p>Android camera input device.264</p>265<p>This input devices uses the Android Camera2 NDK API which is266available on devices with API level 24+. The availability of267android_camera is autodetected during configuration.268</p>269<p>This device allows capturing from all cameras on an Android device,270which are integrated into the Camera2 NDK API.271</p>272<p>The available cameras are enumerated internally and can be selected273with the <var class="var">camera_index</var> parameter. The input file string is274discarded.275</p>276<p>Generally the back facing camera has index 0 while the front facing277camera has index 1.278</p>279<a name="Options-1"></a>280<h4 class="subsection">3.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-1" aria-hidden="true">TOC</a></span></h4>281 282<dl class="table">283<dt><samp class="option">video_size</samp></dt>284<dd><p>Set the video size given as a string such as 640x480 or hd720.285Falls back to the first available configuration reported by286Android if requested video size is not available or by default.287</p>288</dd>289<dt><samp class="option">framerate</samp></dt>290<dd><p>Set the video framerate.291Falls back to the first available configuration reported by292Android if requested framerate is not available or by default (-1).293</p>294</dd>295<dt><samp class="option">camera_index</samp></dt>296<dd><p>Set the index of the camera to use. Default is 0.297</p>298</dd>299<dt><samp class="option">input_queue_size</samp></dt>300<dd><p>Set the maximum number of frames to buffer. Default is 5.301</p>302</dd>303</dl>304 305<a name="avfoundation"></a>306<h3 class="section">3.3 avfoundation<span class="pull-right"><a class="anchor hidden-xs" href="#avfoundation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avfoundation" aria-hidden="true">TOC</a></span></h3>307 308<p>AVFoundation input device.309</p>310<p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.311</p>312<p>The input filename has to be given in the following syntax:313</p><div class="example">314<pre class="example-preformatted">-i &quot;[[VIDEO]:[AUDIO]]&quot;315</pre></div>316<p>The first entry selects the video input while the latter selects the audio input.317The stream has to be specified by the device name or the device index as shown by the device list.318Alternatively, the video and/or audio input device can be chosen by index using the319<samp class="option">320    -video_device_index &lt;INDEX&gt;321</samp>322and/or323<samp class="option">324    -audio_device_index &lt;INDEX&gt;325</samp>326, overriding any327device name or index given in the input filename.328</p>329<p>All available devices can be enumerated by using <samp class="option">-list_devices true</samp>, listing330all device names and corresponding indices.331</p>332<p>There are two device name aliases:333</p><dl class="table">334<dt><code class="code">default</code></dt>335<dd><p>Select the AVFoundation default device of the corresponding type.336</p>337</dd>338<dt><code class="code">none</code></dt>339<dd><p>Do not record the corresponding media type.340This is equivalent to specifying an empty device name or index.341</p>342</dd>343</dl>344 345<a name="Options-2"></a>346<h4 class="subsection">3.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-2" aria-hidden="true">TOC</a></span></h4>347 348<p>AVFoundation supports the following options:349</p>350<dl class="table">351<dt><samp class="option">-list_devices &lt;TRUE|FALSE&gt;</samp></dt>352<dd><p>If set to true, a list of all available input devices is given showing all353device names and indices.354</p>355</dd>356<dt><samp class="option">-video_device_index &lt;INDEX&gt;</samp></dt>357<dd><p>Specify the video device by its index. Overrides anything given in the input filename.358</p>359</dd>360<dt><samp class="option">-audio_device_index &lt;INDEX&gt;</samp></dt>361<dd><p>Specify the audio device by its index. Overrides anything given in the input filename.362</p>363</dd>364<dt><samp class="option">-pixel_format &lt;FORMAT&gt;</samp></dt>365<dd><p>Request the video device to use a specific pixel format.366If the specified format is not supported, a list of available formats is given367and the first one in this list is used instead. Available pixel formats are:368<code class="code">monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,369 bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,370 yuv420p, nv12, yuyv422, gray</code>371</p>372</dd>373<dt><samp class="option">-framerate</samp></dt>374<dd><p>Set the grabbing frame rate. Default is <code class="code">ntsc</code>, corresponding to a375frame rate of <code class="code">30000/1001</code>.376</p>377</dd>378<dt><samp class="option">-video_size</samp></dt>379<dd><p>Set the video frame size.380</p>381</dd>382<dt><samp class="option">-capture_cursor</samp></dt>383<dd><p>Capture the mouse pointer. Default is 0.384</p>385</dd>386<dt><samp class="option">-capture_mouse_clicks</samp></dt>387<dd><p>Capture the screen mouse clicks. Default is 0.388</p>389</dd>390<dt><samp class="option">-capture_raw_data</samp></dt>391<dd><p>Capture the raw device data. Default is 0.392Using this option may result in receiving the underlying data delivered to the AVFoundation framework. E.g. for muxed devices that sends raw DV data to the framework (like tape-based camcorders), setting this option to false results in extracted video frames captured in the designated pixel format only. Setting this option to true results in receiving the raw DV stream untouched.393</p></dd>394</dl>395 396<a name="Examples"></a>397<h4 class="subsection">3.3.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples" aria-hidden="true">TOC</a></span></h4>398 399<ul class="itemize mark-bullet">400<li>Print the list of AVFoundation supported devices and exit:401<div class="example">402<pre class="example-preformatted">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;403</pre></div>404 405</li><li>Record video from video device 0 and audio from audio device 0 into out.avi:406<div class="example">407<pre class="example-preformatted">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi408</pre></div>409 410</li><li>Record video from video device 2 and audio from audio device 1 into out.avi:411<div class="example">412<pre class="example-preformatted">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi413</pre></div>414 415</li><li>Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:416<div class="example">417<pre class="example-preformatted">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi418</pre></div>419 420</li><li>Record raw DV data from a suitable input device and write the output into out.dv:421<div class="example">422<pre class="example-preformatted">$ ffmpeg -f avfoundation -capture_raw_data true -i &quot;zr100:none&quot; out.dv423</pre></div>424 425 426</li></ul>427 428<a name="decklink"></a>429<h3 class="section">3.4 decklink<span class="pull-right"><a class="anchor hidden-xs" href="#decklink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decklink" aria-hidden="true">TOC</a></span></h3>430 431<p>The decklink input device provides capture capabilities for Blackmagic432DeckLink devices.433</p>434<p>To enable this input device, you need the Blackmagic DeckLink SDK and you435need to configure with the appropriate <code class="code">--extra-cflags</code>436and <code class="code">--extra-ldflags</code>.437On Windows, you need to run the IDL files through <code class="command">widl</code>.438</p>439<p>DeckLink is very picky about the formats it supports. Pixel format of the440input can be set with <samp class="option">raw_format</samp>.441Framerate and video size must be determined for your device with442<code class="command">-list_formats 1</code>. Audio sample rate is always 48 kHz and the number443of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single444audio track.445</p>446<a name="Options-3"></a>447<h4 class="subsection">3.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-3" aria-hidden="true">TOC</a></span></h4>448 449<dl class="table">450<dt><samp class="option">list_devices</samp></dt>451<dd><p>If set to <samp class="option">true</samp>, print a list of devices and exit.452Defaults to <samp class="option">false</samp>. This option is deprecated, please use the453<code class="code">-sources</code> option of ffmpeg to list the available input devices.454</p>455</dd>456<dt><samp class="option">list_formats</samp></dt>457<dd><p>If set to <samp class="option">true</samp>, print a list of supported formats and exit.458Defaults to <samp class="option">false</samp>.459</p>460</dd>461<dt><samp class="option">format_code &lt;FourCC&gt;</samp></dt>462<dd><p>This sets the input video format to the format given by the FourCC. To see463the supported values of your device(s) use <samp class="option">list_formats</samp>.464Note that there is a FourCC <samp class="option">'pal '</samp> that can also be used465as <samp class="option">pal</samp> (3 letters).466Default behavior is autodetection of the input video format, if the hardware467supports it.468</p>469</dd>470<dt><samp class="option">raw_format</samp></dt>471<dd><p>Set the pixel format of the captured video.472Available values are:473</p><dl class="table">474<dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>475<dd>476<p>This is the default which means 8-bit YUV 422 or 8-bit ARGB if format477autodetection is used, 8-bit YUV 422 otherwise.478</p>479</dd>480<dt>&lsquo;<samp class="samp">uyvy422</samp>&rsquo;</dt>481<dd>482<p>8-bit YUV 422.483</p>484</dd>485<dt>&lsquo;<samp class="samp">yuv422p10</samp>&rsquo;</dt>486<dd>487<p>10-bit YUV 422.488</p>489</dd>490<dt>&lsquo;<samp class="samp">argb</samp>&rsquo;</dt>491<dd>492<p>8-bit RGB.493</p>494</dd>495<dt>&lsquo;<samp class="samp">bgra</samp>&rsquo;</dt>496<dd>497<p>8-bit RGB.498</p>499</dd>500<dt>&lsquo;<samp class="samp">rgb10</samp>&rsquo;</dt>501<dd>502<p>10-bit RGB.503</p>504</dd>505</dl>506 507</dd>508<dt><samp class="option">teletext_lines</samp></dt>509<dd><p>If set to nonzero, an additional teletext stream will be captured from the510vertical ancillary data. Both SD PAL (576i) and HD (1080i or 1080p)511sources are supported. In case of HD sources, OP47 packets are decoded.512</p>513<p>This option is a bitmask of the SD PAL VBI lines captured, specifically lines 6514to 22, and lines 318 to 335. Line 6 is the LSB in the mask. Selected lines515which do not contain teletext information will be ignored. You can use the516special <samp class="option">all</samp> constant to select all possible lines, or517<samp class="option">standard</samp> to skip lines 6, 318 and 319, which are not compatible with518all receivers.519</p>520<p>For SD sources, ffmpeg needs to be compiled with <code class="code">--enable-libzvbi</code>. For521HD sources, on older (pre-4K) DeckLink card models you have to capture in 10522bit mode.523</p>524</dd>525<dt><samp class="option">channels</samp></dt>526<dd><p>Defines number of audio channels to capture. Must be &lsquo;<samp class="samp">2</samp>&rsquo;, &lsquo;<samp class="samp">8</samp>&rsquo; or &lsquo;<samp class="samp">16</samp>&rsquo;.527Defaults to &lsquo;<samp class="samp">2</samp>&rsquo;.528</p>529</dd>530<dt><samp class="option">duplex_mode</samp></dt>531<dd><p>Sets the decklink device duplex/profile mode. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">half</samp>&rsquo;, &lsquo;<samp class="samp">full</samp>&rsquo;,532&lsquo;<samp class="samp">one_sub_device_full</samp>&rsquo;, &lsquo;<samp class="samp">one_sub_device_half</samp>&rsquo;, &lsquo;<samp class="samp">two_sub_device_full</samp>&rsquo;,533&lsquo;<samp class="samp">four_sub_device_half</samp>&rsquo;534Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.535</p>536<p>Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property.537For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2538sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile539is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles.540</p>541<p>Valid profile modes for DeckLink 8K Pro(with DeckLink SDK &gt;= 11.0):542&lsquo;<samp class="samp">one_sub_device_full</samp>&rsquo;, &lsquo;<samp class="samp">one_sub_device_half</samp>&rsquo;, &lsquo;<samp class="samp">two_sub_device_full</samp>&rsquo;,543&lsquo;<samp class="samp">four_sub_device_half</samp>&rsquo;544</p>545<p>Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2:546&lsquo;<samp class="samp">half</samp>&rsquo;, &lsquo;<samp class="samp">full</samp>&rsquo;547</p>548</dd>549<dt><samp class="option">timecode_format</samp></dt>550<dd><p>Timecode type to include in the frame and video stream metadata. Must be551&lsquo;<samp class="samp">none</samp>&rsquo;, &lsquo;<samp class="samp">rp188vitc</samp>&rsquo;, &lsquo;<samp class="samp">rp188vitc2</samp>&rsquo;, &lsquo;<samp class="samp">rp188ltc</samp>&rsquo;,552&lsquo;<samp class="samp">rp188hfr</samp>&rsquo;, &lsquo;<samp class="samp">rp188any</samp>&rsquo;, &lsquo;<samp class="samp">vitc</samp>&rsquo;, &lsquo;<samp class="samp">vitc2</samp>&rsquo;, or &lsquo;<samp class="samp">serial</samp>&rsquo;.553Defaults to &lsquo;<samp class="samp">none</samp>&rsquo; (not included).554</p>555<p>In order to properly support 50/60 fps timecodes, the ordering of the queried556timecode types for &lsquo;<samp class="samp">rp188any</samp>&rsquo; is HFR, VITC1, VITC2 and LTC for &gt;30 fps557content. Note that this is slightly different to the ordering used by the558DeckLink API, which is HFR, VITC1, LTC, VITC2.559</p>560</dd>561<dt><samp class="option">video_input</samp></dt>562<dd><p>Sets the video input source. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">sdi</samp>&rsquo;, &lsquo;<samp class="samp">hdmi</samp>&rsquo;,563&lsquo;<samp class="samp">optical_sdi</samp>&rsquo;, &lsquo;<samp class="samp">component</samp>&rsquo;, &lsquo;<samp class="samp">composite</samp>&rsquo; or &lsquo;<samp class="samp">s_video</samp>&rsquo;.564Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.565</p>566</dd>567<dt><samp class="option">audio_input</samp></dt>568<dd><p>Sets the audio input source. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">embedded</samp>&rsquo;,569&lsquo;<samp class="samp">aes_ebu</samp>&rsquo;, &lsquo;<samp class="samp">analog</samp>&rsquo;, &lsquo;<samp class="samp">analog_xlr</samp>&rsquo;, &lsquo;<samp class="samp">analog_rca</samp>&rsquo; or570&lsquo;<samp class="samp">microphone</samp>&rsquo;. Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.571</p>572</dd>573<dt><samp class="option">video_pts</samp></dt>574<dd><p>Sets the video packet timestamp source. Must be &lsquo;<samp class="samp">video</samp>&rsquo;, &lsquo;<samp class="samp">audio</samp>&rsquo;,575&lsquo;<samp class="samp">reference</samp>&rsquo;, &lsquo;<samp class="samp">wallclock</samp>&rsquo; or &lsquo;<samp class="samp">abs_wallclock</samp>&rsquo;.576Defaults to &lsquo;<samp class="samp">video</samp>&rsquo;.577</p>578</dd>579<dt><samp class="option">audio_pts</samp></dt>580<dd><p>Sets the audio packet timestamp source. Must be &lsquo;<samp class="samp">video</samp>&rsquo;, &lsquo;<samp class="samp">audio</samp>&rsquo;,581&lsquo;<samp class="samp">reference</samp>&rsquo;, &lsquo;<samp class="samp">wallclock</samp>&rsquo; or &lsquo;<samp class="samp">abs_wallclock</samp>&rsquo;.582Defaults to &lsquo;<samp class="samp">audio</samp>&rsquo;.583</p>584</dd>585<dt><samp class="option">draw_bars</samp></dt>586<dd><p>If set to &lsquo;<samp class="samp">true</samp>&rsquo;, color bars are drawn in the event of a signal loss.587Defaults to &lsquo;<samp class="samp">true</samp>&rsquo;.588This option is deprecated, please use the <code class="code">signal_loss_action</code> option.589</p>590</dd>591<dt><samp class="option">signal_loss_action</samp></dt>592<dd><p>Sets the action to take in the event of a signal loss. Accepts one of the593following values:594</p>595<dl class="table">596<dt><samp class="option">1, none</samp></dt>597<dd><p>Do nothing on signal loss. This usually results in black frames.598</p></dd>599<dt><samp class="option">2, bars</samp></dt>600<dd><p>Draw color bars on signal loss. Only supported for 8-bit input signals.601</p></dd>602<dt><samp class="option">3, repeat</samp></dt>603<dd><p>Repeat the last video frame on signal loss.604</p></dd>605</dl>606 607<p>Defaults to &lsquo;<samp class="samp">bars</samp>&rsquo;.608</p>609</dd>610<dt><samp class="option">queue_size</samp></dt>611<dd><p>Sets maximum input buffer size in bytes. If the buffering reaches this value,612incoming frames will be dropped.613Defaults to &lsquo;<samp class="samp">1073741824</samp>&rsquo;.614</p>615</dd>616<dt><samp class="option">audio_depth</samp></dt>617<dd><p>Sets the audio sample bit depth. Must be &lsquo;<samp class="samp">16</samp>&rsquo; or &lsquo;<samp class="samp">32</samp>&rsquo;.618Defaults to &lsquo;<samp class="samp">16</samp>&rsquo;.619</p>620</dd>621<dt><samp class="option">decklink_copyts</samp></dt>622<dd><p>If set to <samp class="option">true</samp>, timestamps are forwarded as they are without removing623the initial offset.624Defaults to <samp class="option">false</samp>.625</p>626</dd>627<dt><samp class="option">timestamp_align</samp></dt>628<dd><p>Capture start time alignment in seconds. If set to nonzero, input frames are629dropped till the system timestamp aligns with configured value.630Alignment difference of up to one frame duration is tolerated.631This is useful for maintaining input synchronization across N different632hardware devices deployed for &rsquo;N-way&rsquo; redundancy. The system time of different633hardware devices should be synchronized with protocols such as NTP or PTP,634before using this option.635Note that this method is not foolproof. In some border cases input636synchronization may not happen due to thread scheduling jitters in the OS.637Either sync could go wrong by 1 frame or in a rarer case638<samp class="option">timestamp_align</samp> seconds.639Defaults to &lsquo;<samp class="samp">0</samp>&rsquo;.640</p>641</dd>642<dt><samp class="option">wait_for_tc (<em class="emph">bool</em>)</samp></dt>643<dd><p>Drop frames till a frame with timecode is received. Sometimes serial timecode644isn&rsquo;t received with the first input frame. If that happens, the stored stream645timecode will be inaccurate. If this option is set to <samp class="option">true</samp>, input frames646are dropped till a frame with timecode is received.647Option <var class="var">timecode_format</var> must be specified.648Defaults to <samp class="option">false</samp>.649</p>650</dd>651<dt><samp class="option">enable_klv(<em class="emph">bool</em>)</samp></dt>652<dd><p>If set to <samp class="option">true</samp>, extracts KLV data from VANC and outputs KLV packets.653KLV VANC packets are joined based on MID and PSC fields and aggregated into654one KLV packet.655Defaults to <samp class="option">false</samp>.656</p>657</dd>658</dl>659 660<a name="Examples-1"></a>661<h4 class="subsection">3.4.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-1" aria-hidden="true">TOC</a></span></h4>662 663<ul class="itemize mark-bullet">664<li>List input devices:665<div class="example">666<pre class="example-preformatted">ffmpeg -sources decklink667</pre></div>668 669</li><li>List supported formats:670<div class="example">671<pre class="example-preformatted">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'672</pre></div>673 674</li><li>Capture video clip at 1080i50:675<div class="example">676<pre class="example-preformatted">ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi677</pre></div>678 679</li><li>Capture video clip at 1080i50 10 bit:680<div class="example">681<pre class="example-preformatted">ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi682</pre></div>683 684</li><li>Capture video clip at 1080i50 with 16 audio channels:685<div class="example">686<pre class="example-preformatted">ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi687</pre></div>688 689</li></ul>690 691<a name="dshow"></a>692<h3 class="section">3.5 dshow<span class="pull-right"><a class="anchor hidden-xs" href="#dshow" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dshow" aria-hidden="true">TOC</a></span></h3>693 694<p>Windows DirectShow input device.695</p>696<p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.697Currently only audio and video devices are supported.698</p>699<p>Multiple devices may be opened as separate inputs, but they may also be700opened on the same input, which should improve synchronism between them.701</p>702<p>The input name should be in the format:703</p>704<div class="example">705<pre class="example-preformatted"><var class="var">TYPE</var>=<var class="var">NAME</var>[:<var class="var">TYPE</var>=<var class="var">NAME</var>]706</pre></div>707 708<p>where <var class="var">TYPE</var> can be either <var class="var">audio</var> or <var class="var">video</var>,709and <var class="var">NAME</var> is the device&rsquo;s name or alternative name..710</p>711<a name="Options-4"></a>712<h4 class="subsection">3.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-4" aria-hidden="true">TOC</a></span></h4>713 714<p>If no options are specified, the device&rsquo;s defaults are used.715If the device does not support the requested options, it will716fail to open.717</p>718<dl class="table">719<dt><samp class="option">video_size</samp></dt>720<dd><p>Set the video size in the captured video.721</p>722</dd>723<dt><samp class="option">framerate</samp></dt>724<dd><p>Set the frame rate in the captured video.725</p>726</dd>727<dt><samp class="option">sample_rate</samp></dt>728<dd><p>Set the sample rate (in Hz) of the captured audio.729</p>730</dd>731<dt><samp class="option">sample_size</samp></dt>732<dd><p>Set the sample size (in bits) of the captured audio.733</p>734</dd>735<dt><samp class="option">channels</samp></dt>736<dd><p>Set the number of channels in the captured audio.737</p>738</dd>739<dt><samp class="option">list_devices</samp></dt>740<dd><p>If set to <samp class="option">true</samp>, print a list of devices and exit.741</p>742</dd>743<dt><samp class="option">list_options</samp></dt>744<dd><p>If set to <samp class="option">true</samp>, print a list of selected device&rsquo;s options745and exit.746</p>747</dd>748<dt><samp class="option">video_device_number</samp></dt>749<dd><p>Set video device number for devices with the same name (starts at 0,750defaults to 0).751</p>752</dd>753<dt><samp class="option">audio_device_number</samp></dt>754<dd><p>Set audio device number for devices with the same name (starts at 0,755defaults to 0).756</p>757</dd>758<dt><samp class="option">pixel_format</samp></dt>759<dd><p>Select pixel format to be used by DirectShow. This may only be set when760the video codec is not set or set to rawvideo.761</p>762</dd>763<dt><samp class="option">audio_buffer_size</samp></dt>764<dd><p>Set audio device buffer size in milliseconds (which can directly765impact latency, depending on the device).766Defaults to using the audio device&rsquo;s767default buffer size (typically some multiple of 500ms).768Setting this value too low can degrade performance.769See also770<a class="url" href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx</a>771</p>772</dd>773<dt><samp class="option">video_pin_name</samp></dt>774<dd><p>Select video capture pin to use by name or alternative name.775</p>776</dd>777<dt><samp class="option">audio_pin_name</samp></dt>778<dd><p>Select audio capture pin to use by name or alternative name.779</p>780</dd>781<dt><samp class="option">crossbar_video_input_pin_number</samp></dt>782<dd><p>Select video input pin number for crossbar device. This will be783routed to the crossbar device&rsquo;s Video Decoder output pin.784Note that changing this value can affect future invocations785(sets a new default) until system reboot occurs.786</p>787</dd>788<dt><samp class="option">crossbar_audio_input_pin_number</samp></dt>789<dd><p>Select audio input pin number for crossbar device. This will be790routed to the crossbar device&rsquo;s Audio Decoder output pin.791Note that changing this value can affect future invocations792(sets a new default) until system reboot occurs.793</p>794</dd>795<dt><samp class="option">show_video_device_dialog</samp></dt>796<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display dialog797to the end user, allowing them to change video filter properties798and configurations manually.799Note that for crossbar devices, adjusting values in this dialog800may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)801input frame rates, sizes, interlacing, etc.  Changing these values can802enable different scan rates/frame rates and avoiding green bars at803the bottom, flickering scan lines, etc.804Note that with some devices, changing these properties can also affect future805invocations (sets new defaults) until system reboot occurs.806</p>807</dd>808<dt><samp class="option">show_audio_device_dialog</samp></dt>809<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display dialog810to the end user, allowing them to change audio filter properties811and configurations manually.812</p>813</dd>814<dt><samp class="option">show_video_crossbar_connection_dialog</samp></dt>815<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display816dialog to the end user, allowing them to manually817modify crossbar pin routings, when it opens a video device.818</p>819</dd>820<dt><samp class="option">show_audio_crossbar_connection_dialog</samp></dt>821<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display822dialog to the end user, allowing them to manually823modify crossbar pin routings, when it opens an audio device.824</p>825</dd>826<dt><samp class="option">show_analog_tv_tuner_dialog</samp></dt>827<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display828dialog to the end user, allowing them to manually829modify TV channels and frequencies.830</p>831</dd>832<dt><samp class="option">show_analog_tv_tuner_audio_dialog</samp></dt>833<dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display834dialog to the end user, allowing them to manually835modify TV audio (like mono vs. stereo, Language A,B or C).836</p>837</dd>838<dt><samp class="option">audio_device_load</samp></dt>839<dd><p>Load an audio capture filter device from file instead of searching840it by name. It may load additional parameters too, if the filter841supports the serialization of its properties to.842To use this an audio capture source has to be specified, but it can843be anything even fake one.844</p>845</dd>846<dt><samp class="option">audio_device_save</samp></dt>847<dd><p>Save the currently used audio capture filter device and its848parameters (if the filter supports it) to a file.849If a file with the same name exists it will be overwritten.850</p>851</dd>852<dt><samp class="option">video_device_load</samp></dt>853<dd><p>Load a video capture filter device from file instead of searching854it by name. It may load additional parameters too, if the filter855supports the serialization of its properties to.856To use this a video capture source has to be specified, but it can857be anything even fake one.858</p>859</dd>860<dt><samp class="option">video_device_save</samp></dt>861<dd><p>Save the currently used video capture filter device and its862parameters (if the filter supports it) to a file.863If a file with the same name exists it will be overwritten.864</p>865</dd>866<dt><samp class="option">use_video_device_timestamps</samp></dt>867<dd><p>If set to <samp class="option">false</samp>, the timestamp for video frames will be868derived from the wallclock instead of the timestamp provided by869the capture device. This allows working around devices that870provide unreliable timestamps.871</p>872</dd>873</dl>874 875<a name="Examples-2"></a>876<h4 class="subsection">3.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-2" aria-hidden="true">TOC</a></span></h4>877 878<ul class="itemize mark-bullet">879<li>Print the list of DirectShow supported devices and exit:880<div class="example">881<pre class="example-preformatted">$ ffmpeg -list_devices true -f dshow -i dummy882</pre></div>883 884</li><li>Open video device <var class="var">Camera</var>:885<div class="example">886<pre class="example-preformatted">$ ffmpeg -f dshow -i video=&quot;Camera&quot;887</pre></div>888 889</li><li>Open second video device with name <var class="var">Camera</var>:890<div class="example">891<pre class="example-preformatted">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;892</pre></div>893 894</li><li>Open video device <var class="var">Camera</var> and audio device <var class="var">Microphone</var>:895<div class="example">896<pre class="example-preformatted">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;897</pre></div>898 899</li><li>Print the list of supported options in selected device and exit:900<div class="example">901<pre class="example-preformatted">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;902</pre></div>903 904</li><li>Specify pin names to capture by name or alternative name, specify alternative device name:905<div class="example">906<pre class="example-preformatted">$ ffmpeg -f dshow -audio_pin_name &quot;Audio Out&quot; -video_pin_name 2 -i video=video=&quot;@device_pnp_\\?\pci#ven_1a0a&amp;dev_6200&amp;subsys_62021461&amp;rev_01#4&amp;e2c7dd6&amp;0&amp;00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}&quot;:audio=&quot;Microphone&quot;907</pre></div>908 909</li><li>Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:910<div class="example">911<pre class="example-preformatted">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0912     -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;913</pre></div>914 915</li></ul>916 917<a name="fbdev"></a>918<h3 class="section">3.6 fbdev<span class="pull-right"><a class="anchor hidden-xs" href="#fbdev" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fbdev" aria-hidden="true">TOC</a></span></h3>919 920<p>Linux framebuffer input device.921</p>922<p>The Linux framebuffer is a graphic hardware-independent abstraction923layer to show graphics on a computer monitor, typically on the924console. It is accessed through a file device node, usually925<samp class="file">/dev/fb0</samp>.926</p>927<p>For more detailed information read the file928Documentation/fb/framebuffer.txt included in the Linux source tree.929</p>930<p>See also <a class="url" href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).931</p>932<p>To record from the framebuffer device <samp class="file">/dev/fb0</samp> with933<code class="command">ffmpeg</code>:934</p><div class="example">935<pre class="example-preformatted">ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi936</pre></div>937 938<p>You can take a single screenshot image with the command:939</p><div class="example">940<pre class="example-preformatted">ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg941</pre></div>942 943<a name="Options-5"></a>944<h4 class="subsection">3.6.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-5" aria-hidden="true">TOC</a></span></h4>945 946<dl class="table">947<dt><samp class="option">framerate</samp></dt>948<dd><p>Set the frame rate. Default is 25.949</p>950</dd>951</dl>952 953<a name="gdigrab"></a>954<h3 class="section">3.7 gdigrab<span class="pull-right"><a class="anchor hidden-xs" href="#gdigrab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gdigrab" aria-hidden="true">TOC</a></span></h3>955 956<p>Win32 GDI-based screen capture device.957</p>958<p>This device allows you to capture a region of the display on Windows.959</p>960<p>Amongst options for the input filenames are such elements as:961</p><div class="example">962<pre class="example-preformatted">desktop963</pre></div>964<p>or965</p><div class="example">966<pre class="example-preformatted">title=<var class="var">window_title</var>967</pre></div>968<p>or969</p><div class="example">970<pre class="example-preformatted">hwnd=<var class="var">window_hwnd</var>971</pre></div>972 973<p>The first option will capture the entire desktop, or a fixed region of the974desktop. The second and third options will instead capture the contents of a single975window, regardless of its position on the screen.976</p>977<p>For example, to grab the entire desktop using <code class="command">ffmpeg</code>:978</p><div class="example">979<pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg980</pre></div>981 982<p>Grab a 640x480 region at position <code class="code">10,20</code>:983</p><div class="example">984<pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg985</pre></div>986 987<p>Grab the contents of the window named &quot;Calculator&quot;988</p><div class="example">989<pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg990</pre></div>991 992<a name="Options-6"></a>993<h4 class="subsection">3.7.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-6" aria-hidden="true">TOC</a></span></h4>994 995<dl class="table">996<dt><samp class="option">draw_mouse</samp></dt>997<dd><p>Specify whether to draw the mouse pointer. Use the value <code class="code">0</code> to998not draw the pointer. Default value is <code class="code">1</code>.999</p>1000</dd>1001<dt><samp class="option">framerate</samp></dt>1002<dd><p>Set the grabbing frame rate. Default value is <code class="code">ntsc</code>,1003corresponding to a frame rate of <code class="code">30000/1001</code>.1004</p>1005</dd>1006<dt><samp class="option">show_region</samp></dt>1007<dd><p>Show grabbed region on screen.1008</p>1009<p>If <var class="var">show_region</var> is specified with <code class="code">1</code>, then the grabbing1010region will be indicated on screen. With this option, it is easy to1011know what is being grabbed if only a portion of the screen is grabbed.1012</p>1013<p>Note that <var class="var">show_region</var> is incompatible with grabbing the contents1014of a single window.1015</p>1016<p>For example:1017</p><div class="example">1018<pre class="example-preformatted">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg1019</pre></div>1020 1021</dd>1022<dt><samp class="option">video_size</samp></dt>1023<dd><p>Set the video frame size. The default is to capture the full screen if <samp class="file">desktop</samp> is selected, or the full window size if <samp class="file">title=<var class="var">window_title</var></samp> is selected.1024</p>1025</dd>1026<dt><samp class="option">offset_x</samp></dt>1027<dd><p>When capturing a region with <var class="var">video_size</var>, set the distance from the left edge of the screen or desktop.1028</p>1029<p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned to the left of your primary monitor, you will need to use a negative <var class="var">offset_x</var> value to move the region to that monitor.1030</p>1031</dd>1032<dt><samp class="option">offset_y</samp></dt>1033<dd><p>When capturing a region with <var class="var">video_size</var>, set the distance from the top edge of the screen or desktop.1034</p>1035<p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned above your primary monitor, you will need to use a negative <var class="var">offset_y</var> value to move the region to that monitor.1036</p>1037</dd>1038</dl>1039 1040<a name="iec61883"></a>1041<h3 class="section">3.8 iec61883<span class="pull-right"><a class="anchor hidden-xs" href="#iec61883" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-iec61883" aria-hidden="true">TOC</a></span></h3>1042 1043<p>FireWire DV/HDV input device using libiec61883.1044</p>1045<p>To enable this input device, you need libiec61883, libraw1394 and1046libavc1394 installed on your system. Use the configure option1047<code class="code">--enable-libiec61883</code> to compile with the device enabled.1048</p>1049<p>The iec61883 capture device supports capturing from a video device1050connected via IEEE1394 (FireWire), using libiec61883 and the new Linux1051FireWire stack (juju). This is the default DV/HDV input method in Linux1052Kernel 2.6.37 and later, since the old FireWire stack was removed.1053</p>1054<p>Specify the FireWire port to be used as input file, or &quot;auto&quot;1055to choose the first port connected.1056</p>1057<a name="Options-7"></a>1058<h4 class="subsection">3.8.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-7" aria-hidden="true">TOC</a></span></h4>1059 1060<dl class="table">1061<dt><samp class="option">dvtype</samp></dt>1062<dd><p>Override autodetection of DV/HDV. This should only be used if auto1063detection does not work, or if usage of a different device type1064should be prohibited. Treating a DV device as HDV (or vice versa) will1065not work and result in undefined behavior.1066The values <samp class="option">auto</samp>, <samp class="option">dv</samp> and <samp class="option">hdv</samp> are supported.1067</p>1068</dd>1069<dt><samp class="option">dvbuffer</samp></dt>1070<dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this1071is an exact value. For HDV, it is not frame exact, since HDV does1072not have a fixed frame size.1073</p>1074</dd>1075<dt><samp class="option">dvguid</samp></dt>1076<dd><p>Select the capture device by specifying its GUID. Capturing will only1077be performed from the specified device and fails if no device with the1078given GUID is found. This is useful to select the input if multiple1079devices are connected at the same time.1080Look at /sys/bus/firewire/devices to find out the GUIDs.1081</p>1082</dd>1083</dl>1084 1085<a name="Examples-3"></a>1086<h4 class="subsection">3.8.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-3" aria-hidden="true">TOC</a></span></h4>1087 1088<ul class="itemize mark-bullet">1089<li>Grab and show the input of a FireWire DV/HDV device.1090<div class="example">1091<pre class="example-preformatted">ffplay -f iec61883 -i auto1092</pre></div>1093 1094</li><li>Grab and record the input of a FireWire DV/HDV device,1095using a packet buffer of 100000 packets if the source is HDV.1096<div class="example">1097<pre class="example-preformatted">ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg1098</pre></div>1099 1100</li></ul>1101 1102<a name="jack"></a>1103<h3 class="section">3.9 jack<span class="pull-right"><a class="anchor hidden-xs" href="#jack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-jack" aria-hidden="true">TOC</a></span></h3>1104 1105<p>JACK input device.1106</p>1107<p>To enable this input device during configuration you need libjack1108installed on your system.1109</p>1110<p>A JACK input device creates one or more JACK writable clients, one for1111each audio channel, with name <var class="var">client_name</var>:input_<var class="var">N</var>, where1112<var class="var">client_name</var> is the name provided by the application, and <var class="var">N</var>1113is a number which identifies the channel.1114Each writable client will send the acquired data to the FFmpeg input1115device.1116</p>1117<p>Once you have created one or more JACK readable clients, you need to1118connect them to one or more JACK writable clients.1119</p>1120<p>To connect or disconnect JACK clients you can use the <code class="command">jack_connect</code>1121and <code class="command">jack_disconnect</code> programs, or do it through a graphical interface,1122for example with <code class="command">qjackctl</code>.1123</p>1124<p>To list the JACK clients and their properties you can invoke the command1125<code class="command">jack_lsp</code>.1126</p>1127<p>Follows an example which shows how to capture a JACK readable client1128with <code class="command">ffmpeg</code>.1129</p><div class="example">1130<pre class="example-preformatted"># Create a JACK writable client with name &quot;ffmpeg&quot;.1131$ ffmpeg -f jack -i ffmpeg -y out.wav1132 1133# Start the sample jack_metro readable client.1134$ jack_metro -b 120 -d 0.2 -f 40001135 1136# List the current JACK clients.1137$ jack_lsp -c1138system:capture_11139system:capture_21140system:playback_11141system:playback_21142ffmpeg:input_11143metro:120_bpm1144 1145# Connect metro to the ffmpeg writable client.1146$ jack_connect metro:120_bpm ffmpeg:input_11147</pre></div>1148 1149<p>For more information read:1150<a class="url" href="http://jackaudio.org/">http://jackaudio.org/</a>1151</p>1152<a name="Options-8"></a>1153<h4 class="subsection">3.9.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-8" aria-hidden="true">TOC</a></span></h4>1154 1155<dl class="table">1156<dt><samp class="option">channels</samp></dt>1157<dd><p>Set the number of channels. Default is 2.1158</p>1159</dd>1160</dl>1161 1162<a name="kmsgrab"></a>1163<h3 class="section">3.10 kmsgrab<span class="pull-right"><a class="anchor hidden-xs" href="#kmsgrab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-kmsgrab" aria-hidden="true">TOC</a></span></h3>1164 1165<p>KMS video input device.1166</p>1167<p>Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a1168DRM object that can be passed to other hardware functions.1169</p>1170<p>Requires either DRM master or CAP_SYS_ADMIN to run.1171</p>1172<p>If you don&rsquo;t understand what all of that means, you probably don&rsquo;t want this.  Look at1173<samp class="option">x11grab</samp> instead.1174</p>1175<a name="Options-9"></a>1176<h4 class="subsection">3.10.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-9" aria-hidden="true">TOC</a></span></h4>1177 1178<dl class="table">1179<dt><samp class="option">device</samp></dt>1180<dd><p>DRM device to capture on.  Defaults to <samp class="option">/dev/dri/card0</samp>.1181</p>1182</dd>1183<dt><samp class="option">format</samp></dt>1184<dd><p>Pixel format of the framebuffer.  This can be autodetected if you are running Linux 5.71185or later, but needs to be provided for earlier versions.  Defaults to <samp class="option">bgr0</samp>,1186which is the most common format used by the Linux console and Xorg X server.1187</p>1188</dd>1189<dt><samp class="option">format_modifier</samp></dt>1190<dd><p>Format modifier to signal on output frames.  This is necessary to import correctly into1191some APIs.  It can be autodetected if you are running Linux 5.7 or later, but will need1192to be provided explicitly when needed in earlier versions.  See the libdrm documentation1193for possible values.1194</p>1195</dd>1196<dt><samp class="option">crtc_id</samp></dt>1197<dd><p>KMS CRTC ID to define the capture source.  The first active plane on the given CRTC1198will be used.1199</p>1200</dd>

Showing the first 1,200 of 2439 lines. Download the file for the rest.

codekingpro/portable-devtools · Team Ai