ffmpeg-devices.1 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235
  1. .\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "FFMPEG-DEVICES 1"
  136. .TH FFMPEG-DEVICES 1 " " " " " "
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. ffmpeg\-devices \- FFmpeg devices
  143. .SH "DESCRIPTION"
  144. .IX Header "DESCRIPTION"
  145. This document describes the input and output devices provided by the
  146. libavdevice library.
  147. .SH "DEVICE OPTIONS"
  148. .IX Header "DEVICE OPTIONS"
  149. The libavdevice library provides the same interface as
  150. libavformat. Namely, an input device is considered like a demuxer, and
  151. an output device like a muxer, and the interface and generic device
  152. options are the same provided by libavformat (see the ffmpeg-formats
  153. manual).
  154. .PP
  155. In addition each input or output device may support so-called private
  156. options, which are specific for that component.
  157. .PP
  158. Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
  159. FFmpeg tools, or by setting the value explicitly in the device
  160. \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0
  161. for programmatic use.
  162. .SH "INPUT DEVICES"
  163. .IX Header "INPUT DEVICES"
  164. Input devices are configured elements in FFmpeg which enable accessing
  165. the data coming from a multimedia device attached to your system.
  166. .PP
  167. 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 \*(L"\-\-list\-indevs\*(R".
  170. .PP
  171. You can disable all the input devices using the configure option
  172. \&\*(L"\-\-disable\-indevs\*(R", and selectively enable an input device using the
  173. option "\-\-enable\-indev=\fI\s-1INDEV\s0\fR\*(L", or you can disable a particular
  174. input device using the option \*(R"\-\-disable\-indev=\fI\s-1INDEV\s0\fR".
  175. .PP
  176. The option \*(L"\-devices\*(R" of the ff* tools will display the list of
  177. supported input devices.
  178. .PP
  179. A description of the currently available input devices follows.
  180. .SS "alsa"
  181. .IX Subsection "alsa"
  182. \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) input device.
  183. .PP
  184. To enable this input device during configuration you need libasound
  185. installed on your system.
  186. .PP
  187. This device allows capturing from an \s-1ALSA\s0 device. The name of the
  188. device to capture has to be an \s-1ALSA\s0 card identifier.
  189. .PP
  190. An \s-1ALSA\s0 identifier has the syntax:
  191. .PP
  192. .Vb 1
  193. \& hw:<CARD>[,<DEV>[,<SUBDEV>]]
  194. .Ve
  195. .PP
  196. where the \fI\s-1DEV\s0\fR and \fI\s-1SUBDEV\s0\fR components are optional.
  197. .PP
  198. The three arguments (in order: \fI\s-1CARD\s0\fR,\fI\s-1DEV\s0\fR,\fI\s-1SUBDEV\s0\fR)
  199. specify card number or identifier, device number and subdevice number
  200. (\-1 means any).
  201. .PP
  202. To see the list of cards currently recognized by your system check the
  203. files \fI/proc/asound/cards\fR and \fI/proc/asound/devices\fR.
  204. .PP
  205. For example to capture with \fBffmpeg\fR from an \s-1ALSA\s0 device with
  206. card id 0, you may run the command:
  207. .PP
  208. .Vb 1
  209. \& ffmpeg \-f alsa \-i hw:0 alsaout.wav
  210. .Ve
  211. .PP
  212. For more information see:
  213. <\fBhttp://www.alsa\-project.org/alsa\-doc/alsa\-lib/pcm.html\fR>
  214. .PP
  215. \fIOptions\fR
  216. .IX Subsection "Options"
  217. .IP "\fBsample_rate\fR" 4
  218. .IX Item "sample_rate"
  219. Set the sample rate in Hz. Default is 48000.
  220. .IP "\fBchannels\fR" 4
  221. .IX Item "channels"
  222. Set the number of channels. Default is 2.
  223. .SS "android_camera"
  224. .IX Subsection "android_camera"
  225. Android camera input device.
  226. .PP
  227. This input devices uses the Android Camera2 \s-1NDK API\s0 which is
  228. available on devices with \s-1API\s0 level 24+. The availability of
  229. android_camera is autodetected during configuration.
  230. .PP
  231. This device allows capturing from all cameras on an Android device,
  232. which are integrated into the Camera2 \s-1NDK API.\s0
  233. .PP
  234. The available cameras are enumerated internally and can be selected
  235. with the \fIcamera_index\fR parameter. The input file string is
  236. discarded.
  237. .PP
  238. Generally the back facing camera has index 0 while the front facing
  239. camera has index 1.
  240. .PP
  241. \fIOptions\fR
  242. .IX Subsection "Options"
  243. .IP "\fBvideo_size\fR" 4
  244. .IX Item "video_size"
  245. Set the video size given as a string such as 640x480 or hd720.
  246. Falls back to the first available configuration reported by
  247. Android if requested video size is not available or by default.
  248. .IP "\fBframerate\fR" 4
  249. .IX Item "framerate"
  250. Set the video framerate.
  251. Falls back to the first available configuration reported by
  252. Android if requested framerate is not available or by default (\-1).
  253. .IP "\fBcamera_index\fR" 4
  254. .IX Item "camera_index"
  255. Set the index of the camera to use. Default is 0.
  256. .IP "\fBinput_queue_size\fR" 4
  257. .IX Item "input_queue_size"
  258. Set the maximum number of frames to buffer. Default is 5.
  259. .SS "avfoundation"
  260. .IX Subsection "avfoundation"
  261. AVFoundation input device.
  262. .PP
  263. AVFoundation is the currently recommended framework by Apple for streamgrabbing on \s-1OSX\s0 >= 10.7 as well as on iOS.
  264. .PP
  265. The input filename has to be given in the following syntax:
  266. .PP
  267. .Vb 1
  268. \& \-i "[[VIDEO]:[AUDIO]]"
  269. .Ve
  270. .PP
  271. The first entry selects the video input while the latter selects the audio input.
  272. The stream has to be specified by the device name or the device index as shown by the device list.
  273. Alternatively, the video and/or audio input device can be chosen by index using the
  274. .PP
  275. .Vb 1
  276. \& B<\-video_device_index E<lt>INDEXE<gt>>
  277. .Ve
  278. .PP
  279. and/or
  280. .PP
  281. .Vb 1
  282. \& B<\-audio_device_index E<lt>INDEXE<gt>>
  283. .Ve
  284. .PP
  285. , overriding any
  286. device name or index given in the input filename.
  287. .PP
  288. All available devices can be enumerated by using \fB\-list_devices true\fR, listing
  289. all device names and corresponding indices.
  290. .PP
  291. There are two device name aliases:
  292. .ie n .IP """default""" 4
  293. .el .IP "\f(CWdefault\fR" 4
  294. .IX Item "default"
  295. Select the AVFoundation default device of the corresponding type.
  296. .ie n .IP """none""" 4
  297. .el .IP "\f(CWnone\fR" 4
  298. .IX Item "none"
  299. Do not record the corresponding media type.
  300. This is equivalent to specifying an empty device name or index.
  301. .PP
  302. \fIOptions\fR
  303. .IX Subsection "Options"
  304. .PP
  305. AVFoundation supports the following options:
  306. .IP "\fB\-list_devices <TRUE|FALSE>\fR" 4
  307. .IX Item "-list_devices <TRUE|FALSE>"
  308. If set to true, a list of all available input devices is given showing all
  309. device names and indices.
  310. .IP "\fB\-video_device_index <\s-1INDEX\s0>\fR" 4
  311. .IX Item "-video_device_index <INDEX>"
  312. Specify the video device by its index. Overrides anything given in the input filename.
  313. .IP "\fB\-audio_device_index <\s-1INDEX\s0>\fR" 4
  314. .IX Item "-audio_device_index <INDEX>"
  315. Specify the audio device by its index. Overrides anything given in the input filename.
  316. .IP "\fB\-pixel_format <\s-1FORMAT\s0>\fR" 4
  317. .IX Item "-pixel_format <FORMAT>"
  318. Request the video device to use a specific pixel format.
  319. If the specified format is not supported, a list of available formats is given
  320. and the first one in this list is used instead. Available pixel formats are:
  321. \&\f(CW\*(C`monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
  322. bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
  323. yuv420p, nv12, yuyv422, gray\*(C'\fR
  324. .IP "\fB\-framerate\fR" 4
  325. .IX Item "-framerate"
  326. Set the grabbing frame rate. Default is \f(CW\*(C`ntsc\*(C'\fR, corresponding to a
  327. frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
  328. .IP "\fB\-video_size\fR" 4
  329. .IX Item "-video_size"
  330. Set the video frame size.
  331. .IP "\fB\-capture_cursor\fR" 4
  332. .IX Item "-capture_cursor"
  333. Capture the mouse pointer. Default is 0.
  334. .IP "\fB\-capture_mouse_clicks\fR" 4
  335. .IX Item "-capture_mouse_clicks"
  336. Capture the screen mouse clicks. Default is 0.
  337. .IP "\fB\-capture_raw_data\fR" 4
  338. .IX Item "-capture_raw_data"
  339. Capture the raw device data. Default is 0.
  340. Using this option may result in receiving the underlying data delivered to the AVFoundation framework. E.g. for muxed devices that sends raw \s-1DV\s0 data to the framework (like tape-based camcorders), setting this option to false results in extracted video frames captured in the designated pixel format only. Setting this option to true results in receiving the raw \s-1DV\s0 stream untouched.
  341. .PP
  342. \fIExamples\fR
  343. .IX Subsection "Examples"
  344. .IP "\(bu" 4
  345. Print the list of AVFoundation supported devices and exit:
  346. .Sp
  347. .Vb 1
  348. \& $ ffmpeg \-f avfoundation \-list_devices true \-i ""
  349. .Ve
  350. .IP "\(bu" 4
  351. Record video from video device 0 and audio from audio device 0 into out.avi:
  352. .Sp
  353. .Vb 1
  354. \& $ ffmpeg \-f avfoundation \-i "0:0" out.avi
  355. .Ve
  356. .IP "\(bu" 4
  357. Record video from video device 2 and audio from audio device 1 into out.avi:
  358. .Sp
  359. .Vb 1
  360. \& $ ffmpeg \-f avfoundation \-video_device_index 2 \-i ":1" out.avi
  361. .Ve
  362. .IP "\(bu" 4
  363. Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
  364. .Sp
  365. .Vb 1
  366. \& $ ffmpeg \-f avfoundation \-pixel_format bgr0 \-i "default:none" out.avi
  367. .Ve
  368. .IP "\(bu" 4
  369. Record raw \s-1DV\s0 data from a suitable input device and write the output into out.dv:
  370. .Sp
  371. .Vb 1
  372. \& $ ffmpeg \-f avfoundation \-capture_raw_data true \-i "zr100:none" out.dv
  373. .Ve
  374. .SS "bktr"
  375. .IX Subsection "bktr"
  376. \&\s-1BSD\s0 video input device.
  377. .PP
  378. \fIOptions\fR
  379. .IX Subsection "Options"
  380. .IP "\fBframerate\fR" 4
  381. .IX Item "framerate"
  382. Set the frame rate.
  383. .IP "\fBvideo_size\fR" 4
  384. .IX Item "video_size"
  385. Set the video frame size. Default is \f(CW\*(C`vga\*(C'\fR.
  386. .IP "\fBstandard\fR" 4
  387. .IX Item "standard"
  388. Available values are:
  389. .RS 4
  390. .IP "\fBpal\fR" 4
  391. .IX Item "pal"
  392. .PD 0
  393. .IP "\fBntsc\fR" 4
  394. .IX Item "ntsc"
  395. .IP "\fBsecam\fR" 4
  396. .IX Item "secam"
  397. .IP "\fBpaln\fR" 4
  398. .IX Item "paln"
  399. .IP "\fBpalm\fR" 4
  400. .IX Item "palm"
  401. .IP "\fBntscj\fR" 4
  402. .IX Item "ntscj"
  403. .RE
  404. .RS 4
  405. .RE
  406. .PD
  407. .SS "decklink"
  408. .IX Subsection "decklink"
  409. The decklink input device provides capture capabilities for Blackmagic
  410. DeckLink devices.
  411. .PP
  412. To enable this input device, you need the Blackmagic DeckLink \s-1SDK\s0 and you
  413. need to configure with the appropriate \f(CW\*(C`\-\-extra\-cflags\*(C'\fR
  414. and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR.
  415. On Windows, you need to run the \s-1IDL\s0 files through \fBwidl\fR.
  416. .PP
  417. DeckLink is very picky about the formats it supports. Pixel format of the
  418. input can be set with \fBraw_format\fR.
  419. Framerate and video size must be determined for your device with
  420. \&\fB\-list_formats 1\fR. Audio sample rate is always 48 kHz and the number
  421. of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single
  422. audio track.
  423. .PP
  424. \fIOptions\fR
  425. .IX Subsection "Options"
  426. .IP "\fBlist_devices\fR" 4
  427. .IX Item "list_devices"
  428. If set to \fBtrue\fR, print a list of devices and exit.
  429. Defaults to \fBfalse\fR. This option is deprecated, please use the
  430. \&\f(CW\*(C`\-sources\*(C'\fR option of ffmpeg to list the available input devices.
  431. .IP "\fBlist_formats\fR" 4
  432. .IX Item "list_formats"
  433. If set to \fBtrue\fR, print a list of supported formats and exit.
  434. Defaults to \fBfalse\fR.
  435. .IP "\fBformat_code <FourCC>\fR" 4
  436. .IX Item "format_code <FourCC>"
  437. This sets the input video format to the format given by the FourCC. To see
  438. the supported values of your device(s) use \fBlist_formats\fR.
  439. Note that there is a FourCC \fB'pal '\fR that can also be used
  440. as \fBpal\fR (3 letters).
  441. Default behavior is autodetection of the input video format, if the hardware
  442. supports it.
  443. .IP "\fBraw_format\fR" 4
  444. .IX Item "raw_format"
  445. Set the pixel format of the captured video.
  446. Available values are:
  447. .RS 4
  448. .IP "\fBauto\fR" 4
  449. .IX Item "auto"
  450. This is the default which means 8\-bit \s-1YUV 422\s0 or 8\-bit \s-1ARGB\s0 if format
  451. autodetection is used, 8\-bit \s-1YUV 422\s0 otherwise.
  452. .IP "\fBuyvy422\fR" 4
  453. .IX Item "uyvy422"
  454. 8\-bit \s-1YUV 422.\s0
  455. .IP "\fByuv422p10\fR" 4
  456. .IX Item "yuv422p10"
  457. 10\-bit \s-1YUV 422.\s0
  458. .IP "\fBargb\fR" 4
  459. .IX Item "argb"
  460. 8\-bit \s-1RGB.\s0
  461. .IP "\fBbgra\fR" 4
  462. .IX Item "bgra"
  463. 8\-bit \s-1RGB.\s0
  464. .IP "\fBrgb10\fR" 4
  465. .IX Item "rgb10"
  466. 10\-bit \s-1RGB.\s0
  467. .RE
  468. .RS 4
  469. .RE
  470. .IP "\fBteletext_lines\fR" 4
  471. .IX Item "teletext_lines"
  472. If set to nonzero, an additional teletext stream will be captured from the
  473. vertical ancillary data. Both \s-1SD PAL\s0 (576i) and \s-1HD\s0 (1080i or 1080p)
  474. sources are supported. In case of \s-1HD\s0 sources, \s-1OP47\s0 packets are decoded.
  475. .Sp
  476. This option is a bitmask of the \s-1SD PAL VBI\s0 lines captured, specifically lines 6
  477. to 22, and lines 318 to 335. Line 6 is the \s-1LSB\s0 in the mask. Selected lines
  478. which do not contain teletext information will be ignored. You can use the
  479. special \fBall\fR constant to select all possible lines, or
  480. \&\fBstandard\fR to skip lines 6, 318 and 319, which are not compatible with
  481. all receivers.
  482. .Sp
  483. For \s-1SD\s0 sources, ffmpeg needs to be compiled with \f(CW\*(C`\-\-enable\-libzvbi\*(C'\fR. For
  484. \&\s-1HD\s0 sources, on older (pre\-4K) DeckLink card models you have to capture in 10
  485. bit mode.
  486. .IP "\fBchannels\fR" 4
  487. .IX Item "channels"
  488. Defines number of audio channels to capture. Must be \fB2\fR, \fB8\fR or \fB16\fR.
  489. Defaults to \fB2\fR.
  490. .IP "\fBduplex_mode\fR" 4
  491. .IX Item "duplex_mode"
  492. Sets the decklink device duplex mode. Must be \fBunset\fR, \fBhalf\fR or \fBfull\fR.
  493. Defaults to \fBunset\fR.
  494. .IP "\fBtimecode_format\fR" 4
  495. .IX Item "timecode_format"
  496. Timecode type to include in the frame and video stream metadata. Must be
  497. \&\fBnone\fR, \fBrp188vitc\fR, \fBrp188vitc2\fR, \fBrp188ltc\fR,
  498. \&\fBrp188hfr\fR, \fBrp188any\fR, \fBvitc\fR, \fBvitc2\fR, or \fBserial\fR.
  499. Defaults to \fBnone\fR (not included).
  500. .Sp
  501. In order to properly support 50/60 fps timecodes, the ordering of the queried
  502. timecode types for \fBrp188any\fR is \s-1HFR, VITC1, VITC2\s0 and \s-1LTC\s0 for >30 fps
  503. content. Note that this is slightly different to the ordering used by the
  504. DeckLink \s-1API,\s0 which is \s-1HFR, VITC1, LTC, VITC2.\s0
  505. .IP "\fBvideo_input\fR" 4
  506. .IX Item "video_input"
  507. Sets the video input source. Must be \fBunset\fR, \fBsdi\fR, \fBhdmi\fR,
  508. \&\fBoptical_sdi\fR, \fBcomponent\fR, \fBcomposite\fR or \fBs_video\fR.
  509. Defaults to \fBunset\fR.
  510. .IP "\fBaudio_input\fR" 4
  511. .IX Item "audio_input"
  512. Sets the audio input source. Must be \fBunset\fR, \fBembedded\fR,
  513. \&\fBaes_ebu\fR, \fBanalog\fR, \fBanalog_xlr\fR, \fBanalog_rca\fR or
  514. \&\fBmicrophone\fR. Defaults to \fBunset\fR.
  515. .IP "\fBvideo_pts\fR" 4
  516. .IX Item "video_pts"
  517. Sets the video packet timestamp source. Must be \fBvideo\fR, \fBaudio\fR,
  518. \&\fBreference\fR, \fBwallclock\fR or \fBabs_wallclock\fR.
  519. Defaults to \fBvideo\fR.
  520. .IP "\fBaudio_pts\fR" 4
  521. .IX Item "audio_pts"
  522. Sets the audio packet timestamp source. Must be \fBvideo\fR, \fBaudio\fR,
  523. \&\fBreference\fR, \fBwallclock\fR or \fBabs_wallclock\fR.
  524. Defaults to \fBaudio\fR.
  525. .IP "\fBdraw_bars\fR" 4
  526. .IX Item "draw_bars"
  527. If set to \fBtrue\fR, color bars are drawn in the event of a signal loss.
  528. Defaults to \fBtrue\fR.
  529. .IP "\fBqueue_size\fR" 4
  530. .IX Item "queue_size"
  531. Sets maximum input buffer size in bytes. If the buffering reaches this value,
  532. incoming frames will be dropped.
  533. Defaults to \fB1073741824\fR.
  534. .IP "\fBaudio_depth\fR" 4
  535. .IX Item "audio_depth"
  536. Sets the audio sample bit depth. Must be \fB16\fR or \fB32\fR.
  537. Defaults to \fB16\fR.
  538. .IP "\fBdecklink_copyts\fR" 4
  539. .IX Item "decklink_copyts"
  540. If set to \fBtrue\fR, timestamps are forwarded as they are without removing
  541. the initial offset.
  542. Defaults to \fBfalse\fR.
  543. .IP "\fBtimestamp_align\fR" 4
  544. .IX Item "timestamp_align"
  545. Capture start time alignment in seconds. If set to nonzero, input frames are
  546. dropped till the system timestamp aligns with configured value.
  547. Alignment difference of up to one frame duration is tolerated.
  548. This is useful for maintaining input synchronization across N different
  549. hardware devices deployed for 'N\-way' redundancy. The system time of different
  550. hardware devices should be synchronized with protocols such as \s-1NTP\s0 or \s-1PTP,\s0
  551. before using this option.
  552. Note that this method is not foolproof. In some border cases input
  553. synchronization may not happen due to thread scheduling jitters in the \s-1OS.\s0
  554. Either sync could go wrong by 1 frame or in a rarer case
  555. \&\fBtimestamp_align\fR seconds.
  556. Defaults to \fB0\fR.
  557. .IP "\fBwait_for_tc (\fR\fIbool\fR\fB)\fR" 4
  558. .IX Item "wait_for_tc (bool)"
  559. Drop frames till a frame with timecode is received. Sometimes serial timecode
  560. isn't received with the first input frame. If that happens, the stored stream
  561. timecode will be inaccurate. If this option is set to \fBtrue\fR, input frames
  562. are dropped till a frame with timecode is received.
  563. Option \fItimecode_format\fR must be specified.
  564. Defaults to \fBfalse\fR.
  565. .IP "\fBenable_klv(\fR\fIbool\fR\fB)\fR" 4
  566. .IX Item "enable_klv(bool)"
  567. If set to \fBtrue\fR, extracts \s-1KLV\s0 data from \s-1VANC\s0 and outputs \s-1KLV\s0 packets.
  568. \&\s-1KLV VANC\s0 packets are joined based on \s-1MID\s0 and \s-1PSC\s0 fields and aggregated into
  569. one \s-1KLV\s0 packet.
  570. Defaults to \fBfalse\fR.
  571. .PP
  572. \fIExamples\fR
  573. .IX Subsection "Examples"
  574. .IP "\(bu" 4
  575. List input devices:
  576. .Sp
  577. .Vb 1
  578. \& ffmpeg \-sources decklink
  579. .Ve
  580. .IP "\(bu" 4
  581. List supported formats:
  582. .Sp
  583. .Vb 1
  584. \& ffmpeg \-f decklink \-list_formats 1 \-i \*(AqIntensity Pro\*(Aq
  585. .Ve
  586. .IP "\(bu" 4
  587. Capture video clip at 1080i50:
  588. .Sp
  589. .Vb 1
  590. \& ffmpeg \-format_code Hi50 \-f decklink \-i \*(AqIntensity Pro\*(Aq \-c:a copy \-c:v copy output.avi
  591. .Ve
  592. .IP "\(bu" 4
  593. Capture video clip at 1080i50 10 bit:
  594. .Sp
  595. .Vb 1
  596. \& ffmpeg \-raw_format yuv422p10 \-format_code Hi50 \-f decklink \-i \*(AqUltraStudio Mini Recorder\*(Aq \-c:a copy \-c:v copy output.avi
  597. .Ve
  598. .IP "\(bu" 4
  599. Capture video clip at 1080i50 with 16 audio channels:
  600. .Sp
  601. .Vb 1
  602. \& ffmpeg \-channels 16 \-format_code Hi50 \-f decklink \-i \*(AqUltraStudio Mini Recorder\*(Aq \-c:a copy \-c:v copy output.avi
  603. .Ve
  604. .SS "dshow"
  605. .IX Subsection "dshow"
  606. Windows DirectShow input device.
  607. .PP
  608. DirectShow support is enabled when FFmpeg is built with the mingw\-w64 project.
  609. Currently only audio and video devices are supported.
  610. .PP
  611. Multiple devices may be opened as separate inputs, but they may also be
  612. opened on the same input, which should improve synchronism between them.
  613. .PP
  614. The input name should be in the format:
  615. .PP
  616. .Vb 1
  617. \& <TYPE>=<NAME>[:<TYPE>=<NAME>]
  618. .Ve
  619. .PP
  620. where \fI\s-1TYPE\s0\fR can be either \fIaudio\fR or \fIvideo\fR,
  621. and \fI\s-1NAME\s0\fR is the device's name or alternative name..
  622. .PP
  623. \fIOptions\fR
  624. .IX Subsection "Options"
  625. .PP
  626. If no options are specified, the device's defaults are used.
  627. If the device does not support the requested options, it will
  628. fail to open.
  629. .IP "\fBvideo_size\fR" 4
  630. .IX Item "video_size"
  631. Set the video size in the captured video.
  632. .IP "\fBframerate\fR" 4
  633. .IX Item "framerate"
  634. Set the frame rate in the captured video.
  635. .IP "\fBsample_rate\fR" 4
  636. .IX Item "sample_rate"
  637. Set the sample rate (in Hz) of the captured audio.
  638. .IP "\fBsample_size\fR" 4
  639. .IX Item "sample_size"
  640. Set the sample size (in bits) of the captured audio.
  641. .IP "\fBchannels\fR" 4
  642. .IX Item "channels"
  643. Set the number of channels in the captured audio.
  644. .IP "\fBlist_devices\fR" 4
  645. .IX Item "list_devices"
  646. If set to \fBtrue\fR, print a list of devices and exit.
  647. .IP "\fBlist_options\fR" 4
  648. .IX Item "list_options"
  649. If set to \fBtrue\fR, print a list of selected device's options
  650. and exit.
  651. .IP "\fBvideo_device_number\fR" 4
  652. .IX Item "video_device_number"
  653. Set video device number for devices with the same name (starts at 0,
  654. defaults to 0).
  655. .IP "\fBaudio_device_number\fR" 4
  656. .IX Item "audio_device_number"
  657. Set audio device number for devices with the same name (starts at 0,
  658. defaults to 0).
  659. .IP "\fBpixel_format\fR" 4
  660. .IX Item "pixel_format"
  661. Select pixel format to be used by DirectShow. This may only be set when
  662. the video codec is not set or set to rawvideo.
  663. .IP "\fBaudio_buffer_size\fR" 4
  664. .IX Item "audio_buffer_size"
  665. Set audio device buffer size in milliseconds (which can directly
  666. impact latency, depending on the device).
  667. Defaults to using the audio device's
  668. default buffer size (typically some multiple of 500ms).
  669. Setting this value too low can degrade performance.
  670. See also
  671. <\fBhttp://msdn.microsoft.com/en\-us/library/windows/desktop/dd377582(v=vs.85).aspx\fR>
  672. .IP "\fBvideo_pin_name\fR" 4
  673. .IX Item "video_pin_name"
  674. Select video capture pin to use by name or alternative name.
  675. .IP "\fBaudio_pin_name\fR" 4
  676. .IX Item "audio_pin_name"
  677. Select audio capture pin to use by name or alternative name.
  678. .IP "\fBcrossbar_video_input_pin_number\fR" 4
  679. .IX Item "crossbar_video_input_pin_number"
  680. Select video input pin number for crossbar device. This will be
  681. routed to the crossbar device's Video Decoder output pin.
  682. Note that changing this value can affect future invocations
  683. (sets a new default) until system reboot occurs.
  684. .IP "\fBcrossbar_audio_input_pin_number\fR" 4
  685. .IX Item "crossbar_audio_input_pin_number"
  686. Select audio input pin number for crossbar device. This will be
  687. routed to the crossbar device's Audio Decoder output pin.
  688. Note that changing this value can affect future invocations
  689. (sets a new default) until system reboot occurs.
  690. .IP "\fBshow_video_device_dialog\fR" 4
  691. .IX Item "show_video_device_dialog"
  692. If set to \fBtrue\fR, before capture starts, popup a display dialog
  693. to the end user, allowing them to change video filter properties
  694. and configurations manually.
  695. Note that for crossbar devices, adjusting values in this dialog
  696. may be needed at times to toggle between \s-1PAL\s0 (25 fps) and \s-1NTSC\s0 (29.97)
  697. input frame rates, sizes, interlacing, etc. Changing these values can
  698. enable different scan rates/frame rates and avoiding green bars at
  699. the bottom, flickering scan lines, etc.
  700. Note that with some devices, changing these properties can also affect future
  701. invocations (sets new defaults) until system reboot occurs.
  702. .IP "\fBshow_audio_device_dialog\fR" 4
  703. .IX Item "show_audio_device_dialog"
  704. If set to \fBtrue\fR, before capture starts, popup a display dialog
  705. to the end user, allowing them to change audio filter properties
  706. and configurations manually.
  707. .IP "\fBshow_video_crossbar_connection_dialog\fR" 4
  708. .IX Item "show_video_crossbar_connection_dialog"
  709. If set to \fBtrue\fR, before capture starts, popup a display
  710. dialog to the end user, allowing them to manually
  711. modify crossbar pin routings, when it opens a video device.
  712. .IP "\fBshow_audio_crossbar_connection_dialog\fR" 4
  713. .IX Item "show_audio_crossbar_connection_dialog"
  714. If set to \fBtrue\fR, before capture starts, popup a display
  715. dialog to the end user, allowing them to manually
  716. modify crossbar pin routings, when it opens an audio device.
  717. .IP "\fBshow_analog_tv_tuner_dialog\fR" 4
  718. .IX Item "show_analog_tv_tuner_dialog"
  719. If set to \fBtrue\fR, before capture starts, popup a display
  720. dialog to the end user, allowing them to manually
  721. modify \s-1TV\s0 channels and frequencies.
  722. .IP "\fBshow_analog_tv_tuner_audio_dialog\fR" 4
  723. .IX Item "show_analog_tv_tuner_audio_dialog"
  724. If set to \fBtrue\fR, before capture starts, popup a display
  725. dialog to the end user, allowing them to manually
  726. modify \s-1TV\s0 audio (like mono vs. stereo, Language A,B or C).
  727. .IP "\fBaudio_device_load\fR" 4
  728. .IX Item "audio_device_load"
  729. Load an audio capture filter device from file instead of searching
  730. it by name. It may load additional parameters too, if the filter
  731. supports the serialization of its properties to.
  732. To use this an audio capture source has to be specified, but it can
  733. be anything even fake one.
  734. .IP "\fBaudio_device_save\fR" 4
  735. .IX Item "audio_device_save"
  736. Save the currently used audio capture filter device and its
  737. parameters (if the filter supports it) to a file.
  738. If a file with the same name exists it will be overwritten.
  739. .IP "\fBvideo_device_load\fR" 4
  740. .IX Item "video_device_load"
  741. Load a video capture filter device from file instead of searching
  742. it by name. It may load additional parameters too, if the filter
  743. supports the serialization of its properties to.
  744. To use this a video capture source has to be specified, but it can
  745. be anything even fake one.
  746. .IP "\fBvideo_device_save\fR" 4
  747. .IX Item "video_device_save"
  748. Save the currently used video capture filter device and its
  749. parameters (if the filter supports it) to a file.
  750. If a file with the same name exists it will be overwritten.
  751. .PP
  752. \fIExamples\fR
  753. .IX Subsection "Examples"
  754. .IP "\(bu" 4
  755. Print the list of DirectShow supported devices and exit:
  756. .Sp
  757. .Vb 1
  758. \& $ ffmpeg \-list_devices true \-f dshow \-i dummy
  759. .Ve
  760. .IP "\(bu" 4
  761. Open video device \fICamera\fR:
  762. .Sp
  763. .Vb 1
  764. \& $ ffmpeg \-f dshow \-i video="Camera"
  765. .Ve
  766. .IP "\(bu" 4
  767. Open second video device with name \fICamera\fR:
  768. .Sp
  769. .Vb 1
  770. \& $ ffmpeg \-f dshow \-video_device_number 1 \-i video="Camera"
  771. .Ve
  772. .IP "\(bu" 4
  773. Open video device \fICamera\fR and audio device \fIMicrophone\fR:
  774. .Sp
  775. .Vb 1
  776. \& $ ffmpeg \-f dshow \-i video="Camera":audio="Microphone"
  777. .Ve
  778. .IP "\(bu" 4
  779. Print the list of supported options in selected device and exit:
  780. .Sp
  781. .Vb 1
  782. \& $ ffmpeg \-list_options true \-f dshow \-i video="Camera"
  783. .Ve
  784. .IP "\(bu" 4
  785. Specify pin names to capture by name or alternative name, specify alternative device name:
  786. .Sp
  787. .Vb 1
  788. \& $ ffmpeg \-f dshow \-audio_pin_name "Audio Out" \-video_pin_name 2 \-i video=video="@device_pnp_\e\e?\epci#ven_1a0a&dev_6200&subsys_62021461&rev_01#4&e2c7dd6&0&00e1#{65e8773d\-8f56\-11d0\-a3b9\-00a0c9223196}\e{ca465100\-deb0\-4d59\-818f\-8c477184adf6}":audio="Microphone"
  789. .Ve
  790. .IP "\(bu" 4
  791. Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
  792. .Sp
  793. .Vb 2
  794. \& $ ffmpeg \-f dshow \-show_video_device_dialog true \-crossbar_video_input_pin_number 0
  795. \& \-crossbar_audio_input_pin_number 3 \-i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
  796. .Ve
  797. .SS "fbdev"
  798. .IX Subsection "fbdev"
  799. Linux framebuffer input device.
  800. .PP
  801. The Linux framebuffer is a graphic hardware-independent abstraction
  802. layer to show graphics on a computer monitor, typically on the
  803. console. It is accessed through a file device node, usually
  804. \&\fI/dev/fb0\fR.
  805. .PP
  806. For more detailed information read the file
  807. Documentation/fb/framebuffer.txt included in the Linux source tree.
  808. .PP
  809. See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fBfbset\fR\|(1).
  810. .PP
  811. To record from the framebuffer device \fI/dev/fb0\fR with
  812. \&\fBffmpeg\fR:
  813. .PP
  814. .Vb 1
  815. \& ffmpeg \-f fbdev \-framerate 10 \-i /dev/fb0 out.avi
  816. .Ve
  817. .PP
  818. You can take a single screenshot image with the command:
  819. .PP
  820. .Vb 1
  821. \& ffmpeg \-f fbdev \-framerate 1 \-i /dev/fb0 \-frames:v 1 screenshot.jpeg
  822. .Ve
  823. .PP
  824. \fIOptions\fR
  825. .IX Subsection "Options"
  826. .IP "\fBframerate\fR" 4
  827. .IX Item "framerate"
  828. Set the frame rate. Default is 25.
  829. .SS "gdigrab"
  830. .IX Subsection "gdigrab"
  831. Win32 GDI-based screen capture device.
  832. .PP
  833. This device allows you to capture a region of the display on Windows.
  834. .PP
  835. There are two options for the input filename:
  836. .PP
  837. .Vb 1
  838. \& desktop
  839. .Ve
  840. .PP
  841. or
  842. .PP
  843. .Vb 1
  844. \& title=<window_title>
  845. .Ve
  846. .PP
  847. The first option will capture the entire desktop, or a fixed region of the
  848. desktop. The second option will instead capture the contents of a single
  849. window, regardless of its position on the screen.
  850. .PP
  851. For example, to grab the entire desktop using \fBffmpeg\fR:
  852. .PP
  853. .Vb 1
  854. \& ffmpeg \-f gdigrab \-framerate 6 \-i desktop out.mpg
  855. .Ve
  856. .PP
  857. Grab a 640x480 region at position \f(CW\*(C`10,20\*(C'\fR:
  858. .PP
  859. .Vb 1
  860. \& ffmpeg \-f gdigrab \-framerate 6 \-offset_x 10 \-offset_y 20 \-video_size vga \-i desktop out.mpg
  861. .Ve
  862. .PP
  863. Grab the contents of the window named \*(L"Calculator\*(R"
  864. .PP
  865. .Vb 1
  866. \& ffmpeg \-f gdigrab \-framerate 6 \-i title=Calculator out.mpg
  867. .Ve
  868. .PP
  869. \fIOptions\fR
  870. .IX Subsection "Options"
  871. .IP "\fBdraw_mouse\fR" 4
  872. .IX Item "draw_mouse"
  873. Specify whether to draw the mouse pointer. Use the value \f(CW0\fR to
  874. not draw the pointer. Default value is \f(CW1\fR.
  875. .IP "\fBframerate\fR" 4
  876. .IX Item "framerate"
  877. Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR,
  878. corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
  879. .IP "\fBshow_region\fR" 4
  880. .IX Item "show_region"
  881. Show grabbed region on screen.
  882. .Sp
  883. If \fIshow_region\fR is specified with \f(CW1\fR, then the grabbing
  884. region will be indicated on screen. With this option, it is easy to
  885. know what is being grabbed if only a portion of the screen is grabbed.
  886. .Sp
  887. Note that \fIshow_region\fR is incompatible with grabbing the contents
  888. of a single window.
  889. .Sp
  890. For example:
  891. .Sp
  892. .Vb 1
  893. \& ffmpeg \-f gdigrab \-show_region 1 \-framerate 6 \-video_size cif \-offset_x 10 \-offset_y 20 \-i desktop out.mpg
  894. .Ve
  895. .IP "\fBvideo_size\fR" 4
  896. .IX Item "video_size"
  897. Set the video frame size. The default is to capture the full screen if \fIdesktop\fR is selected, or the full window size if \fItitle=\fIwindow_title\fI\fR is selected.
  898. .IP "\fBoffset_x\fR" 4
  899. .IX Item "offset_x"
  900. When capturing a region with \fIvideo_size\fR, set the distance from the left edge of the screen or desktop.
  901. .Sp
  902. 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 \fIoffset_x\fR value to move the region to that monitor.
  903. .IP "\fBoffset_y\fR" 4
  904. .IX Item "offset_y"
  905. When capturing a region with \fIvideo_size\fR, set the distance from the top edge of the screen or desktop.
  906. .Sp
  907. 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 \fIoffset_y\fR value to move the region to that monitor.
  908. .SS "iec61883"
  909. .IX Subsection "iec61883"
  910. FireWire \s-1DV/HDV\s0 input device using libiec61883.
  911. .PP
  912. To enable this input device, you need libiec61883, libraw1394 and
  913. libavc1394 installed on your system. Use the configure option
  914. \&\f(CW\*(C`\-\-enable\-libiec61883\*(C'\fR to compile with the device enabled.
  915. .PP
  916. The iec61883 capture device supports capturing from a video device
  917. connected via \s-1IEEE1394\s0 (FireWire), using libiec61883 and the new Linux
  918. FireWire stack (juju). This is the default \s-1DV/HDV\s0 input method in Linux
  919. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  920. .PP
  921. Specify the FireWire port to be used as input file, or \*(L"auto\*(R"
  922. to choose the first port connected.
  923. .PP
  924. \fIOptions\fR
  925. .IX Subsection "Options"
  926. .IP "\fBdvtype\fR" 4
  927. .IX Item "dvtype"
  928. Override autodetection of \s-1DV/HDV.\s0 This should only be used if auto
  929. detection does not work, or if usage of a different device type
  930. should be prohibited. Treating a \s-1DV\s0 device as \s-1HDV\s0 (or vice versa) will
  931. not work and result in undefined behavior.
  932. The values \fBauto\fR, \fBdv\fR and \fBhdv\fR are supported.
  933. .IP "\fBdvbuffer\fR" 4
  934. .IX Item "dvbuffer"
  935. Set maximum size of buffer for incoming data, in frames. For \s-1DV,\s0 this
  936. is an exact value. For \s-1HDV,\s0 it is not frame exact, since \s-1HDV\s0 does
  937. not have a fixed frame size.
  938. .IP "\fBdvguid\fR" 4
  939. .IX Item "dvguid"
  940. Select the capture device by specifying its \s-1GUID.\s0 Capturing will only
  941. be performed from the specified device and fails if no device with the
  942. given \s-1GUID\s0 is found. This is useful to select the input if multiple
  943. devices are connected at the same time.
  944. Look at /sys/bus/firewire/devices to find out the GUIDs.
  945. .PP
  946. \fIExamples\fR
  947. .IX Subsection "Examples"
  948. .IP "\(bu" 4
  949. Grab and show the input of a FireWire \s-1DV/HDV\s0 device.
  950. .Sp
  951. .Vb 1
  952. \& ffplay \-f iec61883 \-i auto
  953. .Ve
  954. .IP "\(bu" 4
  955. Grab and record the input of a FireWire \s-1DV/HDV\s0 device,
  956. using a packet buffer of 100000 packets if the source is \s-1HDV.\s0
  957. .Sp
  958. .Vb 1
  959. \& ffmpeg \-f iec61883 \-i auto \-dvbuffer 100000 out.mpg
  960. .Ve
  961. .SS "jack"
  962. .IX Subsection "jack"
  963. \&\s-1JACK\s0 input device.
  964. .PP
  965. To enable this input device during configuration you need libjack
  966. installed on your system.
  967. .PP
  968. A \s-1JACK\s0 input device creates one or more \s-1JACK\s0 writable clients, one for
  969. each audio channel, with name \fIclient_name\fR:input_\fIN\fR, where
  970. \&\fIclient_name\fR is the name provided by the application, and \fIN\fR
  971. is a number which identifies the channel.
  972. Each writable client will send the acquired data to the FFmpeg input
  973. device.
  974. .PP
  975. Once you have created one or more \s-1JACK\s0 readable clients, you need to
  976. connect them to one or more \s-1JACK\s0 writable clients.
  977. .PP
  978. To connect or disconnect \s-1JACK\s0 clients you can use the \fBjack_connect\fR
  979. and \fBjack_disconnect\fR programs, or do it through a graphical interface,
  980. for example with \fBqjackctl\fR.
  981. .PP
  982. To list the \s-1JACK\s0 clients and their properties you can invoke the command
  983. \&\fBjack_lsp\fR.
  984. .PP
  985. Follows an example which shows how to capture a \s-1JACK\s0 readable client
  986. with \fBffmpeg\fR.
  987. .PP
  988. .Vb 2
  989. \& # Create a JACK writable client with name "ffmpeg".
  990. \& $ ffmpeg \-f jack \-i ffmpeg \-y out.wav
  991. \&
  992. \& # Start the sample jack_metro readable client.
  993. \& $ jack_metro \-b 120 \-d 0.2 \-f 4000
  994. \&
  995. \& # List the current JACK clients.
  996. \& $ jack_lsp \-c
  997. \& system:capture_1
  998. \& system:capture_2
  999. \& system:playback_1
  1000. \& system:playback_2
  1001. \& ffmpeg:input_1
  1002. \& metro:120_bpm
  1003. \&
  1004. \& # Connect metro to the ffmpeg writable client.
  1005. \& $ jack_connect metro:120_bpm ffmpeg:input_1
  1006. .Ve
  1007. .PP
  1008. For more information read:
  1009. <\fBhttp://jackaudio.org/\fR>
  1010. .PP
  1011. \fIOptions\fR
  1012. .IX Subsection "Options"
  1013. .IP "\fBchannels\fR" 4
  1014. .IX Item "channels"
  1015. Set the number of channels. Default is 2.
  1016. .SS "kmsgrab"
  1017. .IX Subsection "kmsgrab"
  1018. \&\s-1KMS\s0 video input device.
  1019. .PP
  1020. Captures the \s-1KMS\s0 scanout framebuffer associated with a specified \s-1CRTC\s0 or plane as a
  1021. \&\s-1DRM\s0 object that can be passed to other hardware functions.
  1022. .PP
  1023. Requires either \s-1DRM\s0 master or \s-1CAP_SYS_ADMIN\s0 to run.
  1024. .PP
  1025. If you don't understand what all of that means, you probably don't want this. Look at
  1026. \&\fBx11grab\fR instead.
  1027. .PP
  1028. \fIOptions\fR
  1029. .IX Subsection "Options"
  1030. .IP "\fBdevice\fR" 4
  1031. .IX Item "device"
  1032. \&\s-1DRM\s0 device to capture on. Defaults to \fB/dev/dri/card0\fR.
  1033. .IP "\fBformat\fR" 4
  1034. .IX Item "format"
  1035. Pixel format of the framebuffer. This can be autodetected if you are running Linux 5.7
  1036. or later, but needs to be provided for earlier versions. Defaults to \fBbgr0\fR,
  1037. which is the most common format used by the Linux console and Xorg X server.
  1038. .IP "\fBformat_modifier\fR" 4
  1039. .IX Item "format_modifier"
  1040. Format modifier to signal on output frames. This is necessary to import correctly into
  1041. some APIs. It can be autodetected if you are running Linux 5.7 or later, but will need
  1042. to be provided explicitly when needed in earlier versions. See the libdrm documentation
  1043. for possible values.
  1044. .IP "\fBcrtc_id\fR" 4
  1045. .IX Item "crtc_id"
  1046. \&\s-1KMS CRTC ID\s0 to define the capture source. The first active plane on the given \s-1CRTC\s0
  1047. will be used.
  1048. .IP "\fBplane_id\fR" 4
  1049. .IX Item "plane_id"
  1050. \&\s-1KMS\s0 plane \s-1ID\s0 to define the capture source. Defaults to the first active plane found if
  1051. neither \fBcrtc_id\fR nor \fBplane_id\fR are specified.
  1052. .IP "\fBframerate\fR" 4
  1053. .IX Item "framerate"
  1054. Framerate to capture at. This is not synchronised to any page flipping or framebuffer
  1055. changes \- it just defines the interval at which the framebuffer is sampled. Sampling
  1056. faster than the framebuffer update rate will generate independent frames with the same
  1057. content. Defaults to \f(CW30\fR.
  1058. .PP
  1059. \fIExamples\fR
  1060. .IX Subsection "Examples"
  1061. .IP "\(bu" 4
  1062. Capture from the first active plane, download the result to normal frames and encode.
  1063. This will only work if the framebuffer is both linear and mappable \- if not, the result
  1064. may be scrambled or fail to download.
  1065. .Sp
  1066. .Vb 1
  1067. \& ffmpeg \-f kmsgrab \-i \- \-vf \*(Aqhwdownload,format=bgr0\*(Aq output.mp4
  1068. .Ve
  1069. .IP "\(bu" 4
  1070. Capture from \s-1CRTC ID 42\s0 at 60fps, map the result to \s-1VAAPI,\s0 convert to \s-1NV12\s0 and encode as H.264.
  1071. .Sp
  1072. .Vb 1
  1073. \& ffmpeg \-crtc_id 42 \-framerate 60 \-f kmsgrab \-i \- \-vf \*(Aqhwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12\*(Aq \-c:v h264_vaapi output.mp4
  1074. .Ve
  1075. .IP "\(bu" 4
  1076. To capture only part of a plane the output can be cropped \- this can be used to capture
  1077. a single window, as long as it has a known absolute position and size. For example, to
  1078. capture and encode the middle quarter of a 1920x1080 plane:
  1079. .Sp
  1080. .Vb 1
  1081. \& ffmpeg \-f kmsgrab \-i \- \-vf \*(Aqhwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12\*(Aq \-c:v h264_vaapi output.mp4
  1082. .Ve
  1083. .SS "lavfi"
  1084. .IX Subsection "lavfi"
  1085. Libavfilter input virtual device.
  1086. .PP
  1087. This input device reads data from the open output pads of a libavfilter
  1088. filtergraph.
  1089. .PP
  1090. For each filtergraph open output, the input device will create a
  1091. corresponding stream which is mapped to the generated output. Currently
  1092. only video data is supported. The filtergraph is specified through the
  1093. option \fBgraph\fR.
  1094. .PP
  1095. \fIOptions\fR
  1096. .IX Subsection "Options"
  1097. .IP "\fBgraph\fR" 4
  1098. .IX Item "graph"
  1099. Specify the filtergraph to use as input. Each video open output must be
  1100. labelled by a unique string of the form "out\fIN\fR", where \fIN\fR is a
  1101. number starting from 0 corresponding to the mapped input stream
  1102. generated by the device.
  1103. The first unlabelled output is automatically assigned to the \*(L"out0\*(R"
  1104. label, but all the others need to be specified explicitly.
  1105. .Sp
  1106. The suffix \*(L"+subcc\*(R" can be appended to the output label to create an extra
  1107. stream with the closed captions packets attached to that output
  1108. (experimental; only for \s-1EIA\-608 / CEA\-708\s0 for now).
  1109. The subcc streams are created after all the normal streams, in the order of
  1110. the corresponding stream.
  1111. For example, if there is \*(L"out19+subcc\*(R", \*(L"out7+subcc\*(R" and up to \*(L"out42\*(R", the
  1112. stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
  1113. .Sp
  1114. If not specified defaults to the filename specified for the input
  1115. device.
  1116. .IP "\fBgraph_file\fR" 4
  1117. .IX Item "graph_file"
  1118. Set the filename of the filtergraph to be read and sent to the other
  1119. filters. Syntax of the filtergraph is the same as the one specified by
  1120. the option \fIgraph\fR.
  1121. .IP "\fBdumpgraph\fR" 4
  1122. .IX Item "dumpgraph"
  1123. Dump graph to stderr.
  1124. .PP
  1125. \fIExamples\fR
  1126. .IX Subsection "Examples"
  1127. .IP "\(bu" 4
  1128. Create a color video stream and play it back with \fBffplay\fR:
  1129. .Sp
  1130. .Vb 1
  1131. \& ffplay \-f lavfi \-graph "color=c=pink [out0]" dummy
  1132. .Ve
  1133. .IP "\(bu" 4
  1134. As the previous example, but use filename for specifying the graph
  1135. description, and omit the \*(L"out0\*(R" label:
  1136. .Sp
  1137. .Vb 1
  1138. \& ffplay \-f lavfi color=c=pink
  1139. .Ve
  1140. .IP "\(bu" 4
  1141. Create three different video test filtered sources and play them:
  1142. .Sp
  1143. .Vb 1
  1144. \& ffplay \-f lavfi \-graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
  1145. .Ve
  1146. .IP "\(bu" 4
  1147. Read an audio stream from a file using the amovie source and play it
  1148. back with \fBffplay\fR:
  1149. .Sp
  1150. .Vb 1
  1151. \& ffplay \-f lavfi "amovie=test.wav"
  1152. .Ve
  1153. .IP "\(bu" 4
  1154. Read an audio stream and a video stream and play it back with
  1155. \&\fBffplay\fR:
  1156. .Sp
  1157. .Vb 1
  1158. \& ffplay \-f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
  1159. .Ve
  1160. .IP "\(bu" 4
  1161. Dump decoded frames to images and closed captions to a file (experimental):
  1162. .Sp
  1163. .Vb 1
  1164. \& ffmpeg \-f lavfi \-i "movie=test.ts[out0+subcc]" \-map v frame%08d.png \-map s \-c copy \-f rawvideo subcc.bin
  1165. .Ve
  1166. .SS "libcdio"
  1167. .IX Subsection "libcdio"
  1168. Audio-CD input device based on libcdio.
  1169. .PP
  1170. To enable this input device during configuration you need libcdio
  1171. installed on your system. It requires the configure option
  1172. \&\f(CW\*(C`\-\-enable\-libcdio\*(C'\fR.
  1173. .PP
  1174. This device allows playing and grabbing from an Audio-CD.
  1175. .PP
  1176. For example to copy with \fBffmpeg\fR the entire Audio-CD in \fI/dev/sr0\fR,
  1177. you may run the command:
  1178. .PP
  1179. .Vb 1
  1180. \& ffmpeg \-f libcdio \-i /dev/sr0 cd.wav
  1181. .Ve
  1182. .PP
  1183. \fIOptions\fR
  1184. .IX Subsection "Options"
  1185. .IP "\fBspeed\fR" 4
  1186. .IX Item "speed"
  1187. Set drive reading speed. Default value is 0.
  1188. .Sp
  1189. The speed is specified CD-ROM speed units. The speed is set through
  1190. the libcdio \f(CW\*(C`cdio_cddap_speed_set\*(C'\fR function. On many CD-ROM
  1191. drives, specifying a value too large will result in using the fastest
  1192. speed.
  1193. .IP "\fBparanoia_mode\fR" 4
  1194. .IX Item "paranoia_mode"
  1195. Set paranoia recovery mode flags. It accepts one of the following values:
  1196. .RS 4
  1197. .IP "\fBdisable\fR" 4
  1198. .IX Item "disable"
  1199. .PD 0
  1200. .IP "\fBverify\fR" 4
  1201. .IX Item "verify"
  1202. .IP "\fBoverlap\fR" 4
  1203. .IX Item "overlap"
  1204. .IP "\fBneverskip\fR" 4
  1205. .IX Item "neverskip"
  1206. .IP "\fBfull\fR" 4
  1207. .IX Item "full"
  1208. .RE
  1209. .RS 4
  1210. .PD
  1211. .Sp
  1212. Default value is \fBdisable\fR.
  1213. .Sp
  1214. For more information about the available recovery modes, consult the
  1215. paranoia project documentation.
  1216. .RE
  1217. .SS "libdc1394"
  1218. .IX Subsection "libdc1394"
  1219. \&\s-1IIDC1394\s0 input device, based on libdc1394 and libraw1394.
  1220. .PP
  1221. Requires the configure option \f(CW\*(C`\-\-enable\-libdc1394\*(C'\fR.
  1222. .PP
  1223. \fIOptions\fR
  1224. .IX Subsection "Options"
  1225. .IP "\fBframerate\fR" 4
  1226. .IX Item "framerate"
  1227. Set the frame rate. Default is \f(CW\*(C`ntsc\*(C'\fR, corresponding to a frame
  1228. rate of \f(CW\*(C`30000/1001\*(C'\fR.
  1229. .IP "\fBpixel_format\fR" 4
  1230. .IX Item "pixel_format"
  1231. Select the pixel format. Default is \f(CW\*(C`uyvy422\*(C'\fR.
  1232. .IP "\fBvideo_size\fR" 4
  1233. .IX Item "video_size"
  1234. Set the video size given as a string such as \f(CW\*(C`640x480\*(C'\fR or \f(CW\*(C`hd720\*(C'\fR.
  1235. Default is \f(CW\*(C`qvga\*(C'\fR.
  1236. .SS "openal"
  1237. .IX Subsection "openal"
  1238. The OpenAL input device provides audio capture on all systems with a
  1239. working OpenAL 1.1 implementation.
  1240. .PP
  1241. To enable this input device during configuration, you need OpenAL
  1242. headers and libraries installed on your system, and need to configure
  1243. FFmpeg with \f(CW\*(C`\-\-enable\-openal\*(C'\fR.
  1244. .PP
  1245. OpenAL headers and libraries should be provided as part of your OpenAL
  1246. implementation, or as an additional download (an \s-1SDK\s0). Depending on your
  1247. installation you may need to specify additional flags via the
  1248. \&\f(CW\*(C`\-\-extra\-cflags\*(C'\fR and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR for allowing the build
  1249. system to locate the OpenAL headers and libraries.
  1250. .PP
  1251. An incomplete list of OpenAL implementations follows:
  1252. .IP "\fBCreative\fR" 4
  1253. .IX Item "Creative"
  1254. The official Windows implementation, providing hardware acceleration
  1255. with supported devices and software fallback.
  1256. See <\fBhttp://openal.org/\fR>.
  1257. .IP "\fBOpenAL Soft\fR" 4
  1258. .IX Item "OpenAL Soft"
  1259. Portable, open source (\s-1LGPL\s0) software implementation. Includes
  1260. backends for the most common sound APIs on the Windows, Linux,
  1261. Solaris, and \s-1BSD\s0 operating systems.
  1262. See <\fBhttp://kcat.strangesoft.net/openal.html\fR>.
  1263. .IP "\fBApple\fR" 4
  1264. .IX Item "Apple"
  1265. OpenAL is part of Core Audio, the official Mac \s-1OS X\s0 Audio interface.
  1266. See <\fBhttp://developer.apple.com/technologies/mac/audio\-and\-video.html\fR>
  1267. .PP
  1268. This device allows one to capture from an audio input device handled
  1269. through OpenAL.
  1270. .PP
  1271. You need to specify the name of the device to capture in the provided
  1272. filename. If the empty string is provided, the device will
  1273. automatically select the default device. You can get the list of the
  1274. supported devices by using the option \fIlist_devices\fR.
  1275. .PP
  1276. \fIOptions\fR
  1277. .IX Subsection "Options"
  1278. .IP "\fBchannels\fR" 4
  1279. .IX Item "channels"
  1280. Set the number of channels in the captured audio. Only the values
  1281. \&\fB1\fR (monaural) and \fB2\fR (stereo) are currently supported.
  1282. Defaults to \fB2\fR.
  1283. .IP "\fBsample_size\fR" 4
  1284. .IX Item "sample_size"
  1285. Set the sample size (in bits) of the captured audio. Only the values
  1286. \&\fB8\fR and \fB16\fR are currently supported. Defaults to
  1287. \&\fB16\fR.
  1288. .IP "\fBsample_rate\fR" 4
  1289. .IX Item "sample_rate"
  1290. Set the sample rate (in Hz) of the captured audio.
  1291. Defaults to \fB44.1k\fR.
  1292. .IP "\fBlist_devices\fR" 4
  1293. .IX Item "list_devices"
  1294. If set to \fBtrue\fR, print a list of devices and exit.
  1295. Defaults to \fBfalse\fR.
  1296. .PP
  1297. \fIExamples\fR
  1298. .IX Subsection "Examples"
  1299. .PP
  1300. Print the list of OpenAL supported devices and exit:
  1301. .PP
  1302. .Vb 1
  1303. \& $ ffmpeg \-list_devices true \-f openal \-i dummy out.ogg
  1304. .Ve
  1305. .PP
  1306. Capture from the OpenAL device \fI\s-1DR\-BT101\s0 via PulseAudio\fR:
  1307. .PP
  1308. .Vb 1
  1309. \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out.ogg
  1310. .Ve
  1311. .PP
  1312. Capture from the default device (note the empty string '' as filename):
  1313. .PP
  1314. .Vb 1
  1315. \& $ ffmpeg \-f openal \-i \*(Aq\*(Aq out.ogg
  1316. .Ve
  1317. .PP
  1318. Capture from two devices simultaneously, writing to two different files,
  1319. within the same \fBffmpeg\fR command:
  1320. .PP
  1321. .Vb 1
  1322. \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out1.ogg \-f openal \-i \*(AqALSA Default\*(Aq out2.ogg
  1323. .Ve
  1324. .PP
  1325. Note: not all OpenAL implementations support multiple simultaneous capture \-
  1326. try the latest OpenAL Soft if the above does not work.
  1327. .SS "oss"
  1328. .IX Subsection "oss"
  1329. Open Sound System input device.
  1330. .PP
  1331. The filename to provide to the input device is the device node
  1332. representing the \s-1OSS\s0 input device, and is usually set to
  1333. \&\fI/dev/dsp\fR.
  1334. .PP
  1335. For example to grab from \fI/dev/dsp\fR using \fBffmpeg\fR use the
  1336. command:
  1337. .PP
  1338. .Vb 1
  1339. \& ffmpeg \-f oss \-i /dev/dsp /tmp/oss.wav
  1340. .Ve
  1341. .PP
  1342. For more information about \s-1OSS\s0 see:
  1343. <\fBhttp://manuals.opensound.com/usersguide/dsp.html\fR>
  1344. .PP
  1345. \fIOptions\fR
  1346. .IX Subsection "Options"
  1347. .IP "\fBsample_rate\fR" 4
  1348. .IX Item "sample_rate"
  1349. Set the sample rate in Hz. Default is 48000.
  1350. .IP "\fBchannels\fR" 4
  1351. .IX Item "channels"
  1352. Set the number of channels. Default is 2.
  1353. .SS "pulse"
  1354. .IX Subsection "pulse"
  1355. PulseAudio input device.
  1356. .PP
  1357. To enable this output device you need to configure FFmpeg with \f(CW\*(C`\-\-enable\-libpulse\*(C'\fR.
  1358. .PP
  1359. The filename to provide to the input device is a source device or the
  1360. string \*(L"default\*(R"
  1361. .PP
  1362. To list the PulseAudio source devices and their properties you can invoke
  1363. the command \fBpactl list sources\fR.
  1364. .PP
  1365. More information about PulseAudio can be found on <\fBhttp://www.pulseaudio.org\fR>.
  1366. .PP
  1367. \fIOptions\fR
  1368. .IX Subsection "Options"
  1369. .IP "\fBserver\fR" 4
  1370. .IX Item "server"
  1371. Connect to a specific PulseAudio server, specified by an \s-1IP\s0 address.
  1372. Default server is used when not provided.
  1373. .IP "\fBname\fR" 4
  1374. .IX Item "name"
  1375. Specify the application name PulseAudio will use when showing active clients,
  1376. by default it is the \f(CW\*(C`LIBAVFORMAT_IDENT\*(C'\fR string.
  1377. .IP "\fBstream_name\fR" 4
  1378. .IX Item "stream_name"
  1379. Specify the stream name PulseAudio will use when showing active streams,
  1380. by default it is \*(L"record\*(R".
  1381. .IP "\fBsample_rate\fR" 4
  1382. .IX Item "sample_rate"
  1383. Specify the samplerate in Hz, by default 48kHz is used.
  1384. .IP "\fBchannels\fR" 4
  1385. .IX Item "channels"
  1386. Specify the channels in use, by default 2 (stereo) is set.
  1387. .IP "\fBframe_size\fR" 4
  1388. .IX Item "frame_size"
  1389. Specify the number of bytes per frame, by default it is set to 1024.
  1390. .IP "\fBfragment_size\fR" 4
  1391. .IX Item "fragment_size"
  1392. Specify the minimal buffering fragment in PulseAudio, it will affect the
  1393. audio latency. By default it is unset.
  1394. .IP "\fBwallclock\fR" 4
  1395. .IX Item "wallclock"
  1396. Set the initial \s-1PTS\s0 using the current time. Default is 1.
  1397. .PP
  1398. \fIExamples\fR
  1399. .IX Subsection "Examples"
  1400. .PP
  1401. Record a stream from default device:
  1402. .PP
  1403. .Vb 1
  1404. \& ffmpeg \-f pulse \-i default /tmp/pulse.wav
  1405. .Ve
  1406. .SS "sndio"
  1407. .IX Subsection "sndio"
  1408. sndio input device.
  1409. .PP
  1410. To enable this input device during configuration you need libsndio
  1411. installed on your system.
  1412. .PP
  1413. The filename to provide to the input device is the device node
  1414. representing the sndio input device, and is usually set to
  1415. \&\fI/dev/audio0\fR.
  1416. .PP
  1417. For example to grab from \fI/dev/audio0\fR using \fBffmpeg\fR use the
  1418. command:
  1419. .PP
  1420. .Vb 1
  1421. \& ffmpeg \-f sndio \-i /dev/audio0 /tmp/oss.wav
  1422. .Ve
  1423. .PP
  1424. \fIOptions\fR
  1425. .IX Subsection "Options"
  1426. .IP "\fBsample_rate\fR" 4
  1427. .IX Item "sample_rate"
  1428. Set the sample rate in Hz. Default is 48000.
  1429. .IP "\fBchannels\fR" 4
  1430. .IX Item "channels"
  1431. Set the number of channels. Default is 2.
  1432. .SS "video4linux2, v4l2"
  1433. .IX Subsection "video4linux2, v4l2"
  1434. Video4Linux2 input video device.
  1435. .PP
  1436. \&\*(L"v4l2\*(R" can be used as alias for \*(L"video4linux2\*(R".
  1437. .PP
  1438. If FFmpeg is built with v4l\-utils support (by using the
  1439. \&\f(CW\*(C`\-\-enable\-libv4l2\*(C'\fR configure option), it is possible to use it with the
  1440. \&\f(CW\*(C`\-use_libv4l2\*(C'\fR input device option.
  1441. .PP
  1442. The name of the device to grab is a file device node, usually Linux
  1443. systems tend to automatically create such nodes when the device
  1444. (e.g. an \s-1USB\s0 webcam) is plugged into the system, and has a name of the
  1445. kind \fI/dev/video\fIN\fI\fR, where \fIN\fR is a number associated to
  1446. the device.
  1447. .PP
  1448. Video4Linux2 devices usually support a limited set of
  1449. \&\fIwidth\fRx\fIheight\fR sizes and frame rates. You can check which are
  1450. supported using \fB\-list_formats all\fR for Video4Linux2 devices.
  1451. Some devices, like \s-1TV\s0 cards, support one or more standards. It is possible
  1452. to list all the supported standards using \fB\-list_standards all\fR.
  1453. .PP
  1454. The time base for the timestamps is 1 microsecond. Depending on the kernel
  1455. version and configuration, the timestamps may be derived from the real time
  1456. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  1457. boot time, unaffected by \s-1NTP\s0 or manual changes to the clock). The
  1458. \&\fB\-timestamps abs\fR or \fB\-ts abs\fR option can be used to force
  1459. conversion into the real time clock.
  1460. .PP
  1461. Some usage examples of the video4linux2 device with \fBffmpeg\fR
  1462. and \fBffplay\fR:
  1463. .IP "\(bu" 4
  1464. List supported formats for a video4linux2 device:
  1465. .Sp
  1466. .Vb 1
  1467. \& ffplay \-f video4linux2 \-list_formats all /dev/video0
  1468. .Ve
  1469. .IP "\(bu" 4
  1470. Grab and show the input of a video4linux2 device:
  1471. .Sp
  1472. .Vb 1
  1473. \& ffplay \-f video4linux2 \-framerate 30 \-video_size hd720 /dev/video0
  1474. .Ve
  1475. .IP "\(bu" 4
  1476. Grab and record the input of a video4linux2 device, leave the
  1477. frame rate and size as previously set:
  1478. .Sp
  1479. .Vb 1
  1480. \& ffmpeg \-f video4linux2 \-input_format mjpeg \-i /dev/video0 out.mpeg
  1481. .Ve
  1482. .PP
  1483. For more information about Video4Linux, check <\fBhttp://linuxtv.org/\fR>.
  1484. .PP
  1485. \fIOptions\fR
  1486. .IX Subsection "Options"
  1487. .IP "\fBstandard\fR" 4
  1488. .IX Item "standard"
  1489. Set the standard. Must be the name of a supported standard. To get a
  1490. list of the supported standards, use the \fBlist_standards\fR
  1491. option.
  1492. .IP "\fBchannel\fR" 4
  1493. .IX Item "channel"
  1494. Set the input channel number. Default to \-1, which means using the
  1495. previously selected channel.
  1496. .IP "\fBvideo_size\fR" 4
  1497. .IX Item "video_size"
  1498. Set the video frame size. The argument must be a string in the form
  1499. \&\fI\s-1WIDTH\s0\fRx\fI\s-1HEIGHT\s0\fR or a valid size abbreviation.
  1500. .IP "\fBpixel_format\fR" 4
  1501. .IX Item "pixel_format"
  1502. Select the pixel format (only valid for raw video input).
  1503. .IP "\fBinput_format\fR" 4
  1504. .IX Item "input_format"
  1505. Set the preferred pixel format (for raw video) or a codec name.
  1506. This option allows one to select the input format, when several are
  1507. available.
  1508. .IP "\fBframerate\fR" 4
  1509. .IX Item "framerate"
  1510. Set the preferred video frame rate.
  1511. .IP "\fBlist_formats\fR" 4
  1512. .IX Item "list_formats"
  1513. List available formats (supported pixel formats, codecs, and frame
  1514. sizes) and exit.
  1515. .Sp
  1516. Available values are:
  1517. .RS 4
  1518. .IP "\fBall\fR" 4
  1519. .IX Item "all"
  1520. Show all available (compressed and non-compressed) formats.
  1521. .IP "\fBraw\fR" 4
  1522. .IX Item "raw"
  1523. Show only raw video (non-compressed) formats.
  1524. .IP "\fBcompressed\fR" 4
  1525. .IX Item "compressed"
  1526. Show only compressed formats.
  1527. .RE
  1528. .RS 4
  1529. .RE
  1530. .IP "\fBlist_standards\fR" 4
  1531. .IX Item "list_standards"
  1532. List supported standards and exit.
  1533. .Sp
  1534. Available values are:
  1535. .RS 4
  1536. .IP "\fBall\fR" 4
  1537. .IX Item "all"
  1538. Show all supported standards.
  1539. .RE
  1540. .RS 4
  1541. .RE
  1542. .IP "\fBtimestamps, ts\fR" 4
  1543. .IX Item "timestamps, ts"
  1544. Set type of timestamps for grabbed frames.
  1545. .Sp
  1546. Available values are:
  1547. .RS 4
  1548. .IP "\fBdefault\fR" 4
  1549. .IX Item "default"
  1550. Use timestamps from the kernel.
  1551. .IP "\fBabs\fR" 4
  1552. .IX Item "abs"
  1553. Use absolute timestamps (wall clock).
  1554. .IP "\fBmono2abs\fR" 4
  1555. .IX Item "mono2abs"
  1556. Force conversion from monotonic to absolute timestamps.
  1557. .RE
  1558. .RS 4
  1559. .Sp
  1560. Default value is \f(CW\*(C`default\*(C'\fR.
  1561. .RE
  1562. .IP "\fBuse_libv4l2\fR" 4
  1563. .IX Item "use_libv4l2"
  1564. Use libv4l2 (v4l\-utils) conversion functions. Default is 0.
  1565. .SS "vfwcap"
  1566. .IX Subsection "vfwcap"
  1567. VfW (Video for Windows) capture input device.
  1568. .PP
  1569. The filename passed as input is the capture driver number, ranging from
  1570. 0 to 9. You may use \*(L"list\*(R" as filename to print a list of drivers. Any
  1571. other filename will be interpreted as device number 0.
  1572. .PP
  1573. \fIOptions\fR
  1574. .IX Subsection "Options"
  1575. .IP "\fBvideo_size\fR" 4
  1576. .IX Item "video_size"
  1577. Set the video frame size.
  1578. .IP "\fBframerate\fR" 4
  1579. .IX Item "framerate"
  1580. Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR,
  1581. corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
  1582. .SS "x11grab"
  1583. .IX Subsection "x11grab"
  1584. X11 video input device.
  1585. .PP
  1586. To enable this input device during configuration you need libxcb
  1587. installed on your system. It will be automatically detected during
  1588. configuration.
  1589. .PP
  1590. This device allows one to capture a region of an X11 display.
  1591. .PP
  1592. The filename passed as input has the syntax:
  1593. .PP
  1594. .Vb 1
  1595. \& [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
  1596. .Ve
  1597. .PP
  1598. \&\fIhostname\fR:\fIdisplay_number\fR.\fIscreen_number\fR specifies the
  1599. X11 display name of the screen to grab from. \fIhostname\fR can be
  1600. omitted, and defaults to \*(L"localhost\*(R". The environment variable
  1601. \&\fB\s-1DISPLAY\s0\fR contains the default display name.
  1602. .PP
  1603. \&\fIx_offset\fR and \fIy_offset\fR specify the offsets of the grabbed
  1604. area with respect to the top-left border of the X11 screen. They
  1605. default to 0.
  1606. .PP
  1607. Check the X11 documentation (e.g. \fBman X\fR) for more detailed
  1608. information.
  1609. .PP
  1610. Use the \fBxdpyinfo\fR program for getting basic information about
  1611. the properties of your X11 display (e.g. grep for \*(L"name\*(R" or
  1612. \&\*(L"dimensions\*(R").
  1613. .PP
  1614. For example to grab from \fI:0.0\fR using \fBffmpeg\fR:
  1615. .PP
  1616. .Vb 1
  1617. \& ffmpeg \-f x11grab \-framerate 25 \-video_size cif \-i :0.0 out.mpg
  1618. .Ve
  1619. .PP
  1620. Grab at position \f(CW\*(C`10,20\*(C'\fR:
  1621. .PP
  1622. .Vb 1
  1623. \& ffmpeg \-f x11grab \-framerate 25 \-video_size cif \-i :0.0+10,20 out.mpg
  1624. .Ve
  1625. .PP
  1626. \fIOptions\fR
  1627. .IX Subsection "Options"
  1628. .IP "\fBselect_region\fR" 4
  1629. .IX Item "select_region"
  1630. Specify whether to select the grabbing area graphically using the pointer.
  1631. A value of \f(CW1\fR prompts the user to select the grabbing area graphically
  1632. by clicking and dragging. A single click with no dragging will select the
  1633. whole screen. A region with zero width or height will also select the whole
  1634. screen. This option overwrites the \fIvideo_size\fR, \fIgrab_x\fR, and
  1635. \&\fIgrab_y\fR options. Default value is \f(CW0\fR.
  1636. .IP "\fBdraw_mouse\fR" 4
  1637. .IX Item "draw_mouse"
  1638. Specify whether to draw the mouse pointer. A value of \f(CW0\fR specifies
  1639. not to draw the pointer. Default value is \f(CW1\fR.
  1640. .IP "\fBfollow_mouse\fR" 4
  1641. .IX Item "follow_mouse"
  1642. Make the grabbed area follow the mouse. The argument can be
  1643. \&\f(CW\*(C`centered\*(C'\fR or a number of pixels \fI\s-1PIXELS\s0\fR.
  1644. .Sp
  1645. When it is specified with \*(L"centered\*(R", the grabbing region follows the mouse
  1646. pointer and keeps the pointer at the center of region; otherwise, the region
  1647. follows only when the mouse pointer reaches within \fI\s-1PIXELS\s0\fR (greater than
  1648. zero) to the edge of region.
  1649. .Sp
  1650. For example:
  1651. .Sp
  1652. .Vb 1
  1653. \& ffmpeg \-f x11grab \-follow_mouse centered \-framerate 25 \-video_size cif \-i :0.0 out.mpg
  1654. .Ve
  1655. .Sp
  1656. To follow only when the mouse pointer reaches within 100 pixels to edge:
  1657. .Sp
  1658. .Vb 1
  1659. \& ffmpeg \-f x11grab \-follow_mouse 100 \-framerate 25 \-video_size cif \-i :0.0 out.mpg
  1660. .Ve
  1661. .IP "\fBframerate\fR" 4
  1662. .IX Item "framerate"
  1663. Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR,
  1664. corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
  1665. .IP "\fBshow_region\fR" 4
  1666. .IX Item "show_region"
  1667. Show grabbed region on screen.
  1668. .Sp
  1669. If \fIshow_region\fR is specified with \f(CW1\fR, then the grabbing
  1670. region will be indicated on screen. With this option, it is easy to
  1671. know what is being grabbed if only a portion of the screen is grabbed.
  1672. .IP "\fBregion_border\fR" 4
  1673. .IX Item "region_border"
  1674. Set the region border thickness if \fB\-show_region 1\fR is used.
  1675. Range is 1 to 128 and default is 3 (XCB-based x11grab only).
  1676. .Sp
  1677. For example:
  1678. .Sp
  1679. .Vb 1
  1680. \& ffmpeg \-f x11grab \-show_region 1 \-framerate 25 \-video_size cif \-i :0.0+10,20 out.mpg
  1681. .Ve
  1682. .Sp
  1683. With \fIfollow_mouse\fR:
  1684. .Sp
  1685. .Vb 1
  1686. \& ffmpeg \-f x11grab \-follow_mouse centered \-show_region 1 \-framerate 25 \-video_size cif \-i :0.0 out.mpg
  1687. .Ve
  1688. .IP "\fBwindow_id\fR" 4
  1689. .IX Item "window_id"
  1690. Grab this window, instead of the whole screen. Default value is 0, which maps to
  1691. the whole screen (root window).
  1692. .Sp
  1693. The id of a window can be found using the \fBxwininfo\fR program, possibly with options \-tree and
  1694. \&\-root.
  1695. .Sp
  1696. If the window is later enlarged, the new area is not recorded. Video ends when
  1697. the window is closed, unmapped (i.e., iconified) or shrunk beyond the video
  1698. size (which defaults to the initial window size).
  1699. .Sp
  1700. This option disables options \fBfollow_mouse\fR and \fBselect_region\fR.
  1701. .IP "\fBvideo_size\fR" 4
  1702. .IX Item "video_size"
  1703. Set the video frame size. Default is the full desktop or window.
  1704. .IP "\fBgrab_x\fR" 4
  1705. .IX Item "grab_x"
  1706. .PD 0
  1707. .IP "\fBgrab_y\fR" 4
  1708. .IX Item "grab_y"
  1709. .PD
  1710. Set the grabbing region coordinates. They are expressed as offset from
  1711. the top left corner of the X11 window and correspond to the
  1712. \&\fIx_offset\fR and \fIy_offset\fR parameters in the device name. The
  1713. default value for both options is 0.
  1714. .SH "OUTPUT DEVICES"
  1715. .IX Header "OUTPUT DEVICES"
  1716. Output devices are configured elements in FFmpeg that can write
  1717. multimedia data to an output device attached to your system.
  1718. .PP
  1719. When you configure your FFmpeg build, all the supported output devices
  1720. are enabled by default. You can list all available ones using the
  1721. configure option \*(L"\-\-list\-outdevs\*(R".
  1722. .PP
  1723. You can disable all the output devices using the configure option
  1724. \&\*(L"\-\-disable\-outdevs\*(R", and selectively enable an output device using the
  1725. option "\-\-enable\-outdev=\fI\s-1OUTDEV\s0\fR\*(L", or you can disable a particular
  1726. input device using the option \*(R"\-\-disable\-outdev=\fI\s-1OUTDEV\s0\fR".
  1727. .PP
  1728. The option \*(L"\-devices\*(R" of the ff* tools will display the list of
  1729. enabled output devices.
  1730. .PP
  1731. A description of the currently available output devices follows.
  1732. .SS "alsa"
  1733. .IX Subsection "alsa"
  1734. \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) output device.
  1735. .PP
  1736. \fIExamples\fR
  1737. .IX Subsection "Examples"
  1738. .IP "\(bu" 4
  1739. Play a file on default \s-1ALSA\s0 device:
  1740. .Sp
  1741. .Vb 1
  1742. \& ffmpeg \-i INPUT \-f alsa default
  1743. .Ve
  1744. .IP "\(bu" 4
  1745. Play a file on soundcard 1, audio device 7:
  1746. .Sp
  1747. .Vb 1
  1748. \& ffmpeg \-i INPUT \-f alsa hw:1,7
  1749. .Ve
  1750. .SS "AudioToolbox"
  1751. .IX Subsection "AudioToolbox"
  1752. AudioToolbox output device.
  1753. .PP
  1754. Allows native output to CoreAudio devices on \s-1OSX.\s0
  1755. .PP
  1756. The output filename can be empty (or \f(CW\*(C`\-\*(C'\fR) to refer to the default system output device or a number that refers to the device index as shown using: \f(CW\*(C`\-list_devices true\*(C'\fR.
  1757. .PP
  1758. Alternatively, the audio input device can be chosen by index using the
  1759. .PP
  1760. .Vb 1
  1761. \& B<\-audio_device_index E<lt>INDEXE<gt>>
  1762. .Ve
  1763. .PP
  1764. , overriding any device name or index given in the input filename.
  1765. .PP
  1766. All available devices can be enumerated by using \fB\-list_devices true\fR, listing
  1767. all device names, UIDs and corresponding indices.
  1768. .PP
  1769. \fIOptions\fR
  1770. .IX Subsection "Options"
  1771. .PP
  1772. AudioToolbox supports the following options:
  1773. .IP "\fB\-audio_device_index <\s-1INDEX\s0>\fR" 4
  1774. .IX Item "-audio_device_index <INDEX>"
  1775. Specify the audio device by its index. Overrides anything given in the output filename.
  1776. .PP
  1777. \fIExamples\fR
  1778. .IX Subsection "Examples"
  1779. .IP "\(bu" 4
  1780. Print the list of supported devices and output a sine wave to the default device:
  1781. .Sp
  1782. .Vb 1
  1783. \& $ ffmpeg \-f lavfi \-i sine=r=44100 \-f audiotoolbox \-list_devices true \-
  1784. .Ve
  1785. .IP "\(bu" 4
  1786. Output a sine wave to the device with the index 2, overriding any output filename:
  1787. .Sp
  1788. .Vb 1
  1789. \& $ ffmpeg \-f lavfi \-i sine=r=44100 \-f audiotoolbox \-audio_device_index 2 \-
  1790. .Ve
  1791. .SS "caca"
  1792. .IX Subsection "caca"
  1793. \&\s-1CACA\s0 output device.
  1794. .PP
  1795. This output device allows one to show a video stream in \s-1CACA\s0 window.
  1796. Only one \s-1CACA\s0 window is allowed per application, so you can
  1797. have only one instance of this output device in an application.
  1798. .PP
  1799. To enable this output device you need to configure FFmpeg with
  1800. \&\f(CW\*(C`\-\-enable\-libcaca\*(C'\fR.
  1801. libcaca is a graphics library that outputs text instead of pixels.
  1802. .PP
  1803. For more information about libcaca, check:
  1804. <\fBhttp://caca.zoy.org/wiki/libcaca\fR>
  1805. .PP
  1806. \fIOptions\fR
  1807. .IX Subsection "Options"
  1808. .IP "\fBwindow_title\fR" 4
  1809. .IX Item "window_title"
  1810. Set the \s-1CACA\s0 window title, if not specified default to the filename
  1811. specified for the output device.
  1812. .IP "\fBwindow_size\fR" 4
  1813. .IX Item "window_size"
  1814. Set the \s-1CACA\s0 window size, can be a string of the form
  1815. \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
  1816. If not specified it defaults to the size of the input video.
  1817. .IP "\fBdriver\fR" 4
  1818. .IX Item "driver"
  1819. Set display driver.
  1820. .IP "\fBalgorithm\fR" 4
  1821. .IX Item "algorithm"
  1822. Set dithering algorithm. Dithering is necessary
  1823. because the picture being rendered has usually far more colours than
  1824. the available palette.
  1825. The accepted values are listed with \f(CW\*(C`\-list_dither algorithms\*(C'\fR.
  1826. .IP "\fBantialias\fR" 4
  1827. .IX Item "antialias"
  1828. Set antialias method. Antialiasing smoothens the rendered
  1829. image and avoids the commonly seen staircase effect.
  1830. The accepted values are listed with \f(CW\*(C`\-list_dither antialiases\*(C'\fR.
  1831. .IP "\fBcharset\fR" 4
  1832. .IX Item "charset"
  1833. Set which characters are going to be used when rendering text.
  1834. The accepted values are listed with \f(CW\*(C`\-list_dither charsets\*(C'\fR.
  1835. .IP "\fBcolor\fR" 4
  1836. .IX Item "color"
  1837. Set color to be used when rendering text.
  1838. The accepted values are listed with \f(CW\*(C`\-list_dither colors\*(C'\fR.
  1839. .IP "\fBlist_drivers\fR" 4
  1840. .IX Item "list_drivers"
  1841. If set to \fBtrue\fR, print a list of available drivers and exit.
  1842. .IP "\fBlist_dither\fR" 4
  1843. .IX Item "list_dither"
  1844. List available dither options related to the argument.
  1845. The argument must be one of \f(CW\*(C`algorithms\*(C'\fR, \f(CW\*(C`antialiases\*(C'\fR,
  1846. \&\f(CW\*(C`charsets\*(C'\fR, \f(CW\*(C`colors\*(C'\fR.
  1847. .PP
  1848. \fIExamples\fR
  1849. .IX Subsection "Examples"
  1850. .IP "\(bu" 4
  1851. The following command shows the \fBffmpeg\fR output is an
  1852. \&\s-1CACA\s0 window, forcing its size to 80x25:
  1853. .Sp
  1854. .Vb 1
  1855. \& ffmpeg \-i INPUT \-c:v rawvideo \-pix_fmt rgb24 \-window_size 80x25 \-f caca \-
  1856. .Ve
  1857. .IP "\(bu" 4
  1858. Show the list of available drivers and exit:
  1859. .Sp
  1860. .Vb 1
  1861. \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_drivers true \-
  1862. .Ve
  1863. .IP "\(bu" 4
  1864. Show the list of available dither colors and exit:
  1865. .Sp
  1866. .Vb 1
  1867. \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_dither colors \-
  1868. .Ve
  1869. .SS "decklink"
  1870. .IX Subsection "decklink"
  1871. The decklink output device provides playback capabilities for Blackmagic
  1872. DeckLink devices.
  1873. .PP
  1874. To enable this output device, you need the Blackmagic DeckLink \s-1SDK\s0 and you
  1875. need to configure with the appropriate \f(CW\*(C`\-\-extra\-cflags\*(C'\fR
  1876. and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR.
  1877. On Windows, you need to run the \s-1IDL\s0 files through \fBwidl\fR.
  1878. .PP
  1879. DeckLink is very picky about the formats it supports. Pixel format is always
  1880. uyvy422, framerate, field order and video size must be determined for your
  1881. device with \fB\-list_formats 1\fR. Audio sample rate is always 48 kHz.
  1882. .PP
  1883. \fIOptions\fR
  1884. .IX Subsection "Options"
  1885. .IP "\fBlist_devices\fR" 4
  1886. .IX Item "list_devices"
  1887. If set to \fBtrue\fR, print a list of devices and exit.
  1888. Defaults to \fBfalse\fR. This option is deprecated, please use the
  1889. \&\f(CW\*(C`\-sinks\*(C'\fR option of ffmpeg to list the available output devices.
  1890. .IP "\fBlist_formats\fR" 4
  1891. .IX Item "list_formats"
  1892. If set to \fBtrue\fR, print a list of supported formats and exit.
  1893. Defaults to \fBfalse\fR.
  1894. .IP "\fBpreroll\fR" 4
  1895. .IX Item "preroll"
  1896. Amount of time to preroll video in seconds.
  1897. Defaults to \fB0.5\fR.
  1898. .IP "\fBduplex_mode\fR" 4
  1899. .IX Item "duplex_mode"
  1900. Sets the decklink device duplex mode. Must be \fBunset\fR, \fBhalf\fR or \fBfull\fR.
  1901. Defaults to \fBunset\fR.
  1902. .IP "\fBtiming_offset\fR" 4
  1903. .IX Item "timing_offset"
  1904. Sets the genlock timing pixel offset on the used output.
  1905. Defaults to \fBunset\fR.
  1906. .PP
  1907. \fIExamples\fR
  1908. .IX Subsection "Examples"
  1909. .IP "\(bu" 4
  1910. List output devices:
  1911. .Sp
  1912. .Vb 1
  1913. \& ffmpeg \-sinks decklink
  1914. .Ve
  1915. .IP "\(bu" 4
  1916. List supported formats:
  1917. .Sp
  1918. .Vb 1
  1919. \& ffmpeg \-i test.avi \-f decklink \-list_formats 1 \*(AqDeckLink Mini Monitor\*(Aq
  1920. .Ve
  1921. .IP "\(bu" 4
  1922. Play video clip:
  1923. .Sp
  1924. .Vb 1
  1925. \& ffmpeg \-i test.avi \-f decklink \-pix_fmt uyvy422 \*(AqDeckLink Mini Monitor\*(Aq
  1926. .Ve
  1927. .IP "\(bu" 4
  1928. Play video clip with non-standard framerate or video size:
  1929. .Sp
  1930. .Vb 1
  1931. \& ffmpeg \-i test.avi \-f decklink \-pix_fmt uyvy422 \-s 720x486 \-r 24000/1001 \*(AqDeckLink Mini Monitor\*(Aq
  1932. .Ve
  1933. .SS "fbdev"
  1934. .IX Subsection "fbdev"
  1935. Linux framebuffer output device.
  1936. .PP
  1937. The Linux framebuffer is a graphic hardware-independent abstraction
  1938. layer to show graphics on a computer monitor, typically on the
  1939. console. It is accessed through a file device node, usually
  1940. \&\fI/dev/fb0\fR.
  1941. .PP
  1942. For more detailed information read the file
  1943. \&\fIDocumentation/fb/framebuffer.txt\fR included in the Linux source tree.
  1944. .PP
  1945. \fIOptions\fR
  1946. .IX Subsection "Options"
  1947. .IP "\fBxoffset\fR" 4
  1948. .IX Item "xoffset"
  1949. .PD 0
  1950. .IP "\fByoffset\fR" 4
  1951. .IX Item "yoffset"
  1952. .PD
  1953. Set x/y coordinate of top left corner. Default is 0.
  1954. .PP
  1955. \fIExamples\fR
  1956. .IX Subsection "Examples"
  1957. .PP
  1958. Play a file on framebuffer device \fI/dev/fb0\fR.
  1959. Required pixel format depends on current framebuffer settings.
  1960. .PP
  1961. .Vb 1
  1962. \& ffmpeg \-re \-i INPUT \-c:v rawvideo \-pix_fmt bgra \-f fbdev /dev/fb0
  1963. .Ve
  1964. .PP
  1965. See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fBfbset\fR\|(1).
  1966. .SS "opengl"
  1967. .IX Subsection "opengl"
  1968. OpenGL output device.
  1969. .PP
  1970. To enable this output device you need to configure FFmpeg with \f(CW\*(C`\-\-enable\-opengl\*(C'\fR.
  1971. .PP
  1972. This output device allows one to render to OpenGL context.
  1973. Context may be provided by application or default \s-1SDL\s0 window is created.
  1974. .PP
  1975. When device renders to external context, application must implement handlers for following messages:
  1976. \&\f(CW\*(C`AV_DEV_TO_APP_CREATE_WINDOW_BUFFER\*(C'\fR \- create OpenGL context on current thread.
  1977. \&\f(CW\*(C`AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER\*(C'\fR \- make OpenGL context current.
  1978. \&\f(CW\*(C`AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER\*(C'\fR \- swap buffers.
  1979. \&\f(CW\*(C`AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER\*(C'\fR \- destroy OpenGL context.
  1980. Application is also required to inform a device about current resolution by sending \f(CW\*(C`AV_APP_TO_DEV_WINDOW_SIZE\*(C'\fR message.
  1981. .PP
  1982. \fIOptions\fR
  1983. .IX Subsection "Options"
  1984. .IP "\fBbackground\fR" 4
  1985. .IX Item "background"
  1986. Set background color. Black is a default.
  1987. .IP "\fBno_window\fR" 4
  1988. .IX Item "no_window"
  1989. Disables default \s-1SDL\s0 window when set to non-zero value.
  1990. Application must provide OpenGL context and both \f(CW\*(C`window_size_cb\*(C'\fR and \f(CW\*(C`window_swap_buffers_cb\*(C'\fR callbacks when set.
  1991. .IP "\fBwindow_title\fR" 4
  1992. .IX Item "window_title"
  1993. Set the \s-1SDL\s0 window title, if not specified default to the filename specified for the output device.
  1994. Ignored when \fBno_window\fR is set.
  1995. .IP "\fBwindow_size\fR" 4
  1996. .IX Item "window_size"
  1997. Set preferred window size, can be a string of the form widthxheight or a video size abbreviation.
  1998. If not specified it defaults to the size of the input video, downscaled according to the aspect ratio.
  1999. Mostly usable when \fBno_window\fR is not set.
  2000. .PP
  2001. \fIExamples\fR
  2002. .IX Subsection "Examples"
  2003. .PP
  2004. Play a file on \s-1SDL\s0 window using OpenGL rendering:
  2005. .PP
  2006. .Vb 1
  2007. \& ffmpeg \-i INPUT \-f opengl "window title"
  2008. .Ve
  2009. .SS "oss"
  2010. .IX Subsection "oss"
  2011. \&\s-1OSS\s0 (Open Sound System) output device.
  2012. .SS "pulse"
  2013. .IX Subsection "pulse"
  2014. PulseAudio output device.
  2015. .PP
  2016. To enable this output device you need to configure FFmpeg with \f(CW\*(C`\-\-enable\-libpulse\*(C'\fR.
  2017. .PP
  2018. More information about PulseAudio can be found on <\fBhttp://www.pulseaudio.org\fR>
  2019. .PP
  2020. \fIOptions\fR
  2021. .IX Subsection "Options"
  2022. .IP "\fBserver\fR" 4
  2023. .IX Item "server"
  2024. Connect to a specific PulseAudio server, specified by an \s-1IP\s0 address.
  2025. Default server is used when not provided.
  2026. .IP "\fBname\fR" 4
  2027. .IX Item "name"
  2028. Specify the application name PulseAudio will use when showing active clients,
  2029. by default it is the \f(CW\*(C`LIBAVFORMAT_IDENT\*(C'\fR string.
  2030. .IP "\fBstream_name\fR" 4
  2031. .IX Item "stream_name"
  2032. Specify the stream name PulseAudio will use when showing active streams,
  2033. by default it is set to the specified output name.
  2034. .IP "\fBdevice\fR" 4
  2035. .IX Item "device"
  2036. Specify the device to use. Default device is used when not provided.
  2037. List of output devices can be obtained with command \fBpactl list sinks\fR.
  2038. .IP "\fBbuffer_size\fR" 4
  2039. .IX Item "buffer_size"
  2040. .PD 0
  2041. .IP "\fBbuffer_duration\fR" 4
  2042. .IX Item "buffer_duration"
  2043. .PD
  2044. Control the size and duration of the PulseAudio buffer. A small buffer
  2045. gives more control, but requires more frequent updates.
  2046. .Sp
  2047. \&\fBbuffer_size\fR specifies size in bytes while
  2048. \&\fBbuffer_duration\fR specifies duration in milliseconds.
  2049. .Sp
  2050. When both options are provided then the highest value is used
  2051. (duration is recalculated to bytes using stream parameters). If they
  2052. are set to 0 (which is default), the device will use the default
  2053. PulseAudio duration value. By default PulseAudio set buffer duration
  2054. to around 2 seconds.
  2055. .IP "\fBprebuf\fR" 4
  2056. .IX Item "prebuf"
  2057. Specify pre-buffering size in bytes. The server does not start with
  2058. playback before at least \fBprebuf\fR bytes are available in the
  2059. buffer. By default this option is initialized to the same value as
  2060. \&\fBbuffer_size\fR or \fBbuffer_duration\fR (whichever is bigger).
  2061. .IP "\fBminreq\fR" 4
  2062. .IX Item "minreq"
  2063. Specify minimum request size in bytes. The server does not request less
  2064. than \fBminreq\fR bytes from the client, instead waits until the buffer
  2065. is free enough to request more bytes at once. It is recommended to not set
  2066. this option, which will initialize this to a value that is deemed sensible
  2067. by the server.
  2068. .PP
  2069. \fIExamples\fR
  2070. .IX Subsection "Examples"
  2071. .PP
  2072. Play a file on default device on default server:
  2073. .PP
  2074. .Vb 1
  2075. \& ffmpeg \-i INPUT \-f pulse "stream name"
  2076. .Ve
  2077. .SS "sdl"
  2078. .IX Subsection "sdl"
  2079. \&\s-1SDL\s0 (Simple DirectMedia Layer) output device.
  2080. .PP
  2081. \&\*(L"sdl2\*(R" can be used as alias for \*(L"sdl\*(R".
  2082. .PP
  2083. This output device allows one to show a video stream in an \s-1SDL\s0
  2084. window. Only one \s-1SDL\s0 window is allowed per application, so you can
  2085. have only one instance of this output device in an application.
  2086. .PP
  2087. To enable this output device you need libsdl installed on your system
  2088. when configuring your build.
  2089. .PP
  2090. For more information about \s-1SDL,\s0 check:
  2091. <\fBhttp://www.libsdl.org/\fR>
  2092. .PP
  2093. \fIOptions\fR
  2094. .IX Subsection "Options"
  2095. .IP "\fBwindow_title\fR" 4
  2096. .IX Item "window_title"
  2097. Set the \s-1SDL\s0 window title, if not specified default to the filename
  2098. specified for the output device.
  2099. .IP "\fBicon_title\fR" 4
  2100. .IX Item "icon_title"
  2101. Set the name of the iconified \s-1SDL\s0 window, if not specified it is set
  2102. to the same value of \fIwindow_title\fR.
  2103. .IP "\fBwindow_size\fR" 4
  2104. .IX Item "window_size"
  2105. Set the \s-1SDL\s0 window size, can be a string of the form
  2106. \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
  2107. If not specified it defaults to the size of the input video,
  2108. downscaled according to the aspect ratio.
  2109. .IP "\fBwindow_x\fR" 4
  2110. .IX Item "window_x"
  2111. .PD 0
  2112. .IP "\fBwindow_y\fR" 4
  2113. .IX Item "window_y"
  2114. .PD
  2115. Set the position of the window on the screen.
  2116. .IP "\fBwindow_fullscreen\fR" 4
  2117. .IX Item "window_fullscreen"
  2118. Set fullscreen mode when non-zero value is provided.
  2119. Default value is zero.
  2120. .IP "\fBwindow_enable_quit\fR" 4
  2121. .IX Item "window_enable_quit"
  2122. Enable quit action (using window button or keyboard key)
  2123. when non-zero value is provided.
  2124. Default value is 1 (enable quit action)
  2125. .PP
  2126. \fIInteractive commands\fR
  2127. .IX Subsection "Interactive commands"
  2128. .PP
  2129. The window created by the device can be controlled through the
  2130. following interactive commands.
  2131. .IP "\fBq, \s-1ESC\s0\fR" 4
  2132. .IX Item "q, ESC"
  2133. Quit the device immediately.
  2134. .PP
  2135. \fIExamples\fR
  2136. .IX Subsection "Examples"
  2137. .PP
  2138. The following command shows the \fBffmpeg\fR output is an
  2139. \&\s-1SDL\s0 window, forcing its size to the qcif format:
  2140. .PP
  2141. .Vb 1
  2142. \& ffmpeg \-i INPUT \-c:v rawvideo \-pix_fmt yuv420p \-window_size qcif \-f sdl "SDL output"
  2143. .Ve
  2144. .SS "sndio"
  2145. .IX Subsection "sndio"
  2146. sndio audio output device.
  2147. .SS "v4l2"
  2148. .IX Subsection "v4l2"
  2149. Video4Linux2 output device.
  2150. .SS "xv"
  2151. .IX Subsection "xv"
  2152. \&\s-1XV\s0 (XVideo) output device.
  2153. .PP
  2154. This output device allows one to show a video stream in a X Window System
  2155. window.
  2156. .PP
  2157. \fIOptions\fR
  2158. .IX Subsection "Options"
  2159. .IP "\fBdisplay_name\fR" 4
  2160. .IX Item "display_name"
  2161. Specify the hardware display name, which determines the display and
  2162. communications domain to be used.
  2163. .Sp
  2164. The display name or \s-1DISPLAY\s0 environment variable can be a string in
  2165. the format \fIhostname\fR[:\fInumber\fR[.\fIscreen_number\fR]].
  2166. .Sp
  2167. \&\fIhostname\fR specifies the name of the host machine on which the
  2168. display is physically attached. \fInumber\fR specifies the number of
  2169. the display server on that host machine. \fIscreen_number\fR specifies
  2170. the screen to be used on that server.
  2171. .Sp
  2172. If unspecified, it defaults to the value of the \s-1DISPLAY\s0 environment
  2173. variable.
  2174. .Sp
  2175. For example, \f(CW\*(C`dual\-headed:0.1\*(C'\fR would specify screen 1 of display
  2176. 0 on the machine named ``dual\-headed''.
  2177. .Sp
  2178. Check the X11 specification for more detailed information about the
  2179. display name format.
  2180. .IP "\fBwindow_id\fR" 4
  2181. .IX Item "window_id"
  2182. When set to non-zero value then device doesn't create new window,
  2183. but uses existing one with provided \fIwindow_id\fR. By default
  2184. this options is set to zero and device creates its own window.
  2185. .IP "\fBwindow_size\fR" 4
  2186. .IX Item "window_size"
  2187. Set the created window size, can be a string of the form
  2188. \&\fIwidth\fRx\fIheight\fR or a video size abbreviation. If not
  2189. specified it defaults to the size of the input video.
  2190. Ignored when \fIwindow_id\fR is set.
  2191. .IP "\fBwindow_x\fR" 4
  2192. .IX Item "window_x"
  2193. .PD 0
  2194. .IP "\fBwindow_y\fR" 4
  2195. .IX Item "window_y"
  2196. .PD
  2197. Set the X and Y window offsets for the created window. They are both
  2198. set to 0 by default. The values may be ignored by the window manager.
  2199. Ignored when \fIwindow_id\fR is set.
  2200. .IP "\fBwindow_title\fR" 4
  2201. .IX Item "window_title"
  2202. Set the window title, if not specified default to the filename
  2203. specified for the output device. Ignored when \fIwindow_id\fR is set.
  2204. .PP
  2205. For more information about XVideo see <\fBhttp://www.x.org/\fR>.
  2206. .PP
  2207. \fIExamples\fR
  2208. .IX Subsection "Examples"
  2209. .IP "\(bu" 4
  2210. Decode, display and encode video input with \fBffmpeg\fR at the
  2211. same time:
  2212. .Sp
  2213. .Vb 1
  2214. \& ffmpeg \-i INPUT OUTPUT \-f xv display
  2215. .Ve
  2216. .IP "\(bu" 4
  2217. Decode and display the input video to multiple X11 windows:
  2218. .Sp
  2219. .Vb 1
  2220. \& ffmpeg \-i INPUT \-f xv normal \-vf negate \-f xv negated
  2221. .Ve
  2222. .SH "SEE ALSO"
  2223. .IX Header "SEE ALSO"
  2224. \&\fBffmpeg\fR\|(1), \fBffplay\fR\|(1), \fBffprobe\fR\|(1), \fBlibavdevice\fR\|(3)
  2225. .SH "AUTHORS"
  2226. .IX Header "AUTHORS"
  2227. The FFmpeg developers.
  2228. .PP
  2229. For details about the authorship, see the Git history of the project
  2230. (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
  2231. \&\fBgit log\fR in the FFmpeg source directory, or browsing the
  2232. online repository at <\fBhttps://git.ffmpeg.org/ffmpeg\fR>.
  2233. .PP
  2234. Maintainers for the specific components are listed in the file
  2235. \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.