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

329 lines
9.0KB

  1. @chapter Output Devices
  2. @c man begin OUTPUT DEVICES
  3. Output devices are configured elements in FFmpeg that can write
  4. multimedia data to an output device attached to your system.
  5. When you configure your FFmpeg build, all the supported output devices
  6. are enabled by default. You can list all available ones using the
  7. configure option "--list-outdevs".
  8. You can disable all the output devices using the configure option
  9. "--disable-outdevs", and selectively enable an output device using the
  10. option "--enable-outdev=@var{OUTDEV}", or you can disable a particular
  11. input device using the option "--disable-outdev=@var{OUTDEV}".
  12. The option "-formats" of the ff* tools will display the list of
  13. enabled output devices (amongst the muxers).
  14. A description of the currently available output devices follows.
  15. @section alsa
  16. ALSA (Advanced Linux Sound Architecture) output device.
  17. @subsection Examples
  18. @itemize
  19. @item
  20. Play a file on default ALSA device:
  21. @example
  22. ffmpeg -i INPUT -f alsa default
  23. @end example
  24. @item
  25. Play a file on soundcard 1, audio device 7:
  26. @example
  27. ffmpeg -i INPUT -f alsa hw:1,7
  28. @end example
  29. @end itemize
  30. @section caca
  31. CACA output device.
  32. This output device allows to show a video stream in CACA window.
  33. Only one CACA window is allowed per application, so you can
  34. have only one instance of this output device in an application.
  35. To enable this output device you need to configure FFmpeg with
  36. @code{--enable-libcaca}.
  37. libcaca is a graphics library that outputs text instead of pixels.
  38. For more information about libcaca, check:
  39. @url{http://caca.zoy.org/wiki/libcaca}
  40. @subsection Options
  41. @table @option
  42. @item window_title
  43. Set the CACA window title, if not specified default to the filename
  44. specified for the output device.
  45. @item window_size
  46. Set the CACA window size, can be a string of the form
  47. @var{width}x@var{height} or a video size abbreviation.
  48. If not specified it defaults to the size of the input video.
  49. @item driver
  50. Set display driver.
  51. @item algorithm
  52. Set dithering algorithm. Dithering is necessary
  53. because the picture being rendered has usually far more colours than
  54. the available palette.
  55. The accepted values are listed with @code{-list_dither algorithms}.
  56. @item antialias
  57. Set antialias method. Antialiasing smoothens the rendered
  58. image and avoids the commonly seen staircase effect.
  59. The accepted values are listed with @code{-list_dither antialiases}.
  60. @item charset
  61. Set which characters are going to be used when rendering text.
  62. The accepted values are listed with @code{-list_dither charsets}.
  63. @item color
  64. Set color to be used when rendering text.
  65. The accepted values are listed with @code{-list_dither colors}.
  66. @item list_drivers
  67. If set to @option{true}, print a list of available drivers and exit.
  68. @item list_dither
  69. List available dither options related to the argument.
  70. The argument must be one of @code{algorithms}, @code{antialiases},
  71. @code{charsets}, @code{colors}.
  72. @end table
  73. @subsection Examples
  74. @itemize
  75. @item
  76. The following command shows the @command{ffmpeg} output is an
  77. CACA window, forcing its size to 80x25:
  78. @example
  79. ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
  80. @end example
  81. @item
  82. Show the list of available drivers and exit:
  83. @example
  84. ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
  85. @end example
  86. @item
  87. Show the list of available dither colors and exit:
  88. @example
  89. ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
  90. @end example
  91. @end itemize
  92. @section fbdev
  93. Linux framebuffer output device.
  94. The Linux framebuffer is a graphic hardware-independent abstraction
  95. layer to show graphics on a computer monitor, typically on the
  96. console. It is accessed through a file device node, usually
  97. @file{/dev/fb0}.
  98. For more detailed information read the file
  99. @file{Documentation/fb/framebuffer.txt} included in the Linux source tree.
  100. @subsection Options
  101. @table @option
  102. @item xoffset
  103. @item yoffset
  104. Set x/y coordinate of top left corner. Default is 0.
  105. @end table
  106. @subsection Examples
  107. Play a file on framebuffer device @file{/dev/fb0}.
  108. Required pixel format depends on current framebuffer settings.
  109. @example
  110. ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
  111. @end example
  112. See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
  113. @section oss
  114. OSS (Open Sound System) output device.
  115. @section pulse
  116. PulseAudio output device.
  117. To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
  118. More information about PulseAudio can be found on @url{http://www.pulseaudio.org}
  119. @subsection Options
  120. @table @option
  121. @item server
  122. Connect to a specific PulseAudio server, specified by an IP address.
  123. Default server is used when not provided.
  124. @item name
  125. Specify the application name PulseAudio will use when showing active clients,
  126. by default it is the @code{LIBAVFORMAT_IDENT} string.
  127. @item stream_name
  128. Specify the stream name PulseAudio will use when showing active streams,
  129. by default it is set to the specified output name.
  130. @item device
  131. Specify the device to use. Default device is used when not provided.
  132. List of output devices can be obtained with command @command{pactl list sinks}.
  133. @item buffer_size
  134. @item buffer_duration
  135. Control the size and duration of the PulseAudio buffer. A small buffer
  136. gives more control, but requires more frequent updates.
  137. @option{buffer_size} specifies size in bytes while
  138. @option{buffer_duration} specifies duration in milliseconds.
  139. When both options are provided then the highest value is used
  140. (duration is recalculated to bytes using stream parameters). If they
  141. are set to 0 (which is default), the device will use the default
  142. PulseAudio duration value. By default PulseAudio set buffer duration
  143. to around 2 seconds.
  144. @end table
  145. @subsection Examples
  146. Play a file on default device on default server:
  147. @example
  148. ffmpeg -i INPUT -f pulse "stream name"
  149. @end example
  150. @section sdl
  151. SDL (Simple DirectMedia Layer) output device.
  152. This output device allows to show a video stream in an SDL
  153. window. Only one SDL window is allowed per application, so you can
  154. have only one instance of this output device in an application.
  155. To enable this output device you need libsdl installed on your system
  156. when configuring your build.
  157. For more information about SDL, check:
  158. @url{http://www.libsdl.org/}
  159. @subsection Options
  160. @table @option
  161. @item window_title
  162. Set the SDL window title, if not specified default to the filename
  163. specified for the output device.
  164. @item icon_title
  165. Set the name of the iconified SDL window, if not specified it is set
  166. to the same value of @var{window_title}.
  167. @item window_size
  168. Set the SDL window size, can be a string of the form
  169. @var{width}x@var{height} or a video size abbreviation.
  170. If not specified it defaults to the size of the input video,
  171. downscaled according to the aspect ratio.
  172. @item window_fullscreen
  173. Set fullscreen mode when non-zero value is provided.
  174. Default value is zero.
  175. @end table
  176. @subsection Interactive commands
  177. The window created by the device can be controlled through the
  178. following interactive commands.
  179. @table @key
  180. @item q, ESC
  181. Quit the device immediately.
  182. @end table
  183. @subsection Examples
  184. The following command shows the @command{ffmpeg} output is an
  185. SDL window, forcing its size to the qcif format:
  186. @example
  187. ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
  188. @end example
  189. @section sndio
  190. sndio audio output device.
  191. @section xv
  192. XV (XVideo) output device.
  193. This output device allows to show a video stream in a X Window System
  194. window.
  195. @subsection Options
  196. @table @option
  197. @item display_name
  198. Specify the hardware display name, which determines the display and
  199. communications domain to be used.
  200. The display name or DISPLAY environment variable can be a string in
  201. the format @var{hostname}[:@var{number}[.@var{screen_number}]].
  202. @var{hostname} specifies the name of the host machine on which the
  203. display is physically attached. @var{number} specifies the number of
  204. the display server on that host machine. @var{screen_number} specifies
  205. the screen to be used on that server.
  206. If unspecified, it defaults to the value of the DISPLAY environment
  207. variable.
  208. For example, @code{dual-headed:0.1} would specify screen 1 of display
  209. 0 on the machine named ``dual-headed''.
  210. Check the X11 specification for more detailed information about the
  211. display name format.
  212. @item window_size
  213. Set the created window size, can be a string of the form
  214. @var{width}x@var{height} or a video size abbreviation. If not
  215. specified it defaults to the size of the input video.
  216. @item window_x
  217. @item window_y
  218. Set the X and Y window offsets for the created window. They are both
  219. set to 0 by default. The values may be ignored by the window manager.
  220. @item window_title
  221. Set the window title, if not specified default to the filename
  222. specified for the output device.
  223. @end table
  224. For more information about XVideo see @url{http://www.x.org/}.
  225. @subsection Examples
  226. @itemize
  227. @item
  228. Decode, display and encode video input with @command{ffmpeg} at the
  229. same time:
  230. @example
  231. ffmpeg -i INPUT OUTPUT -f xv display
  232. @end example
  233. @item
  234. Decode and display the input video to multiple X11 windows:
  235. @example
  236. ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
  237. @end example
  238. @end itemize
  239. @c man end OUTPUT DEVICES