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.

313 lines
8.8KB

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