[FFmpeg-devel] [PATCH 17/19] Add devices section to ff* tools man pages.

Stefano Sabatini stefano.sabatini-lala
Tue May 4 19:52:16 CEST 2010


---
 Makefile              |    2 +-
 doc/devices.texi      |  201 +++++++++++++++++++++++++++++++++++++++++++++++++
 doc/ffmpeg-doc.texi   |    2 +
 doc/ffplay-doc.texi   |    2 +
 doc/ffprobe-doc.texi  |    2 +
 doc/ffserver-doc.texi |    2 +
 6 files changed, 210 insertions(+), 1 deletions(-)
 create mode 100644 doc/devices.texi

diff --git a/Makefile b/Makefile
index 18ab3a6..5f4ad2e 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ doc/%.html: doc/%.texi
 	$(M)cd doc && texi2html -monolithic -number $(<:doc/%=%)
 
 doc/%.pod: TAG = POD
-doc/%.pod: doc/%-doc.texi
+doc/%.pod: doc/%-doc.texi doc/devices.texi
 	$(M)doc/texi2pod.pl $< $@
 
 doc/%.1: TAG = MAN
diff --git a/doc/devices.texi b/doc/devices.texi
new file mode 100644
index 0000000..e777a31
--- /dev/null
+++ b/doc/devices.texi
@@ -0,0 +1,201 @@
+ at chapter Devices
+ at c man begin DEVICES
+
+ at section Introduction
+This section documents all the supported input and output devices and
+how to use them, both using one of the ff* tools or in a program using
+libavdevice.
+
+When you configure your FFmpeg build, you can disable any of the
+existing input and output devices.
+The configure output will show the input and output devices included
+in your build.
+
+The option ``-formats'' of the ff* tools will display the list of
+enabled input and output devices.
+
+Below is a description of the currently available input and output
+devices.
+
+ at c man end DEVICES
+
+ at chapter Available Input devices
+ at c man begin AVAILABLE INPUT DEVICES
+
+ at section alsa
+
+ALSA (Advanced Linux Sound Architecture).
+
+This device allows to capture from an ALSA device. The name of the
+device to capture has to be an ALSA card identifier.
+
+An ALSA identifier has the syntax:
+ at example
+hw:@var{CARD}[, at var{DEV}[, at var{SUBDEV}]]
+ at end example
+
+where the @var{DEV} and @var{SUBDEV} components are optional.
+
+To see the list of devices currently recognized by your system, run
+the command:
+ at example
+cat /proc/asound/cards
+ at end example
+
+For more information see:
+http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
+
+ at section audio_beos
+
+BeOS audio input device.
+
+ at section bktr
+
+BSD video input device.
+
+ at section dv1394
+
+Linux DV 1394 input device.
+
+ at section jack
+
+Jack input device.
+
+This device creates one or more jack writable clients, one for each
+channel, with name @var{filename}:input_ at var{N}, where @var{N} is a
+number which identifies the channel.
+
+One you have created one or more jack readable clients, you need to
+connect them to one or more jack readable client.
+
+To connect or disconnect jack clients you can use the program
+ at file{jack_connect} and @file{jack_disconnect} programs, or do it
+through a graphical interface, for example @file{qjackctl}.
+
+To list the jack clients and their properties you can invoke the command
+ at file{jack_lsp}.
+
+Follows an example which shows how to capture a jack readable client
+with @file{ffmpeg}.
+
+ at example
+# create a jack ffmpeg writable client
+$ ffmpeg -f jack -i ffmpeg -y out.wav
+
+# start the sample jack_metro readable client
+$ jack_metro -b 120 -d 0.2 -f 4000
+
+# list the current jack clients
+$ jack_lsp -c
+system:capture_1
+system:capture_2
+system:playback_1
+system:playback_2
+ffmpeg:input_1
+metro:120_bpm
+
+# connect metro to the ffmpeg client
+$ jack_connect metro:120_bpm ffmpeg:input_1
+ at end example
+
+ at section libdc1394
+
+IIDC1394 grab interface interface, based on libdc1394 and libraw1394.
+
+ at section oss
+
+Open Sound System device.
+
+The filename to provide to the input device is the device node
+representing the OSS input device, and is usually set to
+ at file{/dev/dsp/}.
+
+For example to grab from @file{/dev/dsp/} using @file{ffmpeg} use the
+command:
+
+ at example
+ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
+ at end example
+
+For more information about OSS see:
+http://manuals.opensound.com/usersguide/dsp.html
+
+ at section video4linux and video4linux2
+
+Video4Linux and Video4Linux2 input video devices.
+
+The name of the device to grab is a file device node, usually Linux
+systems tend to automatically create such nodes when the device
+(e.g. an USB webcam) is plugged in the system, and have a name of the
+kind ``/dev/video at var{N}'', where @var{N} is a number associated to
+the device.
+
+To capture the input from a v4l device run the command:
+ at example
+ffplay -s 320x240 -f video4linux /dev/video0
+ at end example
+
+If the size for the device is set to 0x0, the input device will
+try to autodetect the size to use.
+
+Video4Linux and Video4Linux devices only support a limited set of
+ at var{width}x at var{height} sizes and framerates. You can check which are
+supported for example using the command @file{dov4l} for Video4Linux
+devices, and the command @file{v4l-info} for Video4Linux2 devices.
+
+Video4Linux2 devices will try to autoadjust the size, and will set the
+nearest supported size to that provided.
+
+Video4Linux support is deprecated since Linux 2.6.30, and will be
+dropped in later versions.
+
+ at section vfwcap
+
+VFW (Video For Window) capture interface.
+
+ at section x11grab
+
+X11 video input device.
+
+This device allows to capture a region of an X11 display. The filename
+passed in input has this syntax:
+:@var{display}. at var{screen}[+ at var{x_offset}, at var{y_offset}]
+
+ at var{display}. at var{screen} specifies which display and screen of your X11
+server to grab.
+
+ at var{x_offset} and @var{y_offset} specify the offsets of the grabbed
+area with respect to the top/left border of the X11 screen image.
+
+Use the @file{dpyinfo} program for getting basic information about the
+properties of your X11 display screen (e.g. grep for ``name'' or
+``dimensions'').
+
+For example to grab from @file{:0.0} using @file{ffmpeg}:
+
+ at example
+ffmpeg -f x11grab -s cif -i :0.0 /tmp/out.mpg
+# 0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable.
+
+ffmpeg -f x11grab -s cif -i :0.0+10,20 /tmp/out.mpg
+# 0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable. 10 is the x-offset and 20 the y-offset for the grabbing.
+ at end example
+
+ at c man end AVAILABLE INPUT DEVICES
+
+ at chapter Available Output Devices
+ at c man begin AVAILABLE OUTPUT DEVICES
+
+ at section alsa
+
+ALSA (Advanced Linux Sound Architecture) output device.
+
+ at section audio_beos
+
+BeOS audio output interface.
+
+ at section oss
+
+OSS (Open Sound System) output device.
+
+ at c man end AVIALABLE OUTPUT DEVICES
diff --git a/doc/ffmpeg-doc.texi b/doc/ffmpeg-doc.texi
index fb8f17a..457d5f8 100644
--- a/doc/ffmpeg-doc.texi
+++ b/doc/ffmpeg-doc.texi
@@ -945,6 +945,8 @@ options have to be specified immediately after the name of the output
 file to which you want to add them.
 @c man end
 
