You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ffmpeg-devices.html 82KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964
  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 5.2, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. FFmpeg Devices Documentation
  8. </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 style="width: 95%; margin: auto">
  15. <h1>
  16. FFmpeg Devices Documentation
  17. </h1>
  18. <div align="center">
  19. </div>
  20. <a name="SEC_Top"></a>
  21. <a name="SEC_Contents"></a>
  22. <h2 class="contents-heading">Table of Contents</h2>
  23. <div class="contents">
  24. <ul class="no-bullet">
  25. <li><a name="toc-Description" href="#Description">1 Description</a></li>
  26. <li><a name="toc-Device-Options" href="#Device-Options">2 Device Options</a></li>
  27. <li><a name="toc-Input-Devices" href="#Input-Devices">3 Input Devices</a>
  28. <ul class="no-bullet">
  29. <li><a name="toc-alsa" href="#alsa">3.1 alsa</a></li>
  30. <li><a name="toc-avfoundation" href="#avfoundation">3.2 avfoundation</a>
  31. <ul class="no-bullet">
  32. <li><a name="toc-Options" href="#Options">3.2.1 Options</a></li>
  33. <li><a name="toc-Examples" href="#Examples">3.2.2 Examples</a></li>
  34. </ul></li>
  35. <li><a name="toc-bktr" href="#bktr">3.3 bktr</a></li>
  36. <li><a name="toc-decklink" href="#decklink">3.4 decklink</a>
  37. <ul class="no-bullet">
  38. <li><a name="toc-Options-1" href="#Options-1">3.4.1 Options</a></li>
  39. <li><a name="toc-Examples-1" href="#Examples-1">3.4.2 Examples</a></li>
  40. </ul></li>
  41. <li><a name="toc-dshow" href="#dshow">3.5 dshow</a>
  42. <ul class="no-bullet">
  43. <li><a name="toc-Options-2" href="#Options-2">3.5.1 Options</a></li>
  44. <li><a name="toc-Examples-2" href="#Examples-2">3.5.2 Examples</a></li>
  45. </ul></li>
  46. <li><a name="toc-dv1394" href="#dv1394">3.6 dv1394</a></li>
  47. <li><a name="toc-fbdev" href="#fbdev">3.7 fbdev</a></li>
  48. <li><a name="toc-gdigrab" href="#gdigrab">3.8 gdigrab</a>
  49. <ul class="no-bullet">
  50. <li><a name="toc-Options-3" href="#Options-3">3.8.1 Options</a></li>
  51. </ul></li>
  52. <li><a name="toc-iec61883" href="#iec61883">3.9 iec61883</a>
  53. <ul class="no-bullet">
  54. <li><a name="toc-Options-4" href="#Options-4">3.9.1 Options</a></li>
  55. <li><a name="toc-Examples-3" href="#Examples-3">3.9.2 Examples</a></li>
  56. </ul></li>
  57. <li><a name="toc-jack" href="#jack">3.10 jack</a></li>
  58. <li><a name="toc-lavfi" href="#lavfi">3.11 lavfi</a>
  59. <ul class="no-bullet">
  60. <li><a name="toc-Options-5" href="#Options-5">3.11.1 Options</a></li>
  61. <li><a name="toc-Examples-4" href="#Examples-4">3.11.2 Examples</a></li>
  62. </ul></li>
  63. <li><a name="toc-libcdio" href="#libcdio">3.12 libcdio</a>
  64. <ul class="no-bullet">
  65. <li><a name="toc-Options-6" href="#Options-6">3.12.1 Options</a></li>
  66. </ul></li>
  67. <li><a name="toc-libdc1394" href="#libdc1394">3.13 libdc1394</a></li>
  68. <li><a name="toc-openal" href="#openal">3.14 openal</a>
  69. <ul class="no-bullet">
  70. <li><a name="toc-Options-7" href="#Options-7">3.14.1 Options</a></li>
  71. <li><a name="toc-Examples-5" href="#Examples-5">3.14.2 Examples</a></li>
  72. </ul></li>
  73. <li><a name="toc-oss" href="#oss">3.15 oss</a></li>
  74. <li><a name="toc-pulse" href="#pulse">3.16 pulse</a>
  75. <ul class="no-bullet">
  76. <li><a name="toc-Options-8" href="#Options-8">3.16.1 Options</a></li>
  77. <li><a name="toc-Examples-6" href="#Examples-6">3.16.2 Examples</a></li>
  78. </ul></li>
  79. <li><a name="toc-qtkit" href="#qtkit">3.17 qtkit</a></li>
  80. <li><a name="toc-sndio" href="#sndio">3.18 sndio</a></li>
  81. <li><a name="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">3.19 video4linux2, v4l2</a>
  82. <ul class="no-bullet">
  83. <li><a name="toc-Options-9" href="#Options-9">3.19.1 Options</a></li>
  84. </ul></li>
  85. <li><a name="toc-vfwcap" href="#vfwcap">3.20 vfwcap</a></li>
  86. <li><a name="toc-x11grab" href="#x11grab">3.21 x11grab</a>
  87. <ul class="no-bullet">
  88. <li><a name="toc-Options-10" href="#Options-10">3.21.1 Options</a></li>
  89. <li><a name="toc-grab_005fx-grab_005fy-AVOption" href="#grab_005fx-grab_005fy-AVOption">3.21.2 <var>grab_x</var> <var>grab_y</var> AVOption</a></li>
  90. </ul></li>
  91. </ul></li>
  92. <li><a name="toc-Output-Devices" href="#Output-Devices">4 Output Devices</a>
  93. <ul class="no-bullet">
  94. <li><a name="toc-alsa-1" href="#alsa-1">4.1 alsa</a>
  95. <ul class="no-bullet">
  96. <li><a name="toc-Examples-7" href="#Examples-7">4.1.1 Examples</a></li>
  97. </ul></li>
  98. <li><a name="toc-caca" href="#caca">4.2 caca</a>
  99. <ul class="no-bullet">
  100. <li><a name="toc-Options-11" href="#Options-11">4.2.1 Options</a></li>
  101. <li><a name="toc-Examples-8" href="#Examples-8">4.2.2 Examples</a></li>
  102. </ul></li>
  103. <li><a name="toc-decklink-1" href="#decklink-1">4.3 decklink</a>
  104. <ul class="no-bullet">
  105. <li><a name="toc-Options-12" href="#Options-12">4.3.1 Options</a></li>
  106. <li><a name="toc-Examples-9" href="#Examples-9">4.3.2 Examples</a></li>
  107. </ul></li>
  108. <li><a name="toc-fbdev-1" href="#fbdev-1">4.4 fbdev</a>
  109. <ul class="no-bullet">
  110. <li><a name="toc-Options-13" href="#Options-13">4.4.1 Options</a></li>
  111. <li><a name="toc-Examples-10" href="#Examples-10">4.4.2 Examples</a></li>
  112. </ul></li>
  113. <li><a name="toc-opengl" href="#opengl">4.5 opengl</a>
  114. <ul class="no-bullet">
  115. <li><a name="toc-Options-14" href="#Options-14">4.5.1 Options</a></li>
  116. <li><a name="toc-Examples-11" href="#Examples-11">4.5.2 Examples</a></li>
  117. </ul></li>
  118. <li><a name="toc-oss-1" href="#oss-1">4.6 oss</a></li>
  119. <li><a name="toc-pulse-1" href="#pulse-1">4.7 pulse</a>
  120. <ul class="no-bullet">
  121. <li><a name="toc-Options-15" href="#Options-15">4.7.1 Options</a></li>
  122. <li><a name="toc-Examples-12" href="#Examples-12">4.7.2 Examples</a></li>
  123. </ul></li>
  124. <li><a name="toc-sdl" href="#sdl">4.8 sdl</a>
  125. <ul class="no-bullet">
  126. <li><a name="toc-Options-16" href="#Options-16">4.8.1 Options</a></li>
  127. <li><a name="toc-Interactive-commands" href="#Interactive-commands">4.8.2 Interactive commands</a></li>
  128. <li><a name="toc-Examples-13" href="#Examples-13">4.8.3 Examples</a></li>
  129. </ul></li>
  130. <li><a name="toc-sndio-1" href="#sndio-1">4.9 sndio</a></li>
  131. <li><a name="toc-xv" href="#xv">4.10 xv</a>
  132. <ul class="no-bullet">
  133. <li><a name="toc-Options-17" href="#Options-17">4.10.1 Options</a></li>
  134. <li><a name="toc-Examples-14" href="#Examples-14">4.10.2 Examples</a></li>
  135. </ul></li>
  136. </ul></li>
  137. <li><a name="toc-See-Also" href="#See-Also">5 See Also</a></li>
  138. <li><a name="toc-Authors" href="#Authors">6 Authors</a></li>
  139. </ul>
  140. </div>
  141. <a name="Description"></a>
  142. <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>
  143. <p>This document describes the input and output devices provided by the
  144. libavdevice library.
  145. </p>
  146. <a name="Device-Options"></a>
  147. <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>
  148. <p>The libavdevice library provides the same interface as
  149. libavformat. Namely, an input device is considered like a demuxer, and
  150. an output device like a muxer, and the interface and generic device
  151. options are the same provided by libavformat (see the ffmpeg-formats
  152. manual).
  153. </p>
  154. <p>In addition each input or output device may support so-called private
  155. options, which are specific for that component.
  156. </p>
  157. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  158. FFmpeg tools, or by setting the value explicitly in the device
  159. <code>AVFormatContext</code> options or using the <samp>libavutil/opt.h</samp> API
  160. for programmatic use.
  161. </p>
  162. <a name="Input-Devices"></a>
  163. <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>
  164. <p>Input devices are configured elements in FFmpeg which enable accessing
  165. the data coming from a multimedia device attached to your system.
  166. </p>
  167. <p>When you configure your FFmpeg build, all the supported input devices
  168. are enabled by default. You can list all available ones using the
  169. configure option &quot;&ndash;list-indevs&quot;.
  170. </p>
  171. <p>You can disable all the input devices using the configure option
  172. &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
  173. option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
  174. input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
  175. </p>
  176. <p>The option &quot;-devices&quot; of the ff* tools will display the list of
  177. supported input devices.
  178. </p>
  179. <p>A description of the currently available input devices follows.
  180. </p>
  181. <a name="alsa"></a>
  182. <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>
  183. <p>ALSA (Advanced Linux Sound Architecture) input device.
  184. </p>
  185. <p>To enable this input device during configuration you need libasound
  186. installed on your system.
  187. </p>
  188. <p>This device allows capturing from an ALSA device. The name of the
  189. device to capture has to be an ALSA card identifier.
  190. </p>
  191. <p>An ALSA identifier has the syntax:
  192. </p><div class="example">
  193. <pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
  194. </pre></div>
  195. <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
  196. </p>
  197. <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
  198. specify card number or identifier, device number and subdevice number
  199. (-1 means any).
  200. </p>
  201. <p>To see the list of cards currently recognized by your system check the
  202. files <samp>/proc/asound/cards</samp> and <samp>/proc/asound/devices</samp>.
  203. </p>
  204. <p>For example to capture with <code>ffmpeg</code> from an ALSA device with
  205. card id 0, you may run the command:
  206. </p><div class="example">
  207. <pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
  208. </pre></div>
  209. <p>For more information see:
  210. <a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
  211. </p>
  212. <a name="avfoundation"></a>
  213. <h3 class="section">3.2 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>
  214. <p>AVFoundation input device.
  215. </p>
  216. <p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.
  217. The older QTKit framework has been marked deprecated since OSX version 10.7.
  218. </p>
  219. <p>The input filename has to be given in the following syntax:
  220. </p><div class="example">
  221. <pre class="example">-i &quot;[[VIDEO]:[AUDIO]]&quot;
  222. </pre></div>
  223. <p>The first entry selects the video input while the latter selects the audio input.
  224. The stream has to be specified by the device name or the device index as shown by the device list.
  225. Alternatively, the video and/or audio input device can be chosen by index using the
  226. <samp>
  227. -video_device_index &lt;INDEX&gt;
  228. </samp>
  229. and/or
  230. <samp>
  231. -audio_device_index &lt;INDEX&gt;
  232. </samp>
  233. , overriding any
  234. device name or index given in the input filename.
  235. </p>
  236. <p>All available devices can be enumerated by using <samp>-list_devices true</samp>, listing
  237. all device names and corresponding indices.
  238. </p>
  239. <p>There are two device name aliases:
  240. </p><dl compact="compact">
  241. <dt><code>default</code></dt>
  242. <dd><p>Select the AVFoundation default device of the corresponding type.
  243. </p>
  244. </dd>
  245. <dt><code>none</code></dt>
  246. <dd><p>Do not record the corresponding media type.
  247. This is equivalent to specifying an empty device name or index.
  248. </p>
  249. </dd>
  250. </dl>
  251. <a name="Options"></a>
  252. <h4 class="subsection">3.2.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>
  253. <p>AVFoundation supports the following options:
  254. </p>
  255. <dl compact="compact">
  256. <dt><samp>-list_devices &lt;TRUE|FALSE&gt;</samp></dt>
  257. <dd><p>If set to true, a list of all available input devices is given showing all
  258. device names and indices.
  259. </p>
  260. </dd>
  261. <dt><samp>-video_device_index &lt;INDEX&gt;</samp></dt>
  262. <dd><p>Specify the video device by its index. Overrides anything given in the input filename.
  263. </p>
  264. </dd>
  265. <dt><samp>-audio_device_index &lt;INDEX&gt;</samp></dt>
  266. <dd><p>Specify the audio device by its index. Overrides anything given in the input filename.
  267. </p>
  268. </dd>
  269. <dt><samp>-pixel_format &lt;FORMAT&gt;</samp></dt>
  270. <dd><p>Request the video device to use a specific pixel format.
  271. If the specified format is not supported, a list of available formats is given
  272. und the first one in this list is used instead. Available pixel formats are:
  273. <code>monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
  274. bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
  275. yuv420p, nv12, yuyv422, gray</code>
  276. </p>
  277. </dd>
  278. </dl>
  279. <a name="Examples"></a>
  280. <h4 class="subsection">3.2.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>
  281. <ul>
  282. <li> Print the list of AVFoundation supported devices and exit:
  283. <div class="example">
  284. <pre class="example">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;
  285. </pre></div>
  286. </li><li> Record video from video device 0 and audio from audio device 0 into out.avi:
  287. <div class="example">
  288. <pre class="example">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi
  289. </pre></div>
  290. </li><li> Record video from video device 2 and audio from audio device 1 into out.avi:
  291. <div class="example">
  292. <pre class="example">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi
  293. </pre></div>
  294. </li><li> Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
  295. <div class="example">
  296. <pre class="example">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi
  297. </pre></div>
  298. </li></ul>
  299. <a name="bktr"></a>
  300. <h3 class="section">3.3 bktr<span class="pull-right"><a class="anchor hidden-xs" href="#bktr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bktr" aria-hidden="true">TOC</a></span></h3>
  301. <p>BSD video input device.
  302. </p>
  303. <a name="decklink"></a>
  304. <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>
  305. <p>The decklink input device provides capture capabilities for Blackmagic
  306. DeckLink devices.
  307. </p>
  308. <p>To enable this input device, you need the Blackmagic DeckLink SDK and you
  309. need to configure with the appropriate <code>--extra-cflags</code>
  310. and <code>--extra-ldflags</code>.
  311. On Windows, you need to run the IDL files through <code>widl</code>.
  312. </p>
  313. <p>DeckLink is very picky about the formats it supports. Pixel format is
  314. uyvy422 or v210, framerate and video size must be determined for your device with
  315. <code>-list_formats 1</code>. Audio sample rate is always 48 kHz and the number
  316. of channels can be 2, 8 or 16.
  317. </p>
  318. <a name="Options-1"></a>
  319. <h4 class="subsection">3.4.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>
  320. <dl compact="compact">
  321. <dt><samp>list_devices</samp></dt>
  322. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  323. Defaults to <samp>false</samp>.
  324. </p>
  325. </dd>
  326. <dt><samp>list_formats</samp></dt>
  327. <dd><p>If set to <samp>true</samp>, print a list of supported formats and exit.
  328. Defaults to <samp>false</samp>.
  329. </p>
  330. </dd>
  331. <dt><samp>bm_v210</samp></dt>
  332. <dd><p>If set to &lsquo;<samp>1</samp>&rsquo;, video is captured in 10 bit v210 instead
  333. of uyvy422. Not all Blackmagic devices support this option.
  334. </p>
  335. </dd>
  336. </dl>
  337. <a name="Examples-1"></a>
  338. <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>
  339. <ul>
  340. <li> List input devices:
  341. <div class="example">
  342. <pre class="example">ffmpeg -f decklink -list_devices 1 -i dummy
  343. </pre></div>
  344. </li><li> List supported formats:
  345. <div class="example">
  346. <pre class="example">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
  347. </pre></div>
  348. </li><li> Capture video clip at 1080i50 (format 11):
  349. <div class="example">
  350. <pre class="example">ffmpeg -f decklink -i 'Intensity Pro@11' -acodec copy -vcodec copy output.avi
  351. </pre></div>
  352. </li><li> Capture video clip at 1080i50 10 bit:
  353. <div class="example">
  354. <pre class="example">ffmpeg -bm_v210 1 -f decklink -i 'UltraStudio Mini Recorder@11' -acodec copy -vcodec copy output.avi
  355. </pre></div>
  356. </li><li> Capture video clip at 720p50 with 32bit audio:
  357. <div class="example">
  358. <pre class="example">ffmpeg -bm_audiodepth 32 -f decklink -i 'UltraStudio Mini Recorder@14' -acodec copy -vcodec copy output.avi
  359. </pre></div>
  360. </li><li> Capture video clip at 576i50 with 8 audio channels:
  361. <div class="example">
  362. <pre class="example">ffmpeg -bm_channels 8 -f decklink -i 'UltraStudio Mini Recorder@3' -acodec copy -vcodec copy output.avi
  363. </pre></div>
  364. </li></ul>
  365. <a name="dshow"></a>
  366. <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>
  367. <p>Windows DirectShow input device.
  368. </p>
  369. <p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
  370. Currently only audio and video devices are supported.
  371. </p>
  372. <p>Multiple devices may be opened as separate inputs, but they may also be
  373. opened on the same input, which should improve synchronism between them.
  374. </p>
  375. <p>The input name should be in the format:
  376. </p>
  377. <div class="example">
  378. <pre class="example"><var>TYPE</var>=<var>NAME</var>[:<var>TYPE</var>=<var>NAME</var>]
  379. </pre></div>
  380. <p>where <var>TYPE</var> can be either <var>audio</var> or <var>video</var>,
  381. and <var>NAME</var> is the device&rsquo;s name or alternative name..
  382. </p>
  383. <a name="Options-2"></a>
  384. <h4 class="subsection">3.5.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>
  385. <p>If no options are specified, the device&rsquo;s defaults are used.
  386. If the device does not support the requested options, it will
  387. fail to open.
  388. </p>
  389. <dl compact="compact">
  390. <dt><samp>video_size</samp></dt>
  391. <dd><p>Set the video size in the captured video.
  392. </p>
  393. </dd>
  394. <dt><samp>framerate</samp></dt>
  395. <dd><p>Set the frame rate in the captured video.
  396. </p>
  397. </dd>
  398. <dt><samp>sample_rate</samp></dt>
  399. <dd><p>Set the sample rate (in Hz) of the captured audio.
  400. </p>
  401. </dd>
  402. <dt><samp>sample_size</samp></dt>
  403. <dd><p>Set the sample size (in bits) of the captured audio.
  404. </p>
  405. </dd>
  406. <dt><samp>channels</samp></dt>
  407. <dd><p>Set the number of channels in the captured audio.
  408. </p>
  409. </dd>
  410. <dt><samp>list_devices</samp></dt>
  411. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  412. </p>
  413. </dd>
  414. <dt><samp>list_options</samp></dt>
  415. <dd><p>If set to <samp>true</samp>, print a list of selected device&rsquo;s options
  416. and exit.
  417. </p>
  418. </dd>
  419. <dt><samp>video_device_number</samp></dt>
  420. <dd><p>Set video device number for devices with same name (starts at 0,
  421. defaults to 0).
  422. </p>
  423. </dd>
  424. <dt><samp>audio_device_number</samp></dt>
  425. <dd><p>Set audio device number for devices with same name (starts at 0,
  426. defaults to 0).
  427. </p>
  428. </dd>
  429. <dt><samp>pixel_format</samp></dt>
  430. <dd><p>Select pixel format to be used by DirectShow. This may only be set when
  431. the video codec is not set or set to rawvideo.
  432. </p>
  433. </dd>
  434. <dt><samp>audio_buffer_size</samp></dt>
  435. <dd><p>Set audio device buffer size in milliseconds (which can directly
  436. impact latency, depending on the device).
  437. Defaults to using the audio device&rsquo;s
  438. default buffer size (typically some multiple of 500ms).
  439. Setting this value too low can degrade performance.
  440. See also
  441. <a 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>
  442. </p>
  443. </dd>
  444. <dt><samp>video_pin_name</samp></dt>
  445. <dd><p>Select video capture pin to use by name or alternative name.
  446. </p>
  447. </dd>
  448. <dt><samp>audio_pin_name</samp></dt>
  449. <dd><p>Select audio capture pin to use by name or alternative name.
  450. </p>
  451. </dd>
  452. <dt><samp>crossbar_video_input_pin_number</samp></dt>
  453. <dd><p>Select video input pin number for crossbar device. This will be
  454. routed to the crossbar device&rsquo;s Video Decoder output pin.
  455. Note that changing this value can affect future invocations
  456. (sets a new default) until system reboot occurs.
  457. </p>
  458. </dd>
  459. <dt><samp>crossbar_audio_input_pin_number</samp></dt>
  460. <dd><p>Select audio input pin number for crossbar device. This will be
  461. routed to the crossbar device&rsquo;s Audio Decoder output pin.
  462. Note that changing this value can affect future invocations
  463. (sets a new default) until system reboot occurs.
  464. </p>
  465. </dd>
  466. <dt><samp>show_video_device_dialog</samp></dt>
  467. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
  468. to the end user, allowing them to change video filter properties
  469. and configurations manually.
  470. Note that for crossbar devices, adjusting values in this dialog
  471. may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
  472. input frame rates, sizes, interlacing, etc. Changing these values can
  473. enable different scan rates/frame rates and avoiding green bars at
  474. the bottom, flickering scan lines, etc.
  475. Note that with some devices, changing these properties can also affect future
  476. invocations (sets new defaults) until system reboot occurs.
  477. </p>
  478. </dd>
  479. <dt><samp>show_audio_device_dialog</samp></dt>
  480. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
  481. to the end user, allowing them to change audio filter properties
  482. and configurations manually.
  483. </p>
  484. </dd>
  485. <dt><samp>show_video_crossbar_connection_dialog</samp></dt>
  486. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  487. dialog to the end user, allowing them to manually
  488. modify crossbar pin routings, when it opens a video device.
  489. </p>
  490. </dd>
  491. <dt><samp>show_audio_crossbar_connection_dialog</samp></dt>
  492. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  493. dialog to the end user, allowing them to manually
  494. modify crossbar pin routings, when it opens an audio device.
  495. </p>
  496. </dd>
  497. <dt><samp>show_analog_tv_tuner_dialog</samp></dt>
  498. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  499. dialog to the end user, allowing them to manually
  500. modify TV channels and frequencies.
  501. </p>
  502. </dd>
  503. <dt><samp>show_analog_tv_tuner_audio_dialog</samp></dt>
  504. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  505. dialog to the end user, allowing them to manually
  506. modify TV audio (like mono vs. stereo, Language A,B or C).
  507. </p>
  508. </dd>
  509. </dl>
  510. <a name="Examples-2"></a>
  511. <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>
  512. <ul>
  513. <li> Print the list of DirectShow supported devices and exit:
  514. <div class="example">
  515. <pre class="example">$ ffmpeg -list_devices true -f dshow -i dummy
  516. </pre></div>
  517. </li><li> Open video device <var>Camera</var>:
  518. <div class="example">
  519. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;
  520. </pre></div>
  521. </li><li> Open second video device with name <var>Camera</var>:
  522. <div class="example">
  523. <pre class="example">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;
  524. </pre></div>
  525. </li><li> Open video device <var>Camera</var> and audio device <var>Microphone</var>:
  526. <div class="example">
  527. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;
  528. </pre></div>
  529. </li><li> Print the list of supported options in selected device and exit:
  530. <div class="example">
  531. <pre class="example">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;
  532. </pre></div>
  533. </li><li> Specify pin names to capture by name or alternative name, specify alternative device name:
  534. <div class="example">
  535. <pre class="example">$ 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;
  536. </pre></div>
  537. </li><li> Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
  538. <div class="example">
  539. <pre class="example">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
  540. -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;
  541. </pre></div>
  542. </li></ul>
  543. <a name="dv1394"></a>
  544. <h3 class="section">3.6 dv1394<span class="pull-right"><a class="anchor hidden-xs" href="#dv1394" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dv1394" aria-hidden="true">TOC</a></span></h3>
  545. <p>Linux DV 1394 input device.
  546. </p>
  547. <a name="fbdev"></a>
  548. <h3 class="section">3.7 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>
  549. <p>Linux framebuffer input device.
  550. </p>
  551. <p>The Linux framebuffer is a graphic hardware-independent abstraction
  552. layer to show graphics on a computer monitor, typically on the
  553. console. It is accessed through a file device node, usually
  554. <samp>/dev/fb0</samp>.
  555. </p>
  556. <p>For more detailed information read the file
  557. Documentation/fb/framebuffer.txt included in the Linux source tree.
  558. </p>
  559. <p>To record from the framebuffer device <samp>/dev/fb0</samp> with
  560. <code>ffmpeg</code>:
  561. </p><div class="example">
  562. <pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
  563. </pre></div>
  564. <p>You can take a single screenshot image with the command:
  565. </p><div class="example">
  566. <pre class="example">ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
  567. </pre></div>
  568. <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
  569. </p>
  570. <a name="gdigrab"></a>
  571. <h3 class="section">3.8 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>
  572. <p>Win32 GDI-based screen capture device.
  573. </p>
  574. <p>This device allows you to capture a region of the display on Windows.
  575. </p>
  576. <p>There are two options for the input filename:
  577. </p><div class="example">
  578. <pre class="example">desktop
  579. </pre></div>
  580. <p>or
  581. </p><div class="example">
  582. <pre class="example">title=<var>window_title</var>
  583. </pre></div>
  584. <p>The first option will capture the entire desktop, or a fixed region of the
  585. desktop. The second option will instead capture the contents of a single
  586. window, regardless of its position on the screen.
  587. </p>
  588. <p>For example, to grab the entire desktop using <code>ffmpeg</code>:
  589. </p><div class="example">
  590. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
  591. </pre></div>
  592. <p>Grab a 640x480 region at position <code>10,20</code>:
  593. </p><div class="example">
  594. <pre class="example">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
  595. </pre></div>
  596. <p>Grab the contents of the window named &quot;Calculator&quot;
  597. </p><div class="example">
  598. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
  599. </pre></div>
  600. <a name="Options-3"></a>
  601. <h4 class="subsection">3.8.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>
  602. <dl compact="compact">
  603. <dt><samp>draw_mouse</samp></dt>
  604. <dd><p>Specify whether to draw the mouse pointer. Use the value <code>0</code> to
  605. not draw the pointer. Default value is <code>1</code>.
  606. </p>
  607. </dd>
  608. <dt><samp>framerate</samp></dt>
  609. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  610. corresponding to a frame rate of <code>30000/1001</code>.
  611. </p>
  612. </dd>
  613. <dt><samp>show_region</samp></dt>
  614. <dd><p>Show grabbed region on screen.
  615. </p>
  616. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  617. region will be indicated on screen. With this option, it is easy to
  618. know what is being grabbed if only a portion of the screen is grabbed.
  619. </p>
  620. <p>Note that <var>show_region</var> is incompatible with grabbing the contents
  621. of a single window.
  622. </p>
  623. <p>For example:
  624. </p><div class="example">
  625. <pre class="example">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
  626. </pre></div>
  627. </dd>
  628. <dt><samp>video_size</samp></dt>
  629. <dd><p>Set the video frame size. The default is to capture the full screen if <samp>desktop</samp> is selected, or the full window size if <samp>title=<var>window_title</var></samp> is selected.
  630. </p>
  631. </dd>
  632. <dt><samp>offset_x</samp></dt>
  633. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the left edge of the screen or desktop.
  634. </p>
  635. <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>offset_x</var> value to move the region to that monitor.
  636. </p>
  637. </dd>
  638. <dt><samp>offset_y</samp></dt>
  639. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the top edge of the screen or desktop.
  640. </p>
  641. <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>offset_y</var> value to move the region to that monitor.
  642. </p>
  643. </dd>
  644. </dl>
  645. <a name="iec61883"></a>
  646. <h3 class="section">3.9 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>
  647. <p>FireWire DV/HDV input device using libiec61883.
  648. </p>
  649. <p>To enable this input device, you need libiec61883, libraw1394 and
  650. libavc1394 installed on your system. Use the configure option
  651. <code>--enable-libiec61883</code> to compile with the device enabled.
  652. </p>
  653. <p>The iec61883 capture device supports capturing from a video device
  654. connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
  655. FireWire stack (juju). This is the default DV/HDV input method in Linux
  656. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  657. </p>
  658. <p>Specify the FireWire port to be used as input file, or &quot;auto&quot;
  659. to choose the first port connected.
  660. </p>
  661. <a name="Options-4"></a>
  662. <h4 class="subsection">3.9.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>
  663. <dl compact="compact">
  664. <dt><samp>dvtype</samp></dt>
  665. <dd><p>Override autodetection of DV/HDV. This should only be used if auto
  666. detection does not work, or if usage of a different device type
  667. should be prohibited. Treating a DV device as HDV (or vice versa) will
  668. not work and result in undefined behavior.
  669. The values <samp>auto</samp>, <samp>dv</samp> and <samp>hdv</samp> are supported.
  670. </p>
  671. </dd>
  672. <dt><samp>dvbuffer</samp></dt>
  673. <dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this
  674. is an exact value. For HDV, it is not frame exact, since HDV does
  675. not have a fixed frame size.
  676. </p>
  677. </dd>
  678. <dt><samp>dvguid</samp></dt>
  679. <dd><p>Select the capture device by specifying it&rsquo;s GUID. Capturing will only
  680. be performed from the specified device and fails if no device with the
  681. given GUID is found. This is useful to select the input if multiple
  682. devices are connected at the same time.
  683. Look at /sys/bus/firewire/devices to find out the GUIDs.
  684. </p>
  685. </dd>
  686. </dl>
  687. <a name="Examples-3"></a>
  688. <h4 class="subsection">3.9.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>
  689. <ul>
  690. <li> Grab and show the input of a FireWire DV/HDV device.
  691. <div class="example">
  692. <pre class="example">ffplay -f iec61883 -i auto
  693. </pre></div>
  694. </li><li> Grab and record the input of a FireWire DV/HDV device,
  695. using a packet buffer of 100000 packets if the source is HDV.
  696. <div class="example">
  697. <pre class="example">ffmpeg -f iec61883 -i auto -hdvbuffer 100000 out.mpg
  698. </pre></div>
  699. </li></ul>
  700. <a name="jack"></a>
  701. <h3 class="section">3.10 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>
  702. <p>JACK input device.
  703. </p>
  704. <p>To enable this input device during configuration you need libjack
  705. installed on your system.
  706. </p>
  707. <p>A JACK input device creates one or more JACK writable clients, one for
  708. each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
  709. <var>client_name</var> is the name provided by the application, and <var>N</var>
  710. is a number which identifies the channel.
  711. Each writable client will send the acquired data to the FFmpeg input
  712. device.
  713. </p>
  714. <p>Once you have created one or more JACK readable clients, you need to
  715. connect them to one or more JACK writable clients.
  716. </p>
  717. <p>To connect or disconnect JACK clients you can use the <code>jack_connect</code>
  718. and <code>jack_disconnect</code> programs, or do it through a graphical interface,
  719. for example with <code>qjackctl</code>.
  720. </p>
  721. <p>To list the JACK clients and their properties you can invoke the command
  722. <code>jack_lsp</code>.
  723. </p>
  724. <p>Follows an example which shows how to capture a JACK readable client
  725. with <code>ffmpeg</code>.
  726. </p><div class="example">
  727. <pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
  728. $ ffmpeg -f jack -i ffmpeg -y out.wav
  729. # Start the sample jack_metro readable client.
  730. $ jack_metro -b 120 -d 0.2 -f 4000
  731. # List the current JACK clients.
  732. $ jack_lsp -c
  733. system:capture_1
  734. system:capture_2
  735. system:playback_1
  736. system:playback_2
  737. ffmpeg:input_1
  738. metro:120_bpm
  739. # Connect metro to the ffmpeg writable client.
  740. $ jack_connect metro:120_bpm ffmpeg:input_1
  741. </pre></div>
  742. <p>For more information read:
  743. <a href="http://jackaudio.org/">http://jackaudio.org/</a>
  744. </p>
  745. <a name="lavfi"></a>
  746. <h3 class="section">3.11 lavfi<span class="pull-right"><a class="anchor hidden-xs" href="#lavfi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lavfi" aria-hidden="true">TOC</a></span></h3>
  747. <p>Libavfilter input virtual device.
  748. </p>
  749. <p>This input device reads data from the open output pads of a libavfilter
  750. filtergraph.
  751. </p>
  752. <p>For each filtergraph open output, the input device will create a
  753. corresponding stream which is mapped to the generated output. Currently
  754. only video data is supported. The filtergraph is specified through the
  755. option <samp>graph</samp>.
  756. </p>
  757. <a name="Options-5"></a>
  758. <h4 class="subsection">3.11.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>
  759. <dl compact="compact">
  760. <dt><samp>graph</samp></dt>
  761. <dd><p>Specify the filtergraph to use as input. Each video open output must be
  762. labelled by a unique string of the form &quot;out<var>N</var>&quot;, where <var>N</var> is a
  763. number starting from 0 corresponding to the mapped input stream
  764. generated by the device.
  765. The first unlabelled output is automatically assigned to the &quot;out0&quot;
  766. label, but all the others need to be specified explicitly.
  767. </p>
  768. <p>The suffix &quot;+subcc&quot; can be appended to the output label to create an extra
  769. stream with the closed captions packets attached to that output
  770. (experimental; only for EIA-608 / CEA-708 for now).
  771. The subcc streams are created after all the normal streams, in the order of
  772. the corresponding stream.
  773. For example, if there is &quot;out19+subcc&quot;, &quot;out7+subcc&quot; and up to &quot;out42&quot;, the
  774. stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
  775. </p>
  776. <p>If not specified defaults to the filename specified for the input
  777. device.
  778. </p>
  779. </dd>
  780. <dt><samp>graph_file</samp></dt>
  781. <dd><p>Set the filename of the filtergraph to be read and sent to the other
  782. filters. Syntax of the filtergraph is the same as the one specified by
  783. the option <var>graph</var>.
  784. </p>
  785. </dd>
  786. </dl>
  787. <a name="Examples-4"></a>
  788. <h4 class="subsection">3.11.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-4" aria-hidden="true">TOC</a></span></h4>
  789. <ul>
  790. <li> Create a color video stream and play it back with <code>ffplay</code>:
  791. <div class="example">
  792. <pre class="example">ffplay -f lavfi -graph &quot;color=c=pink [out0]&quot; dummy
  793. </pre></div>
  794. </li><li> As the previous example, but use filename for specifying the graph
  795. description, and omit the &quot;out0&quot; label:
  796. <div class="example">
  797. <pre class="example">ffplay -f lavfi color=c=pink
  798. </pre></div>
  799. </li><li> Create three different video test filtered sources and play them:
  800. <div class="example">
  801. <pre class="example">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
  802. </pre></div>
  803. </li><li> Read an audio stream from a file using the amovie source and play it
  804. back with <code>ffplay</code>:
  805. <div class="example">
  806. <pre class="example">ffplay -f lavfi &quot;amovie=test.wav&quot;
  807. </pre></div>
  808. </li><li> Read an audio stream and a video stream and play it back with
  809. <code>ffplay</code>:
  810. <div class="example">
  811. <pre class="example">ffplay -f lavfi &quot;movie=test.avi[out0];amovie=test.wav[out1]&quot;
  812. </pre></div>
  813. </li><li> Dump decoded frames to images and closed captions to a file (experimental):
  814. <div class="example">
  815. <pre class="example">ffmpeg -f lavfi -i &quot;movie=test.ts[out0+subcc]&quot; -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
  816. </pre></div>
  817. </li></ul>
  818. <a name="libcdio"></a>
  819. <h3 class="section">3.12 libcdio<span class="pull-right"><a class="anchor hidden-xs" href="#libcdio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libcdio" aria-hidden="true">TOC</a></span></h3>
  820. <p>Audio-CD input device based on libcdio.
  821. </p>
  822. <p>To enable this input device during configuration you need libcdio
  823. installed on your system. It requires the configure option
  824. <code>--enable-libcdio</code>.
  825. </p>
  826. <p>This device allows playing and grabbing from an Audio-CD.
  827. </p>
  828. <p>For example to copy with <code>ffmpeg</code> the entire Audio-CD in <samp>/dev/sr0</samp>,
  829. you may run the command:
  830. </p><div class="example">
  831. <pre class="example">ffmpeg -f libcdio -i /dev/sr0 cd.wav
  832. </pre></div>
  833. <a name="Options-6"></a>
  834. <h4 class="subsection">3.12.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>
  835. <dl compact="compact">
  836. <dt><samp>speed</samp></dt>
  837. <dd><p>Set drive reading speed. Default value is 0.
  838. </p>
  839. <p>The speed is specified CD-ROM speed units. The speed is set through
  840. the libcdio <code>cdio_cddap_speed_set</code> function. On many CD-ROM
  841. drives, specifying a value too large will result in using the fastest
  842. speed.
  843. </p>
  844. </dd>
  845. <dt><samp>paranoia_mode</samp></dt>
  846. <dd><p>Set paranoia recovery mode flags. It accepts one of the following values:
  847. </p>
  848. <dl compact="compact">
  849. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  850. <dt>&lsquo;<samp>verify</samp>&rsquo;</dt>
  851. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  852. <dt>&lsquo;<samp>neverskip</samp>&rsquo;</dt>
  853. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  854. </dl>
  855. <p>Default value is &lsquo;<samp>disable</samp>&rsquo;.
  856. </p>
  857. <p>For more information about the available recovery modes, consult the
  858. paranoia project documentation.
  859. </p></dd>
  860. </dl>
  861. <a name="libdc1394"></a>
  862. <h3 class="section">3.13 libdc1394<span class="pull-right"><a class="anchor hidden-xs" href="#libdc1394" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libdc1394" aria-hidden="true">TOC</a></span></h3>
  863. <p>IIDC1394 input device, based on libdc1394 and libraw1394.
  864. </p>
  865. <p>Requires the configure option <code>--enable-libdc1394</code>.
  866. </p>
  867. <a name="openal"></a>
  868. <h3 class="section">3.14 openal<span class="pull-right"><a class="anchor hidden-xs" href="#openal" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-openal" aria-hidden="true">TOC</a></span></h3>
  869. <p>The OpenAL input device provides audio capture on all systems with a
  870. working OpenAL 1.1 implementation.
  871. </p>
  872. <p>To enable this input device during configuration, you need OpenAL
  873. headers and libraries installed on your system, and need to configure
  874. FFmpeg with <code>--enable-openal</code>.
  875. </p>
  876. <p>OpenAL headers and libraries should be provided as part of your OpenAL
  877. implementation, or as an additional download (an SDK). Depending on your
  878. installation you may need to specify additional flags via the
  879. <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
  880. system to locate the OpenAL headers and libraries.
  881. </p>
  882. <p>An incomplete list of OpenAL implementations follows:
  883. </p>
  884. <dl compact="compact">
  885. <dt><strong>Creative</strong></dt>
  886. <dd><p>The official Windows implementation, providing hardware acceleration
  887. with supported devices and software fallback.
  888. See <a href="http://openal.org/">http://openal.org/</a>.
  889. </p></dd>
  890. <dt><strong>OpenAL Soft</strong></dt>
  891. <dd><p>Portable, open source (LGPL) software implementation. Includes
  892. backends for the most common sound APIs on the Windows, Linux,
  893. Solaris, and BSD operating systems.
  894. See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
  895. </p></dd>
  896. <dt><strong>Apple</strong></dt>
  897. <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
  898. See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
  899. </p></dd>
  900. </dl>
  901. <p>This device allows one to capture from an audio input device handled
  902. through OpenAL.
  903. </p>
  904. <p>You need to specify the name of the device to capture in the provided
  905. filename. If the empty string is provided, the device will
  906. automatically select the default device. You can get the list of the
  907. supported devices by using the option <var>list_devices</var>.
  908. </p>
  909. <a name="Options-7"></a>
  910. <h4 class="subsection">3.14.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>
  911. <dl compact="compact">
  912. <dt><samp>channels</samp></dt>
  913. <dd><p>Set the number of channels in the captured audio. Only the values
  914. <samp>1</samp> (monaural) and <samp>2</samp> (stereo) are currently supported.
  915. Defaults to <samp>2</samp>.
  916. </p>
  917. </dd>
  918. <dt><samp>sample_size</samp></dt>
  919. <dd><p>Set the sample size (in bits) of the captured audio. Only the values
  920. <samp>8</samp> and <samp>16</samp> are currently supported. Defaults to
  921. <samp>16</samp>.
  922. </p>
  923. </dd>
  924. <dt><samp>sample_rate</samp></dt>
  925. <dd><p>Set the sample rate (in Hz) of the captured audio.
  926. Defaults to <samp>44.1k</samp>.
  927. </p>
  928. </dd>
  929. <dt><samp>list_devices</samp></dt>
  930. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  931. Defaults to <samp>false</samp>.
  932. </p>
  933. </dd>
  934. </dl>
  935. <a name="Examples-5"></a>
  936. <h4 class="subsection">3.14.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-5" aria-hidden="true">TOC</a></span></h4>
  937. <p>Print the list of OpenAL supported devices and exit:
  938. </p><div class="example">
  939. <pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
  940. </pre></div>
  941. <p>Capture from the OpenAL device <samp>DR-BT101 via PulseAudio</samp>:
  942. </p><div class="example">
  943. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
  944. </pre></div>
  945. <p>Capture from the default device (note the empty string &rdquo; as filename):
  946. </p><div class="example">
  947. <pre class="example">$ ffmpeg -f openal -i '' out.ogg
  948. </pre></div>
  949. <p>Capture from two devices simultaneously, writing to two different files,
  950. within the same <code>ffmpeg</code> command:
  951. </p><div class="example">
  952. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
  953. </pre></div>
  954. <p>Note: not all OpenAL implementations support multiple simultaneous capture -
  955. try the latest OpenAL Soft if the above does not work.
  956. </p>
  957. <a name="oss"></a>
  958. <h3 class="section">3.15 oss<span class="pull-right"><a class="anchor hidden-xs" href="#oss" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oss" aria-hidden="true">TOC</a></span></h3>
  959. <p>Open Sound System input device.
  960. </p>
  961. <p>The filename to provide to the input device is the device node
  962. representing the OSS input device, and is usually set to
  963. <samp>/dev/dsp</samp>.
  964. </p>
  965. <p>For example to grab from <samp>/dev/dsp</samp> using <code>ffmpeg</code> use the
  966. command:
  967. </p><div class="example">
  968. <pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
  969. </pre></div>
  970. <p>For more information about OSS see:
  971. <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
  972. </p>
  973. <a name="pulse"></a>
  974. <h3 class="section">3.16 pulse<span class="pull-right"><a class="anchor hidden-xs" href="#pulse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pulse" aria-hidden="true">TOC</a></span></h3>
  975. <p>PulseAudio input device.
  976. </p>
  977. <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
  978. </p>
  979. <p>The filename to provide to the input device is a source device or the
  980. string &quot;default&quot;
  981. </p>
  982. <p>To list the PulseAudio source devices and their properties you can invoke
  983. the command <code>pactl list sources</code>.
  984. </p>
  985. <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>.
  986. </p>
  987. <a name="Options-8"></a>
  988. <h4 class="subsection">3.16.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>
  989. <dl compact="compact">
  990. <dt><samp>server</samp></dt>
  991. <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
  992. Default server is used when not provided.
  993. </p>
  994. </dd>
  995. <dt><samp>name</samp></dt>
  996. <dd><p>Specify the application name PulseAudio will use when showing active clients,
  997. by default it is the <code>LIBAVFORMAT_IDENT</code> string.
  998. </p>
  999. </dd>
  1000. <dt><samp>stream_name</samp></dt>
  1001. <dd><p>Specify the stream name PulseAudio will use when showing active streams,
  1002. by default it is &quot;record&quot;.
  1003. </p>
  1004. </dd>
  1005. <dt><samp>sample_rate</samp></dt>
  1006. <dd><p>Specify the samplerate in Hz, by default 48kHz is used.
  1007. </p>
  1008. </dd>
  1009. <dt><samp>channels</samp></dt>
  1010. <dd><p>Specify the channels in use, by default 2 (stereo) is set.
  1011. </p>
  1012. </dd>
  1013. <dt><samp>frame_size</samp></dt>
  1014. <dd><p>Specify the number of bytes per frame, by default it is set to 1024.
  1015. </p>
  1016. </dd>
  1017. <dt><samp>fragment_size</samp></dt>
  1018. <dd><p>Specify the minimal buffering fragment in PulseAudio, it will affect the
  1019. audio latency. By default it is unset.
  1020. </p></dd>
  1021. </dl>
  1022. <a name="Examples-6"></a>
  1023. <h4 class="subsection">3.16.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-6" aria-hidden="true">TOC</a></span></h4>
  1024. <p>Record a stream from default device:
  1025. </p><div class="example">
  1026. <pre class="example">ffmpeg -f pulse -i default /tmp/pulse.wav
  1027. </pre></div>
  1028. <a name="qtkit"></a>
  1029. <h3 class="section">3.17 qtkit<span class="pull-right"><a class="anchor hidden-xs" href="#qtkit" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-qtkit" aria-hidden="true">TOC</a></span></h3>
  1030. <p>QTKit input device.
  1031. </p>
  1032. <p>The filename passed as input is parsed to contain either a device name or index.
  1033. The device index can also be given by using -video_device_index.
  1034. A given device index will override any given device name.
  1035. If the desired device consists of numbers only, use -video_device_index to identify it.
  1036. The default device will be chosen if an empty string or the device name &quot;default&quot; is given.
  1037. The available devices can be enumerated by using -list_devices.
  1038. </p>
  1039. <div class="example">
  1040. <pre class="example">ffmpeg -f qtkit -i &quot;0&quot; out.mpg
  1041. </pre></div>
  1042. <div class="example">
  1043. <pre class="example">ffmpeg -f qtkit -video_device_index 0 -i &quot;&quot; out.mpg
  1044. </pre></div>
  1045. <div class="example">
  1046. <pre class="example">ffmpeg -f qtkit -i &quot;default&quot; out.mpg
  1047. </pre></div>
  1048. <div class="example">
  1049. <pre class="example">ffmpeg -f qtkit -list_devices true -i &quot;&quot;
  1050. </pre></div>
  1051. <a name="sndio"></a>
  1052. <h3 class="section">3.18 sndio<span class="pull-right"><a class="anchor hidden-xs" href="#sndio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sndio" aria-hidden="true">TOC</a></span></h3>
  1053. <p>sndio input device.
  1054. </p>
  1055. <p>To enable this input device during configuration you need libsndio
  1056. installed on your system.
  1057. </p>
  1058. <p>The filename to provide to the input device is the device node
  1059. representing the sndio input device, and is usually set to
  1060. <samp>/dev/audio0</samp>.
  1061. </p>
  1062. <p>For example to grab from <samp>/dev/audio0</samp> using <code>ffmpeg</code> use the
  1063. command:
  1064. </p><div class="example">
  1065. <pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
  1066. </pre></div>
  1067. <a name="video4linux2_002c-v4l2"></a>
  1068. <h3 class="section">3.19 video4linux2, v4l2<span class="pull-right"><a class="anchor hidden-xs" href="#video4linux2_002c-v4l2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-video4linux2_002c-v4l2" aria-hidden="true">TOC</a></span></h3>
  1069. <p>Video4Linux2 input video device.
  1070. </p>
  1071. <p>&quot;v4l2&quot; can be used as alias for &quot;video4linux2&quot;.
  1072. </p>
  1073. <p>If FFmpeg is built with v4l-utils support (by using the
  1074. <code>--enable-libv4l2</code> configure option), it is possible to use it with the
  1075. <code>-use_libv4l2</code> input device option.
  1076. </p>
  1077. <p>The name of the device to grab is a file device node, usually Linux
  1078. systems tend to automatically create such nodes when the device
  1079. (e.g. an USB webcam) is plugged into the system, and has a name of the
  1080. kind <samp>/dev/video<var>N</var></samp>, where <var>N</var> is a number associated to
  1081. the device.
  1082. </p>
  1083. <p>Video4Linux2 devices usually support a limited set of
  1084. <var>width</var>x<var>height</var> sizes and frame rates. You can check which are
  1085. supported using <code>-list_formats all</code> for Video4Linux2 devices.
  1086. Some devices, like TV cards, support one or more standards. It is possible
  1087. to list all the supported standards using <code>-list_standards all</code>.
  1088. </p>
  1089. <p>The time base for the timestamps is 1 microsecond. Depending on the kernel
  1090. version and configuration, the timestamps may be derived from the real time
  1091. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  1092. boot time, unaffected by NTP or manual changes to the clock). The
  1093. <samp>-timestamps abs</samp> or <samp>-ts abs</samp> option can be used to force
  1094. conversion into the real time clock.
  1095. </p>
  1096. <p>Some usage examples of the video4linux2 device with <code>ffmpeg</code>
  1097. and <code>ffplay</code>:
  1098. </p><ul>
  1099. <li> Grab and show the input of a video4linux2 device:
  1100. <div class="example">
  1101. <pre class="example">ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
  1102. </pre></div>
  1103. </li><li> Grab and record the input of a video4linux2 device, leave the
  1104. frame rate and size as previously set:
  1105. <div class="example">
  1106. <pre class="example">ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
  1107. </pre></div>
  1108. </li></ul>
  1109. <p>For more information about Video4Linux, check <a href="http://linuxtv.org/">http://linuxtv.org/</a>.
  1110. </p>
  1111. <a name="Options-9"></a>
  1112. <h4 class="subsection">3.19.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>
  1113. <dl compact="compact">
  1114. <dt><samp>standard</samp></dt>
  1115. <dd><p>Set the standard. Must be the name of a supported standard. To get a
  1116. list of the supported standards, use the <samp>list_standards</samp>
  1117. option.
  1118. </p>
  1119. </dd>
  1120. <dt><samp>channel</samp></dt>
  1121. <dd><p>Set the input channel number. Default to -1, which means using the
  1122. previously selected channel.
  1123. </p>
  1124. </dd>
  1125. <dt><samp>video_size</samp></dt>
  1126. <dd><p>Set the video frame size. The argument must be a string in the form
  1127. <var>WIDTH</var>x<var>HEIGHT</var> or a valid size abbreviation.
  1128. </p>
  1129. </dd>
  1130. <dt><samp>pixel_format</samp></dt>
  1131. <dd><p>Select the pixel format (only valid for raw video input).
  1132. </p>
  1133. </dd>
  1134. <dt><samp>input_format</samp></dt>
  1135. <dd><p>Set the preferred pixel format (for raw video) or a codec name.
  1136. This option allows one to select the input format, when several are
  1137. available.
  1138. </p>
  1139. </dd>
  1140. <dt><samp>framerate</samp></dt>
  1141. <dd><p>Set the preferred video frame rate.
  1142. </p>
  1143. </dd>
  1144. <dt><samp>list_formats</samp></dt>
  1145. <dd><p>List available formats (supported pixel formats, codecs, and frame
  1146. sizes) and exit.
  1147. </p>
  1148. <p>Available values are:
  1149. </p><dl compact="compact">
  1150. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  1151. <dd><p>Show all available (compressed and non-compressed) formats.
  1152. </p>
  1153. </dd>
  1154. <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
  1155. <dd><p>Show only raw video (non-compressed) formats.
  1156. </p>
  1157. </dd>
  1158. <dt>&lsquo;<samp>compressed</samp>&rsquo;</dt>
  1159. <dd><p>Show only compressed formats.
  1160. </p></dd>
  1161. </dl>
  1162. </dd>
  1163. <dt><samp>list_standards</samp></dt>
  1164. <dd><p>List supported standards and exit.
  1165. </p>
  1166. <p>Available values are:
  1167. </p><dl compact="compact">
  1168. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  1169. <dd><p>Show all supported standards.
  1170. </p></dd>
  1171. </dl>
  1172. </dd>
  1173. <dt><samp>timestamps, ts</samp></dt>
  1174. <dd><p>Set type of timestamps for grabbed frames.
  1175. </p>
  1176. <p>Available values are:
  1177. </p><dl compact="compact">
  1178. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  1179. <dd><p>Use timestamps from the kernel.
  1180. </p>
  1181. </dd>
  1182. <dt>&lsquo;<samp>abs</samp>&rsquo;</dt>
  1183. <dd><p>Use absolute timestamps (wall clock).
  1184. </p>
  1185. </dd>
  1186. <dt>&lsquo;<samp>mono2abs</samp>&rsquo;</dt>
  1187. <dd><p>Force conversion from monotonic to absolute timestamps.
  1188. </p></dd>
  1189. </dl>
  1190. <p>Default value is <code>default</code>.
  1191. </p></dd>
  1192. </dl>
  1193. <a name="vfwcap"></a>
  1194. <h3 class="section">3.20 vfwcap<span class="pull-right"><a class="anchor hidden-xs" href="#vfwcap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vfwcap" aria-hidden="true">TOC</a></span></h3>
  1195. <p>VfW (Video for Windows) capture input device.
  1196. </p>
  1197. <p>The filename passed as input is the capture driver number, ranging from
  1198. 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
  1199. other filename will be interpreted as device number 0.
  1200. </p>
  1201. <a name="x11grab"></a>
  1202. <h3 class="section">3.21 x11grab<span class="pull-right"><a class="anchor hidden-xs" href="#x11grab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-x11grab" aria-hidden="true">TOC</a></span></h3>
  1203. <p>X11 video input device.
  1204. </p>
  1205. <p>To enable this input device during configuration you need libxcb
  1206. installed on your system. It will be automatically detected during
  1207. configuration.
  1208. </p>
  1209. <p>Alternatively, the configure option <samp>--enable-x11grab</samp> exists
  1210. for legacy Xlib users.
  1211. </p>
  1212. <p>This device allows one to capture a region of an X11 display.
  1213. </p>
  1214. <p>The filename passed as input has the syntax:
  1215. </p><div class="example">
  1216. <pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
  1217. </pre></div>
  1218. <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
  1219. X11 display name of the screen to grab from. <var>hostname</var> can be
  1220. omitted, and defaults to &quot;localhost&quot;. The environment variable
  1221. <code>DISPLAY</code> contains the default display name.
  1222. </p>
  1223. <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
  1224. area with respect to the top-left border of the X11 screen. They
  1225. default to 0.
  1226. </p>
  1227. <p>Check the X11 documentation (e.g. <code>man X</code>) for more detailed
  1228. information.
  1229. </p>
  1230. <p>Use the <code>xdpyinfo</code> program for getting basic information about
  1231. the properties of your X11 display (e.g. grep for &quot;name&quot; or
  1232. &quot;dimensions&quot;).
  1233. </p>
  1234. <p>For example to grab from <samp>:0.0</samp> using <code>ffmpeg</code>:
  1235. </p><div class="example">
  1236. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
  1237. </pre></div>
  1238. <p>Grab at position <code>10,20</code>:
  1239. </p><div class="example">
  1240. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  1241. </pre></div>
  1242. <a name="Options-10"></a>
  1243. <h4 class="subsection">3.21.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-10" aria-hidden="true">TOC</a></span></h4>
  1244. <dl compact="compact">
  1245. <dt><samp>draw_mouse</samp></dt>
  1246. <dd><p>Specify whether to draw the mouse pointer. A value of <code>0</code> specify
  1247. not to draw the pointer. Default value is <code>1</code>.
  1248. </p>
  1249. </dd>
  1250. <dt><samp>follow_mouse</samp></dt>
  1251. <dd><p>Make the grabbed area follow the mouse. The argument can be
  1252. <code>centered</code> or a number of pixels <var>PIXELS</var>.
  1253. </p>
  1254. <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
  1255. pointer and keeps the pointer at the center of region; otherwise, the region
  1256. follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
  1257. zero) to the edge of region.
  1258. </p>
  1259. <p>For example:
  1260. </p><div class="example">
  1261. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
  1262. </pre></div>
  1263. <p>To follow only when the mouse pointer reaches within 100 pixels to edge:
  1264. </p><div class="example">
  1265. <pre class="example">ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
  1266. </pre></div>
  1267. </dd>
  1268. <dt><samp>framerate</samp></dt>
  1269. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  1270. corresponding to a frame rate of <code>30000/1001</code>.
  1271. </p>
  1272. </dd>
  1273. <dt><samp>show_region</samp></dt>
  1274. <dd><p>Show grabbed region on screen.
  1275. </p>
  1276. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  1277. region will be indicated on screen. With this option, it is easy to
  1278. know what is being grabbed if only a portion of the screen is grabbed.
  1279. </p>
  1280. </dd>
  1281. <dt><samp>region_border</samp></dt>
  1282. <dd><p>Set the region border thickness if <samp>-show_region 1</samp> is used.
  1283. Range is 1 to 128 and default is 3 (XCB-based x11grab only).
  1284. </p>
  1285. <p>For example:
  1286. </p><div class="example">
  1287. <pre class="example">ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  1288. </pre></div>
  1289. <p>With <var>follow_mouse</var>:
  1290. </p><div class="example">
  1291. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
  1292. </pre></div>
  1293. </dd>
  1294. <dt><samp>video_size</samp></dt>
  1295. <dd><p>Set the video frame size. Default value is <code>vga</code>.
  1296. </p>
  1297. </dd>
  1298. <dt><samp>use_shm</samp></dt>
  1299. <dd><p>Use the MIT-SHM extension for shared memory. Default value is <code>1</code>.
  1300. It may be necessary to disable it for remote displays (legacy x11grab
  1301. only).
  1302. </p></dd>
  1303. </dl>
  1304. <a name="grab_005fx-grab_005fy-AVOption"></a>
  1305. <h4 class="subsection">3.21.2 <var>grab_x</var> <var>grab_y</var> AVOption<span class="pull-right"><a class="anchor hidden-xs" href="#grab_005fx-grab_005fy-AVOption" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-grab_005fx-grab_005fy-AVOption" aria-hidden="true">TOC</a></span></h4>
  1306. <p>The syntax is:
  1307. </p><div class="example">
  1308. <pre class="example">-grab_x <var>x_offset</var> -grab_y <var>y_offset</var>
  1309. </pre></div>
  1310. <p>Set the grabbing region coordinates. They are expressed as offset from the top left
  1311. corner of the X11 window. The default value is 0.
  1312. </p>
  1313. <a name="Output-Devices"></a>
  1314. <h2 class="chapter">4 Output Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Output-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Output-Devices" aria-hidden="true">TOC</a></span></h2>
  1315. <p>Output devices are configured elements in FFmpeg that can write
  1316. multimedia data to an output device attached to your system.
  1317. </p>
  1318. <p>When you configure your FFmpeg build, all the supported output devices
  1319. are enabled by default. You can list all available ones using the
  1320. configure option &quot;&ndash;list-outdevs&quot;.
  1321. </p>
  1322. <p>You can disable all the output devices using the configure option
  1323. &quot;&ndash;disable-outdevs&quot;, and selectively enable an output device using the
  1324. option &quot;&ndash;enable-outdev=<var>OUTDEV</var>&quot;, or you can disable a particular
  1325. input device using the option &quot;&ndash;disable-outdev=<var>OUTDEV</var>&quot;.
  1326. </p>
  1327. <p>The option &quot;-devices&quot; of the ff* tools will display the list of
  1328. enabled output devices.
  1329. </p>
  1330. <p>A description of the currently available output devices follows.
  1331. </p>
  1332. <a name="alsa-1"></a>
  1333. <h3 class="section">4.1 alsa<span class="pull-right"><a class="anchor hidden-xs" href="#alsa-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alsa-1" aria-hidden="true">TOC</a></span></h3>
  1334. <p>ALSA (Advanced Linux Sound Architecture) output device.
  1335. </p>
  1336. <a name="Examples-7"></a>
  1337. <h4 class="subsection">4.1.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-7" aria-hidden="true">TOC</a></span></h4>
  1338. <ul>
  1339. <li> Play a file on default ALSA device:
  1340. <div class="example">
  1341. <pre class="example">ffmpeg -i INPUT -f alsa default
  1342. </pre></div>
  1343. </li><li> Play a file on soundcard 1, audio device 7:
  1344. <div class="example">
  1345. <pre class="example">ffmpeg -i INPUT -f alsa hw:1,7
  1346. </pre></div>
  1347. </li></ul>
  1348. <a name="caca"></a>
  1349. <h3 class="section">4.2 caca<span class="pull-right"><a class="anchor hidden-xs" href="#caca" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-caca" aria-hidden="true">TOC</a></span></h3>
  1350. <p>CACA output device.
  1351. </p>
  1352. <p>This output device allows one to show a video stream in CACA window.
  1353. Only one CACA window is allowed per application, so you can
  1354. have only one instance of this output device in an application.
  1355. </p>
  1356. <p>To enable this output device you need to configure FFmpeg with
  1357. <code>--enable-libcaca</code>.
  1358. libcaca is a graphics library that outputs text instead of pixels.
  1359. </p>
  1360. <p>For more information about libcaca, check:
  1361. <a href="http://caca.zoy.org/wiki/libcaca">http://caca.zoy.org/wiki/libcaca</a>
  1362. </p>
  1363. <a name="Options-11"></a>
  1364. <h4 class="subsection">4.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-11" aria-hidden="true">TOC</a></span></h4>
  1365. <dl compact="compact">
  1366. <dt><samp>window_title</samp></dt>
  1367. <dd><p>Set the CACA window title, if not specified default to the filename
  1368. specified for the output device.
  1369. </p>
  1370. </dd>
  1371. <dt><samp>window_size</samp></dt>
  1372. <dd><p>Set the CACA window size, can be a string of the form
  1373. <var>width</var>x<var>height</var> or a video size abbreviation.
  1374. If not specified it defaults to the size of the input video.
  1375. </p>
  1376. </dd>
  1377. <dt><samp>driver</samp></dt>
  1378. <dd><p>Set display driver.
  1379. </p>
  1380. </dd>
  1381. <dt><samp>algorithm</samp></dt>
  1382. <dd><p>Set dithering algorithm. Dithering is necessary
  1383. because the picture being rendered has usually far more colours than
  1384. the available palette.
  1385. The accepted values are listed with <code>-list_dither algorithms</code>.
  1386. </p>
  1387. </dd>
  1388. <dt><samp>antialias</samp></dt>
  1389. <dd><p>Set antialias method. Antialiasing smoothens the rendered
  1390. image and avoids the commonly seen staircase effect.
  1391. The accepted values are listed with <code>-list_dither antialiases</code>.
  1392. </p>
  1393. </dd>
  1394. <dt><samp>charset</samp></dt>
  1395. <dd><p>Set which characters are going to be used when rendering text.
  1396. The accepted values are listed with <code>-list_dither charsets</code>.
  1397. </p>
  1398. </dd>
  1399. <dt><samp>color</samp></dt>
  1400. <dd><p>Set color to be used when rendering text.
  1401. The accepted values are listed with <code>-list_dither colors</code>.
  1402. </p>
  1403. </dd>
  1404. <dt><samp>list_drivers</samp></dt>
  1405. <dd><p>If set to <samp>true</samp>, print a list of available drivers and exit.
  1406. </p>
  1407. </dd>
  1408. <dt><samp>list_dither</samp></dt>
  1409. <dd><p>List available dither options related to the argument.
  1410. The argument must be one of <code>algorithms</code>, <code>antialiases</code>,
  1411. <code>charsets</code>, <code>colors</code>.
  1412. </p></dd>
  1413. </dl>
  1414. <a name="Examples-8"></a>
  1415. <h4 class="subsection">4.2.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-8" aria-hidden="true">TOC</a></span></h4>
  1416. <ul>
  1417. <li> The following command shows the <code>ffmpeg</code> output is an
  1418. CACA window, forcing its size to 80x25:
  1419. <div class="example">
  1420. <pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
  1421. </pre></div>
  1422. </li><li> Show the list of available drivers and exit:
  1423. <div class="example">
  1424. <pre class="example">ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
  1425. </pre></div>
  1426. </li><li> Show the list of available dither colors and exit:
  1427. <div class="example">
  1428. <pre class="example">ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
  1429. </pre></div>
  1430. </li></ul>
  1431. <a name="decklink-1"></a>
  1432. <h3 class="section">4.3 decklink<span class="pull-right"><a class="anchor hidden-xs" href="#decklink-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decklink-1" aria-hidden="true">TOC</a></span></h3>
  1433. <p>The decklink output device provides playback capabilities for Blackmagic
  1434. DeckLink devices.
  1435. </p>
  1436. <p>To enable this output device, you need the Blackmagic DeckLink SDK and you
  1437. need to configure with the appropriate <code>--extra-cflags</code>
  1438. and <code>--extra-ldflags</code>.
  1439. On Windows, you need to run the IDL files through <code>widl</code>.
  1440. </p>
  1441. <p>DeckLink is very picky about the formats it supports. Pixel format is always
  1442. uyvy422, framerate and video size must be determined for your device with
  1443. <code>-list_formats 1</code>. Audio sample rate is always 48 kHz.
  1444. </p>
  1445. <a name="Options-12"></a>
  1446. <h4 class="subsection">4.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-12" aria-hidden="true">TOC</a></span></h4>
  1447. <dl compact="compact">
  1448. <dt><samp>list_devices</samp></dt>
  1449. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  1450. Defaults to <samp>false</samp>.
  1451. </p>
  1452. </dd>
  1453. <dt><samp>list_formats</samp></dt>
  1454. <dd><p>If set to <samp>true</samp>, print a list of supported formats and exit.
  1455. Defaults to <samp>false</samp>.
  1456. </p>
  1457. </dd>
  1458. <dt><samp>preroll</samp></dt>
  1459. <dd><p>Amount of time to preroll video in seconds.
  1460. Defaults to <samp>0.5</samp>.
  1461. </p>
  1462. </dd>
  1463. </dl>
  1464. <a name="Examples-9"></a>
  1465. <h4 class="subsection">4.3.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-9" aria-hidden="true">TOC</a></span></h4>
  1466. <ul>
  1467. <li> List output devices:
  1468. <div class="example">
  1469. <pre class="example">ffmpeg -i test.avi -f decklink -list_devices 1 dummy
  1470. </pre></div>
  1471. </li><li> List supported formats:
  1472. <div class="example">
  1473. <pre class="example">ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor'
  1474. </pre></div>
  1475. </li><li> Play video clip:
  1476. <div class="example">
  1477. <pre class="example">ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor'
  1478. </pre></div>
  1479. </li><li> Play video clip with non-standard framerate or video size:
  1480. <div class="example">
  1481. <pre class="example">ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor'
  1482. </pre></div>
  1483. </li></ul>
  1484. <a name="fbdev-1"></a>
  1485. <h3 class="section">4.4 fbdev<span class="pull-right"><a class="anchor hidden-xs" href="#fbdev-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fbdev-1" aria-hidden="true">TOC</a></span></h3>
  1486. <p>Linux framebuffer output device.
  1487. </p>
  1488. <p>The Linux framebuffer is a graphic hardware-independent abstraction
  1489. layer to show graphics on a computer monitor, typically on the
  1490. console. It is accessed through a file device node, usually
  1491. <samp>/dev/fb0</samp>.
  1492. </p>
  1493. <p>For more detailed information read the file
  1494. <samp>Documentation/fb/framebuffer.txt</samp> included in the Linux source tree.
  1495. </p>
  1496. <a name="Options-13"></a>
  1497. <h4 class="subsection">4.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-13" aria-hidden="true">TOC</a></span></h4>
  1498. <dl compact="compact">
  1499. <dt><samp>xoffset</samp></dt>
  1500. <dt><samp>yoffset</samp></dt>
  1501. <dd><p>Set x/y coordinate of top left corner. Default is 0.
  1502. </p></dd>
  1503. </dl>
  1504. <a name="Examples-10"></a>
  1505. <h4 class="subsection">4.4.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-10" aria-hidden="true">TOC</a></span></h4>
  1506. <p>Play a file on framebuffer device <samp>/dev/fb0</samp>.
  1507. Required pixel format depends on current framebuffer settings.
  1508. </p><div class="example">
  1509. <pre class="example">ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
  1510. </pre></div>
  1511. <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
  1512. </p>
  1513. <a name="opengl"></a>
  1514. <h3 class="section">4.5 opengl<span class="pull-right"><a class="anchor hidden-xs" href="#opengl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-opengl" aria-hidden="true">TOC</a></span></h3>
  1515. <p>OpenGL output device.
  1516. </p>
  1517. <p>To enable this output device you need to configure FFmpeg with <code>--enable-opengl</code>.
  1518. </p>
  1519. <p>This output device allows one to render to OpenGL context.
  1520. Context may be provided by application or default SDL window is created.
  1521. </p>
  1522. <p>When device renders to external context, application must implement handlers for following messages:
  1523. <code>AV_DEV_TO_APP_CREATE_WINDOW_BUFFER</code> - create OpenGL context on current thread.
  1524. <code>AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER</code> - make OpenGL context current.
  1525. <code>AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER</code> - swap buffers.
  1526. <code>AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER</code> - destroy OpenGL context.
  1527. Application is also required to inform a device about current resolution by sending <code>AV_APP_TO_DEV_WINDOW_SIZE</code> message.
  1528. </p>
  1529. <a name="Options-14"></a>
  1530. <h4 class="subsection">4.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-14" aria-hidden="true">TOC</a></span></h4>
  1531. <dl compact="compact">
  1532. <dt><samp>background</samp></dt>
  1533. <dd><p>Set background color. Black is a default.
  1534. </p></dd>
  1535. <dt><samp>no_window</samp></dt>
  1536. <dd><p>Disables default SDL window when set to non-zero value.
  1537. Application must provide OpenGL context and both <code>window_size_cb</code> and <code>window_swap_buffers_cb</code> callbacks when set.
  1538. </p></dd>
  1539. <dt><samp>window_title</samp></dt>
  1540. <dd><p>Set the SDL window title, if not specified default to the filename specified for the output device.
  1541. Ignored when <samp>no_window</samp> is set.
  1542. </p></dd>
  1543. <dt><samp>window_size</samp></dt>
  1544. <dd><p>Set preferred window size, can be a string of the form widthxheight or a video size abbreviation.
  1545. If not specified it defaults to the size of the input video, downscaled according to the aspect ratio.
  1546. Mostly usable when <samp>no_window</samp> is not set.
  1547. </p>
  1548. </dd>
  1549. </dl>
  1550. <a name="Examples-11"></a>
  1551. <h4 class="subsection">4.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-11" aria-hidden="true">TOC</a></span></h4>
  1552. <p>Play a file on SDL window using OpenGL rendering:
  1553. </p><div class="example">
  1554. <pre class="example">ffmpeg -i INPUT -f opengl &quot;window title&quot;
  1555. </pre></div>
  1556. <a name="oss-1"></a>
  1557. <h3 class="section">4.6 oss<span class="pull-right"><a class="anchor hidden-xs" href="#oss-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oss-1" aria-hidden="true">TOC</a></span></h3>
  1558. <p>OSS (Open Sound System) output device.
  1559. </p>
  1560. <a name="pulse-1"></a>
  1561. <h3 class="section">4.7 pulse<span class="pull-right"><a class="anchor hidden-xs" href="#pulse-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pulse-1" aria-hidden="true">TOC</a></span></h3>
  1562. <p>PulseAudio output device.
  1563. </p>
  1564. <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
  1565. </p>
  1566. <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>
  1567. </p>
  1568. <a name="Options-15"></a>
  1569. <h4 class="subsection">4.7.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-15" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-15" aria-hidden="true">TOC</a></span></h4>
  1570. <dl compact="compact">
  1571. <dt><samp>server</samp></dt>
  1572. <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
  1573. Default server is used when not provided.
  1574. </p>
  1575. </dd>
  1576. <dt><samp>name</samp></dt>
  1577. <dd><p>Specify the application name PulseAudio will use when showing active clients,
  1578. by default it is the <code>LIBAVFORMAT_IDENT</code> string.
  1579. </p>
  1580. </dd>
  1581. <dt><samp>stream_name</samp></dt>
  1582. <dd><p>Specify the stream name PulseAudio will use when showing active streams,
  1583. by default it is set to the specified output name.
  1584. </p>
  1585. </dd>
  1586. <dt><samp>device</samp></dt>
  1587. <dd><p>Specify the device to use. Default device is used when not provided.
  1588. List of output devices can be obtained with command <code>pactl list sinks</code>.
  1589. </p>
  1590. </dd>
  1591. <dt><samp>buffer_size</samp></dt>
  1592. <dt><samp>buffer_duration</samp></dt>
  1593. <dd><p>Control the size and duration of the PulseAudio buffer. A small buffer
  1594. gives more control, but requires more frequent updates.
  1595. </p>
  1596. <p><samp>buffer_size</samp> specifies size in bytes while
  1597. <samp>buffer_duration</samp> specifies duration in milliseconds.
  1598. </p>
  1599. <p>When both options are provided then the highest value is used
  1600. (duration is recalculated to bytes using stream parameters). If they
  1601. are set to 0 (which is default), the device will use the default
  1602. PulseAudio duration value. By default PulseAudio set buffer duration
  1603. to around 2 seconds.
  1604. </p>
  1605. </dd>
  1606. <dt><samp>prebuf</samp></dt>
  1607. <dd><p>Specify pre-buffering size in bytes. The server does not start with
  1608. playback before at least <samp>prebuf</samp> bytes are available in the
  1609. buffer. By default this option is initialized to the same value as
  1610. <samp>buffer_size</samp> or <samp>buffer_duration</samp> (whichever is bigger).
  1611. </p>
  1612. </dd>
  1613. <dt><samp>minreq</samp></dt>
  1614. <dd><p>Specify minimum request size in bytes. The server does not request less
  1615. than <samp>minreq</samp> bytes from the client, instead waits until the buffer
  1616. is free enough to request more bytes at once. It is recommended to not set
  1617. this option, which will initialize this to a value that is deemed sensible
  1618. by the server.
  1619. </p>
  1620. </dd>
  1621. </dl>
  1622. <a name="Examples-12"></a>
  1623. <h4 class="subsection">4.7.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-12" aria-hidden="true">TOC</a></span></h4>
  1624. <p>Play a file on default device on default server:
  1625. </p><div class="example">
  1626. <pre class="example">ffmpeg -i INPUT -f pulse &quot;stream name&quot;
  1627. </pre></div>
  1628. <a name="sdl"></a>
  1629. <h3 class="section">4.8 sdl<span class="pull-right"><a class="anchor hidden-xs" href="#sdl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sdl" aria-hidden="true">TOC</a></span></h3>
  1630. <p>SDL (Simple DirectMedia Layer) output device.
  1631. </p>
  1632. <p>This output device allows one to show a video stream in an SDL
  1633. window. Only one SDL window is allowed per application, so you can
  1634. have only one instance of this output device in an application.
  1635. </p>
  1636. <p>To enable this output device you need libsdl installed on your system
  1637. when configuring your build.
  1638. </p>
  1639. <p>For more information about SDL, check:
  1640. <a href="http://www.libsdl.org/">http://www.libsdl.org/</a>
  1641. </p>
  1642. <a name="Options-16"></a>
  1643. <h4 class="subsection">4.8.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-16" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-16" aria-hidden="true">TOC</a></span></h4>
  1644. <dl compact="compact">
  1645. <dt><samp>window_title</samp></dt>
  1646. <dd><p>Set the SDL window title, if not specified default to the filename
  1647. specified for the output device.
  1648. </p>
  1649. </dd>
  1650. <dt><samp>icon_title</samp></dt>
  1651. <dd><p>Set the name of the iconified SDL window, if not specified it is set
  1652. to the same value of <var>window_title</var>.
  1653. </p>
  1654. </dd>
  1655. <dt><samp>window_size</samp></dt>
  1656. <dd><p>Set the SDL window size, can be a string of the form
  1657. <var>width</var>x<var>height</var> or a video size abbreviation.
  1658. If not specified it defaults to the size of the input video,
  1659. downscaled according to the aspect ratio.
  1660. </p>
  1661. </dd>
  1662. <dt><samp>window_fullscreen</samp></dt>
  1663. <dd><p>Set fullscreen mode when non-zero value is provided.
  1664. Default value is zero.
  1665. </p></dd>
  1666. </dl>
  1667. <a name="Interactive-commands"></a>
  1668. <h4 class="subsection">4.8.2 Interactive commands<span class="pull-right"><a class="anchor hidden-xs" href="#Interactive-commands" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Interactive-commands" aria-hidden="true">TOC</a></span></h4>
  1669. <p>The window created by the device can be controlled through the
  1670. following interactive commands.
  1671. </p>
  1672. <dl compact="compact">
  1673. <dt><tt class="key">q, ESC</tt></dt>
  1674. <dd><p>Quit the device immediately.
  1675. </p></dd>
  1676. </dl>
  1677. <a name="Examples-13"></a>
  1678. <h4 class="subsection">4.8.3 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-13" aria-hidden="true">TOC</a></span></h4>
  1679. <p>The following command shows the <code>ffmpeg</code> output is an
  1680. SDL window, forcing its size to the qcif format:
  1681. </p><div class="example">
  1682. <pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl &quot;SDL output&quot;
  1683. </pre></div>
  1684. <a name="sndio-1"></a>
  1685. <h3 class="section">4.9 sndio<span class="pull-right"><a class="anchor hidden-xs" href="#sndio-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sndio-1" aria-hidden="true">TOC</a></span></h3>
  1686. <p>sndio audio output device.
  1687. </p>
  1688. <a name="xv"></a>
  1689. <h3 class="section">4.10 xv<span class="pull-right"><a class="anchor hidden-xs" href="#xv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xv" aria-hidden="true">TOC</a></span></h3>
  1690. <p>XV (XVideo) output device.
  1691. </p>
  1692. <p>This output device allows one to show a video stream in a X Window System
  1693. window.
  1694. </p>
  1695. <a name="Options-17"></a>
  1696. <h4 class="subsection">4.10.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-17" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-17" aria-hidden="true">TOC</a></span></h4>
  1697. <dl compact="compact">
  1698. <dt><samp>display_name</samp></dt>
  1699. <dd><p>Specify the hardware display name, which determines the display and
  1700. communications domain to be used.
  1701. </p>
  1702. <p>The display name or DISPLAY environment variable can be a string in
  1703. the format <var>hostname</var>[:<var>number</var>[.<var>screen_number</var>]].
  1704. </p>
  1705. <p><var>hostname</var> specifies the name of the host machine on which the
  1706. display is physically attached. <var>number</var> specifies the number of
  1707. the display server on that host machine. <var>screen_number</var> specifies
  1708. the screen to be used on that server.
  1709. </p>
  1710. <p>If unspecified, it defaults to the value of the DISPLAY environment
  1711. variable.
  1712. </p>
  1713. <p>For example, <code>dual-headed:0.1</code> would specify screen 1 of display
  1714. 0 on the machine named &ldquo;dual-headed&rdquo;.
  1715. </p>
  1716. <p>Check the X11 specification for more detailed information about the
  1717. display name format.
  1718. </p>
  1719. </dd>
  1720. <dt><samp>window_id</samp></dt>
  1721. <dd><p>When set to non-zero value then device doesn&rsquo;t create new window,
  1722. but uses existing one with provided <var>window_id</var>. By default
  1723. this options is set to zero and device creates its own window.
  1724. </p>
  1725. </dd>
  1726. <dt><samp>window_size</samp></dt>
  1727. <dd><p>Set the created window size, can be a string of the form
  1728. <var>width</var>x<var>height</var> or a video size abbreviation. If not
  1729. specified it defaults to the size of the input video.
  1730. Ignored when <var>window_id</var> is set.
  1731. </p>
  1732. </dd>
  1733. <dt><samp>window_x</samp></dt>
  1734. <dt><samp>window_y</samp></dt>
  1735. <dd><p>Set the X and Y window offsets for the created window. They are both
  1736. set to 0 by default. The values may be ignored by the window manager.
  1737. Ignored when <var>window_id</var> is set.
  1738. </p>
  1739. </dd>
  1740. <dt><samp>window_title</samp></dt>
  1741. <dd><p>Set the window title, if not specified default to the filename
  1742. specified for the output device. Ignored when <var>window_id</var> is set.
  1743. </p></dd>
  1744. </dl>
  1745. <p>For more information about XVideo see <a href="http://www.x.org/">http://www.x.org/</a>.
  1746. </p>
  1747. <a name="Examples-14"></a>
  1748. <h4 class="subsection">4.10.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-14" aria-hidden="true">TOC</a></span></h4>
  1749. <ul>
  1750. <li> Decode, display and encode video input with <code>ffmpeg</code> at the
  1751. same time:
  1752. <div class="example">
  1753. <pre class="example">ffmpeg -i INPUT OUTPUT -f xv display
  1754. </pre></div>
  1755. </li><li> Decode and display the input video to multiple X11 windows:
  1756. <div class="example">
  1757. <pre class="example">ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
  1758. </pre></div>
  1759. </li></ul>
  1760. <a name="See-Also"></a>
  1761. <h2 class="chapter">5 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
  1762. <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>,
  1763. <a href="libavdevice.html">libavdevice</a>
  1764. </p>
  1765. <a name="Authors"></a>
  1766. <h2 class="chapter">6 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
  1767. <p>The FFmpeg developers.
  1768. </p>
  1769. <p>For details about the authorship, see the Git history of the project
  1770. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  1771. <code>git log</code> in the FFmpeg source directory, or browsing the
  1772. online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
  1773. </p>
  1774. <p>Maintainers for the specific components are listed in the file
  1775. <samp>MAINTAINERS</samp> in the source code tree.
  1776. </p>
  1777. <p style="font-size: small;">
  1778. This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  1779. </p>
  1780. </div>
  1781. </body>
  1782. </html>