+ at include devices.texi
+
 @ignore
 
 @setfilename ffmpeg
diff --git a/doc/ffplay-doc.texi b/doc/ffplay-doc.texi
index 107bb73..cd03df8 100644
--- a/doc/ffplay-doc.texi
+++ b/doc/ffplay-doc.texi
@@ -141,6 +141,8 @@ Seek to percentage in file corresponding to fraction of width.
 
 @c man end
 
+ at include devices.texi
+
 @ignore
 
 @setfilename ffplay
diff --git a/doc/ffprobe-doc.texi b/doc/ffprobe-doc.texi
index e675e61..fa8afd0 100644
--- a/doc/ffprobe-doc.texi
+++ b/doc/ffprobe-doc.texi
@@ -104,6 +104,8 @@ with name ``STREAM''.
 @end table
 @c man end
 
+ at include devices.texi
+
 @ignore
 
 @setfilename ffprobe
diff --git a/doc/ffserver-doc.texi b/doc/ffserver-doc.texi
index e02ba23..a6c4e54 100644
--- a/doc/ffserver-doc.texi
+++ b/doc/ffserver-doc.texi
@@ -255,6 +255,8 @@ rather than as a daemon.
 @end table
 @c man end
 
+ at include devices.texi
+
 @ignore
 
 @setfilename ffserver
-- 
1.7.0




More information about the ffmpeg-devel mailing list