2037 lines
79 KiB
HTML
2037 lines
79 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
|
<html>
|
|
<!-- Created on January 27, 2012 by texi2html 1.82 -->
|
|
<!--
|
|
texi2html was written by:
|
|
Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
Karl Berry <karl@freefriends.org>
|
|
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
and many others.
|
|
Maintained by: Many creative people.
|
|
Send bugs and suggestions to <texi2html-bug@nongnu.org>
|
|
|
|
-->
|
|
<head>
|
|
<title>FFmpeg documentation : : </title>
|
|
|
|
<meta name="description" content=": ">
|
|
<meta name="keywords" content="FFmpeg documentation : : ">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="texi2html 1.82">
|
|
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter { text-decoration: none }
|
|
a { color: #2D6198; }
|
|
a:visited { color: #884488; }
|
|
h1 a, h2 a, h3 a { text-decoration: inherit; color: inherit; }
|
|
p { margin-left: 1em; margin-right: 1em; }
|
|
table { margin-left: 2em; }
|
|
pre { margin-left: 2em; }
|
|
#footer { text-align: center; }
|
|
#body { margin-left: 1em; margin-right: 1em; }
|
|
body { background-color: #313131; margin: 0; }
|
|
|
|
#container {
|
|
background-color: white;
|
|
color: #202020;
|
|
margin-left: 1em;
|
|
margin-right: 1em;
|
|
}
|
|
|
|
h1 {
|
|
background-color: #7BB37B;
|
|
border: 1px solid #6A996A;
|
|
color: #151515;
|
|
font-size: 1.2em;
|
|
padding-bottom: 0.2em;
|
|
padding-left: 0.4em;
|
|
padding-top: 0.2em;
|
|
}
|
|
|
|
h2 {
|
|
color: #313131;
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
h3 {
|
|
color: #313131;
|
|
font-size: 0.8em;
|
|
margin-bottom: -8px;
|
|
}
|
|
|
|
.note {
|
|
margin: 1em;
|
|
border: 1px solid #bbc9d8;
|
|
background-color: #dde1e1;
|
|
}
|
|
|
|
.important {
|
|
margin: 1em;
|
|
border: 1px solid #d26767;
|
|
background-color: #f8e1e1;
|
|
}
|
|
|
|
-->
|
|
</style>
|
|
|
|
<link rel="icon" href="favicon.png" type="image/png" />
|
|
<link rel="stylesheet" type="text/css" href="default.css" />
|
|
|
|
</head>
|
|
|
|
<body >
|
|
<div id="container">
|
|
|
|
<div id="body">
|
|
<a name="SEC_Top"></a>
|
|
<h1 class="settitle">ffprobe Documentation</h1>
|
|
|
|
<a name="SEC_Contents"></a>
|
|
<h1>Table of Contents</h1>
|
|
<div class="contents">
|
|
|
|
<ul class="toc">
|
|
<li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li>
|
|
<li><a name="toc-Description" href="#Description">2. Description</a></li>
|
|
<li><a name="toc-Options-4" href="#Options-4">3. Options</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
|
|
<li><a name="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
|
|
<li><a name="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
|
|
<li><a name="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-Writers" href="#Writers">4. Writers</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-default" href="#default">4.1 default</a></li>
|
|
<li><a name="toc-compact" href="#compact">4.2 compact</a></li>
|
|
<li><a name="toc-csv" href="#csv">4.3 csv</a></li>
|
|
<li><a name="toc-json" href="#json">4.4 json</a></li>
|
|
<li><a name="toc-xml" href="#xml">4.5 xml</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-Timecode" href="#Timecode">5. Timecode</a></li>
|
|
<li><a name="toc-Decoders" href="#Decoders">6. Decoders</a></li>
|
|
<li><a name="toc-Video-Decoders" href="#Video-Decoders">7. Video Decoders</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-rawvideo" href="#rawvideo">7.1 rawvideo</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Options" href="#Options">7.1.1 Options</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul></li>
|
|
<li><a name="toc-Audio-Decoders" href="#Audio-Decoders">8. Audio Decoders</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-ffwavesynth" href="#ffwavesynth">8.1 ffwavesynth</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-Demuxers" href="#Demuxers">9. Demuxers</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-image2" href="#image2">9.1 image2</a></li>
|
|
<li><a name="toc-applehttp-1" href="#applehttp-1">9.2 applehttp</a></li>
|
|
<li><a name="toc-sbg" href="#sbg">9.3 sbg</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-Protocols" href="#Protocols">10. Protocols</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-applehttp" href="#applehttp">10.1 applehttp</a></li>
|
|
<li><a name="toc-concat" href="#concat">10.2 concat</a></li>
|
|
<li><a name="toc-file" href="#file">10.3 file</a></li>
|
|
<li><a name="toc-gopher" href="#gopher">10.4 gopher</a></li>
|
|
<li><a name="toc-http" href="#http">10.5 http</a></li>
|
|
<li><a name="toc-mmst" href="#mmst">10.6 mmst</a></li>
|
|
<li><a name="toc-mmsh" href="#mmsh">10.7 mmsh</a></li>
|
|
<li><a name="toc-md5" href="#md5">10.8 md5</a></li>
|
|
<li><a name="toc-pipe" href="#pipe">10.9 pipe</a></li>
|
|
<li><a name="toc-rtmp" href="#rtmp">10.10 rtmp</a></li>
|
|
<li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">10.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
|
|
<li><a name="toc-rtp" href="#rtp">10.12 rtp</a></li>
|
|
<li><a name="toc-rtsp" href="#rtsp">10.13 rtsp</a></li>
|
|
<li><a name="toc-sap" href="#sap">10.14 sap</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Muxer" href="#Muxer">10.14.1 Muxer</a></li>
|
|
<li><a name="toc-Demuxer" href="#Demuxer">10.14.2 Demuxer</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-tcp" href="#tcp">10.15 tcp</a></li>
|
|
<li><a name="toc-udp" href="#udp">10.16 udp</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-Input-Devices" href="#Input-Devices">11. Input Devices</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-alsa" href="#alsa">11.1 alsa</a></li>
|
|
<li><a name="toc-bktr" href="#bktr">11.2 bktr</a></li>
|
|
<li><a name="toc-dshow" href="#dshow">11.3 dshow</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Options-1" href="#Options-1">11.3.1 Options</a></li>
|
|
<li><a name="toc-Examples-2" href="#Examples-2">11.3.2 Examples</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-dv1394" href="#dv1394">11.4 dv1394</a></li>
|
|
<li><a name="toc-fbdev" href="#fbdev">11.5 fbdev</a></li>
|
|
<li><a name="toc-jack" href="#jack">11.6 jack</a></li>
|
|
<li><a name="toc-lavfi" href="#lavfi">11.7 lavfi</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Options-3" href="#Options-3">11.7.1 Options</a></li>
|
|
<li><a name="toc-Examples" href="#Examples">11.7.2 Examples</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-libdc1394" href="#libdc1394">11.8 libdc1394</a></li>
|
|
<li><a name="toc-openal" href="#openal">11.9 openal</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-Options-2" href="#Options-2">11.9.1 Options</a></li>
|
|
<li><a name="toc-Examples-1" href="#Examples-1">11.9.2 Examples</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-oss" href="#oss">11.10 oss</a></li>
|
|
<li><a name="toc-pulse" href="#pulse">11.11 pulse</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-server-AVOption" href="#server-AVOption">11.11.1 <var>server</var> AVOption</a></li>
|
|
<li><a name="toc-name-AVOption" href="#name-AVOption">11.11.2 <var>name</var> AVOption</a></li>
|
|
<li><a name="toc-stream_005fname-AVOption" href="#stream_005fname-AVOption">11.11.3 <var>stream_name</var> AVOption</a></li>
|
|
<li><a name="toc-sample_005frate-AVOption" href="#sample_005frate-AVOption">11.11.4 <var>sample_rate</var> AVOption</a></li>
|
|
<li><a name="toc-channels-AVOption" href="#channels-AVOption">11.11.5 <var>channels</var> AVOption</a></li>
|
|
<li><a name="toc-frame_005fsize-AVOption" href="#frame_005fsize-AVOption">11.11.6 <var>frame_size</var> AVOption</a></li>
|
|
<li><a name="toc-fragment_005fsize-AVOption" href="#fragment_005fsize-AVOption">11.11.7 <var>fragment_size</var> AVOption</a></li>
|
|
</ul></li>
|
|
<li><a name="toc-sndio" href="#sndio">11.12 sndio</a></li>
|
|
<li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">11.13 video4linux and video4linux2</a></li>
|
|
<li><a name="toc-vfwcap" href="#vfwcap">11.14 vfwcap</a></li>
|
|
<li><a name="toc-x11grab" href="#x11grab">11.15 x11grab</a>
|
|
<ul class="toc">
|
|
<li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">11.15.1 <var>follow_mouse</var> AVOption</a></li>
|
|
<li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">11.15.2 <var>show_region</var> AVOption</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<a name="Synopsis"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Synopsis">1. Synopsis</a></h1>
|
|
|
|
<p>The generic syntax is:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffprobe [options] [‘<tt>input_file</tt>’]
|
|
</pre></td></tr></table>
|
|
|
|
<a name="Description"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Description">2. Description</a></h1>
|
|
|
|
<p>ffprobe gathers information from multimedia streams and prints it in
|
|
human- and machine-readable fashion.
|
|
</p>
|
|
<p>For example it can be used to check the format of the container used
|
|
by a multimedia stream and the format and type of each media stream
|
|
contained in it.
|
|
</p>
|
|
<p>If a filename is specified in input, ffprobe will try to open and
|
|
probe the file content. If the file cannot be opened or recognized as
|
|
a multimedia file, a positive exit code is returned.
|
|
</p>
|
|
<p>ffprobe may be employed both as a standalone application or in
|
|
combination with a textual filter, which may perform more
|
|
sophisticated processing, e.g. statistical processing or plotting.
|
|
</p>
|
|
<p>Options are used to list some of the formats supported by ffprobe or
|
|
for specifying which information to display, and for setting how
|
|
ffprobe will show it.
|
|
</p>
|
|
<p>ffprobe output is designed to be easily parsable by a textual filter,
|
|
and consists of one or more sections of a form defined by the selected
|
|
writer, which is specified by the ‘<samp>print_format</samp>’ option.
|
|
</p>
|
|
<p>Metadata tags stored in the container or in the streams are recognized
|
|
and printed in the corresponding "FORMAT" or "STREAM" section.
|
|
</p>
|
|
|
|
<a name="Options-4"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Options-4">3. Options</a></h1>
|
|
|
|
<p>All the numerical options, if not specified otherwise, accept in input
|
|
a string representing a number, which may contain one of the
|
|
International System number postfixes, for example ’K’, ’M’, ’G’.
|
|
If ’i’ is appended after the postfix, powers of 2 are used instead of
|
|
powers of 10. The ’B’ postfix multiplies the value for 8, and can be
|
|
appended after another postfix or used alone. This allows using for
|
|
example ’KB’, ’MiB’, ’G’ and ’B’ as postfix.
|
|
</p>
|
|
<p>Options which do not take arguments are boolean options, and set the
|
|
corresponding value to true. They can be set to false by prefixing
|
|
with "no" the option name, for example using "-nofoo" in the
|
|
command line will set to false the boolean option with name "foo".
|
|
</p>
|
|
<p><a name="Stream-specifiers"></a>
|
|
</p><a name="Stream-specifiers-1"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-Stream-specifiers-1">3.1 Stream specifiers</a></h2>
|
|
<p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
|
are used to precisely specify which stream(s) does a given option belong to.
|
|
</p>
|
|
<p>A stream specifier is a string generally appended to the option name and
|
|
separated from it by a colon. E.g. <code>-codec:a:1 ac3</code> option contains
|
|
<code>a:1</code> stream specifer, which matches the second audio stream. Therefore it
|
|
would select the ac3 codec for the second audio stream.
|
|
</p>
|
|
<p>A stream specifier can match several stream, the option is then applied to all
|
|
of them. E.g. the stream specifier in <code>-b:a 128k</code> matches all audio
|
|
streams.
|
|
</p>
|
|
<p>An empty stream specifier matches all streams, for example <code>-codec copy</code>
|
|
or <code>-codec: copy</code> would copy all the streams without reencoding.
|
|
</p>
|
|
<p>Possible forms of stream specifiers are:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp><var>stream_index</var></samp>’</dt>
|
|
<dd><p>Matches the stream with this index. E.g. <code>-threads:1 4</code> would set the
|
|
thread count for the second stream to 4.
|
|
</p></dd>
|
|
<dt> ‘<samp><var>stream_type</var>[:<var>stream_index</var>]</samp>’</dt>
|
|
<dd><p><var>stream_type</var> is one of: ’v’ for video, ’a’ for audio, ’s’ for subtitle,
|
|
’d’ for data and ’t’ for attachments. If <var>stream_index</var> is given, then
|
|
matches stream number <var>stream_index</var> of this type. Otherwise matches all
|
|
streams of this type.
|
|
</p></dd>
|
|
<dt> ‘<samp>p:<var>program_id</var>[:<var>stream_index</var>]</samp>’</dt>
|
|
<dd><p>If <var>stream_index</var> is given, then matches stream number <var>stream_index</var> in
|
|
program with id <var>program_id</var>. Otherwise matches all streams in this program.
|
|
</p></dd>
|
|
</dl>
|
|
<a name="Generic-options"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-Generic-options">3.2 Generic options</a></h2>
|
|
|
|
<p>These options are shared amongst the av* tools.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>-L</samp>’</dt>
|
|
<dd><p>Show license.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-h, -?, -help, --help</samp>’</dt>
|
|
<dd><p>Show help.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-version</samp>’</dt>
|
|
<dd><p>Show version.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-formats</samp>’</dt>
|
|
<dd><p>Show available formats.
|
|
</p>
|
|
<p>The fields preceding the format names have the following meanings:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>D</samp>’</dt>
|
|
<dd><p>Decoding available
|
|
</p></dd>
|
|
<dt> ‘<samp>E</samp>’</dt>
|
|
<dd><p>Encoding available
|
|
</p></dd>
|
|
</dl>
|
|
|
|
</dd>
|
|
<dt> ‘<samp>-codecs</samp>’</dt>
|
|
<dd><p>Show available codecs.
|
|
</p>
|
|
<p>The fields preceding the codec names have the following meanings:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>D</samp>’</dt>
|
|
<dd><p>Decoding available
|
|
</p></dd>
|
|
<dt> ‘<samp>E</samp>’</dt>
|
|
<dd><p>Encoding available
|
|
</p></dd>
|
|
<dt> ‘<samp>V/A/S</samp>’</dt>
|
|
<dd><p>Video/audio/subtitle codec
|
|
</p></dd>
|
|
<dt> ‘<samp>S</samp>’</dt>
|
|
<dd><p>Codec supports slices
|
|
</p></dd>
|
|
<dt> ‘<samp>D</samp>’</dt>
|
|
<dd><p>Codec supports direct rendering
|
|
</p></dd>
|
|
<dt> ‘<samp>T</samp>’</dt>
|
|
<dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
|
|
</p></dd>
|
|
</dl>
|
|
|
|
</dd>
|
|
<dt> ‘<samp>-bsfs</samp>’</dt>
|
|
<dd><p>Show available bitstream filters.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-protocols</samp>’</dt>
|
|
<dd><p>Show available protocols.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-filters</samp>’</dt>
|
|
<dd><p>Show available libavfilter filters.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-pix_fmts</samp>’</dt>
|
|
<dd><p>Show available pixel formats.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-sample_fmts</samp>’</dt>
|
|
<dd><p>Show available sample formats.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-loglevel <var>loglevel</var> | -v <var>loglevel</var></samp>’</dt>
|
|
<dd><p>Set the logging level used by the library.
|
|
<var>loglevel</var> is a number or a string containing one of the following values:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>quiet</samp>’</dt>
|
|
<dt> ‘<samp>panic</samp>’</dt>
|
|
<dt> ‘<samp>fatal</samp>’</dt>
|
|
<dt> ‘<samp>error</samp>’</dt>
|
|
<dt> ‘<samp>warning</samp>’</dt>
|
|
<dt> ‘<samp>info</samp>’</dt>
|
|
<dt> ‘<samp>verbose</samp>’</dt>
|
|
<dt> ‘<samp>debug</samp>’</dt>
|
|
</dl>
|
|
|
|
<p>By default the program logs to stderr, if coloring is supported by the
|
|
terminal, colors are used to mark errors and warnings. Log coloring
|
|
can be disabled setting the environment variable
|
|
<code>AV_LOG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
|
|
the environment variable <code>AV_LOG_FORCE_COLOR</code>.
|
|
The use of the environment variable <code>NO_COLOR</code> is deprecated and
|
|
will be dropped in a following FFmpeg version.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-report</samp>’</dt>
|
|
<dd><p>Dump full command line and console output to a file named
|
|
<code><var>program</var>-<var>YYYYMMDD</var>-<var>HHMMSS</var>.log</code> in the current
|
|
directory.
|
|
This file can be useful for bug reports.
|
|
It also implies <code>-loglevel verbose</code>.
|
|
</p>
|
|
<p>Note: setting the environment variable <code>FFREPORT</code> to any value has the
|
|
same effect.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="AVOptions"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-AVOptions">3.3 AVOptions</a></h2>
|
|
|
|
<p>These options are provided directly by the libavformat, libavdevice and
|
|
libavcodec libraries. To see the list of available AVOptions, use the
|
|
‘<samp>-help</samp>’ option. They are separated into two categories:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>generic</samp>’</dt>
|
|
<dd><p>These options can be set for any container, codec or device. Generic options
|
|
are listed under AVFormatContext options for containers/devices and under
|
|
AVCodecContext options for codecs.
|
|
</p></dd>
|
|
<dt> ‘<samp>private</samp>’</dt>
|
|
<dd><p>These options are specific to the given container, device or codec. Private
|
|
options are listed under their corresponding containers/devices/codecs.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
|
|
an MP3 file, use the ‘<samp>id3v2_version</samp>’ private option of the MP3
|
|
muxer:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
|
</pre></td></tr></table>
|
|
|
|
<p>All codec AVOptions are obviously per-stream, so the chapter on stream
|
|
specifiers applies to them
|
|
</p>
|
|
<p>Note ‘<samp>-nooption</samp>’ syntax cannot be used for boolean AVOptions,
|
|
use ‘<samp>-option 0</samp>’/‘<samp>-option 1</samp>’.
|
|
</p>
|
|
<p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
|
v/a/s to the options name is now obsolete and will be removed soon.
|
|
</p>
|
|
<a name="Main-options"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-Main-options">3.4 Main options</a></h2>
|
|
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>-f <var>format</var></samp>’</dt>
|
|
<dd><p>Force format to use.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-unit</samp>’</dt>
|
|
<dd><p>Show the unit of the displayed values.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-prefix</samp>’</dt>
|
|
<dd><p>Use SI prefixes for the displayed values.
|
|
Unless the "-byte_binary_prefix" option is used all the prefixes
|
|
are decimal.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-byte_binary_prefix</samp>’</dt>
|
|
<dd><p>Force the use of binary prefixes for byte values.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-sexagesimal</samp>’</dt>
|
|
<dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-pretty</samp>’</dt>
|
|
<dd><p>Prettify the format of the displayed values, it corresponds to the
|
|
options "-unit -prefix -byte_binary_prefix -sexagesimal".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-print_format <var>writer_name</var>[=<var>writer_options</var>]</samp>’</dt>
|
|
<dd><p>Set the output printing format.
|
|
</p>
|
|
<p><var>writer_name</var> specifies the name of the writer, and
|
|
<var>writer_options</var> specifies the options to be passed to the writer.
|
|
</p>
|
|
<p>For example for printing the output in JSON format, specify:
|
|
</p><table><tr><td> </td><td><pre class="example">-print_format json
|
|
</pre></td></tr></table>
|
|
|
|
<p>For more details on the available output printing formats, see the
|
|
Writers section below.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_error</samp>’</dt>
|
|
<dd><p>Show information about the error found when trying to probe the input.
|
|
</p>
|
|
<p>The error information is printed within a section with name "ERROR".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_format</samp>’</dt>
|
|
<dd><p>Show information about the container format of the input multimedia
|
|
stream.
|
|
</p>
|
|
<p>All the container format information is printed within a section with
|
|
name "FORMAT".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_packets</samp>’</dt>
|
|
<dd><p>Show information about each packet contained in the input multimedia
|
|
stream.
|
|
</p>
|
|
<p>The information for each single packet is printed within a dedicated
|
|
section with name "PACKET".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_frames</samp>’</dt>
|
|
<dd><p>Show information about each frame contained in the input multimedia
|
|
stream.
|
|
</p>
|
|
<p>The information for each single frame is printed within a dedicated
|
|
section with name "FRAME".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_streams</samp>’</dt>
|
|
<dd><p>Show information about each media stream contained in the input
|
|
multimedia stream.
|
|
</p>
|
|
<p>Each media stream information is printed within a dedicated section
|
|
with name "STREAM".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_private_data, -private</samp>’</dt>
|
|
<dd><p>Show private data, that is data depending on the format of the
|
|
particular shown element.
|
|
This option is enabled by default, but you may need to disable it
|
|
for specific uses, for example when creating XSD-compliant XML output.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_program_version</samp>’</dt>
|
|
<dd><p>Show information related to program version.
|
|
</p>
|
|
<p>Version information is printed within a section with name
|
|
"PROGRAM_VERSION".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_library_versions</samp>’</dt>
|
|
<dd><p>Show information related to library versions.
|
|
</p>
|
|
<p>Version information for each library is printed within a section with
|
|
name "LIBRARY_VERSION".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-show_versions</samp>’</dt>
|
|
<dd><p>Show information related to program and library versions. This is the
|
|
equivalent of setting both ‘<samp>-show_program_version</samp>’ and
|
|
‘<samp>-show_library_versions</samp>’ options.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>-i <var>input_file</var></samp>’</dt>
|
|
<dd><p>Read <var>input_file</var>.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="Writers"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Writers">4. Writers</a></h1>
|
|
|
|
<p>A writer defines the output format adopted by <code>ffprobe</code>, and will be
|
|
used for printing all the parts of the output.
|
|
</p>
|
|
<p>A writer may accept one or more arguments, which specify the options to
|
|
adopt.
|
|
</p>
|
|
<p>A description of the currently available writers follows.
|
|
</p>
|
|
<a name="default"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-default">4.1 default</a></h2>
|
|
<p>Default format.
|
|
</p>
|
|
<p>Print each section in the form:
|
|
</p><table><tr><td> </td><td><pre class="example">[SECTION]
|
|
key1=val1
|
|
...
|
|
keyN=valN
|
|
[/SECTION]
|
|
</pre></td></tr></table>
|
|
|
|
<p>Metadata tags are printed as a line in the corresponding FORMAT or
|
|
STREAM section, and are prefixed by the string "TAG:".
|
|
</p>
|
|
<a name="compact"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-compact">4.2 compact</a></h2>
|
|
<p>Compact format.
|
|
</p>
|
|
<p>Each section is printed on a single line.
|
|
If no option is specifid, the output has the form:
|
|
</p><table><tr><td> </td><td><pre class="example">section|key1=val1| ... |keyN=valN
|
|
</pre></td></tr></table>
|
|
|
|
<p>Metadata tags are printed in the corresponding "format" or "stream"
|
|
section. A metadata tag key, if printed, is prefixed by the string
|
|
"tag:".
|
|
</p>
|
|
<p>This writer accepts options as a list of <var>key</var>=<var>value</var> pairs,
|
|
separated by ":".
|
|
</p>
|
|
<p>The description of the accepted options follows.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>item_sep, s</samp>’</dt>
|
|
<dd><p>Specify the character to use for separating fields in the output line.
|
|
It must be a single printable character, it is "|" by default.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>nokey, nk</samp>’</dt>
|
|
<dd><p>If set to 1 specify not to print the key of each field. Its default
|
|
value is 0.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>escape, e</samp>’</dt>
|
|
<dd><p>Set the escape mode to use, default to "c".
|
|
</p>
|
|
<p>It can assume one of the following values:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>c</samp>’</dt>
|
|
<dd><p>Perform C-like escaping. Strings containing a newline (’\n’) or
|
|
carriage return (’\r’), the escaping character (’\’) or the item
|
|
separator character <var>SEP</var> are escaped using C-like fashioned
|
|
escaping, so that a newline is converted to the sequence "\n", a
|
|
carriage return to "\r", ’\’ to "\\" and the separator <var>SEP</var> is
|
|
converted to "\<var>SEP</var>".
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>csv</samp>’</dt>
|
|
<dd><p>Perform CSV-like escaping, as described in RFC4180. Strings
|
|
containing a newline (’\n’), a carriage return (’\r’), a double quote
|
|
(’"’), or <var>SEP</var> are enclosed in double-quotes.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>none</samp>’</dt>
|
|
<dd><p>Perform no escaping.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="csv"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-csv">4.3 csv</a></h2>
|
|
<p>CSV format.
|
|
</p>
|
|
<p>This writer is equivalent to
|
|
<code>compact=item_sep=,:nokey=1:escape=csv</code>.
|
|
</p>
|
|
<a name="json"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-json">4.4 json</a></h2>
|
|
<p>JSON based format.
|
|
</p>
|
|
<p>Each section is printed using JSON notation.
|
|
</p>
|
|
<p>This writer accepts options as a list of <var>key</var>=<var>value</var> pairs,
|
|
separated by ":".
|
|
</p>
|
|
<p>The description of the accepted options follows.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>compact, c</samp>’</dt>
|
|
<dd><p>If set to 1 enable compact output, that is each section will be
|
|
printed on a single line. Default value is 0.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>For more information about JSON, see <a href="http://www.json.org/">http://www.json.org/</a>.
|
|
</p>
|
|
<a name="xml"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-xml">4.5 xml</a></h2>
|
|
<p>XML based format.
|
|
</p>
|
|
<p>The XML output is described in the XML schema description file
|
|
‘<tt>ffprobe.xsd</tt>’ installed in the FFmpeg datadir.
|
|
</p>
|
|
<p>Note that the output issued will be compliant to the
|
|
‘<tt>ffprobe.xsd</tt>’ schema only when no special global output options
|
|
(‘<samp>unit</samp>’, ‘<samp>prefix</samp>’, ‘<samp>byte_binary_prefix</samp>’,
|
|
‘<samp>sexagesimal</samp>’ etc.) are specified.
|
|
</p>
|
|
<p>This writer accepts options as a list of <var>key</var>=<var>value</var> pairs,
|
|
separated by ":".
|
|
</p>
|
|
<p>The description of the accepted options follows.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>fully_qualified, q</samp>’</dt>
|
|
<dd><p>If set to 1 specify if the output should be fully qualified. Default
|
|
value is 0.
|
|
This is required for generating an XML file which can be validated
|
|
through an XSD file.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>xsd_compliant, x</samp>’</dt>
|
|
<dd><p>If set to 1 perform more checks for ensuring that the output is XSD
|
|
compliant. Default value is 0.
|
|
This option automatically sets ‘<samp>fully_qualified</samp>’ to 1.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>For more information about the XML format, see
|
|
<a href="http://www.w3.org/XML/">http://www.w3.org/XML/</a>.
|
|
</p>
|
|
<a name="Timecode"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Timecode">5. Timecode</a></h1>
|
|
|
|
<p><code>ffprobe</code> supports Timecode extraction:
|
|
</p>
|
|
<ul>
|
|
<li> MPEG1/2 timecode is extracted from the GOP, and is available in the video
|
|
stream details (‘<samp>-show_streams</samp>’, see <var>timecode</var>).
|
|
|
|
</li><li> MOV timecode is extracted from tmcd track, so is available in the tmcd
|
|
stream metadata (‘<samp>-show_streams</samp>’, see <var>TAG:timecode</var>).
|
|
|
|
</li><li> DV and GXF timecodes are available in format metadata
|
|
(‘<samp>-show_format</samp>’, see <var>TAG:timecode</var>).
|
|
|
|
</li></ul>
|
|
|
|
|
|
<a name="Decoders"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Decoders">6. Decoders</a></h1>
|
|
|
|
<p>Decoders are configured elements in FFmpeg which allow the decoding of
|
|
multimedia streams.
|
|
</p>
|
|
<p>When you configure your FFmpeg build, all the supported native decoders
|
|
are enabled by default. Decoders requiring an external library must be enabled
|
|
manually via the corresponding <code>--enable-lib</code> option. You can list all
|
|
available decoders using the configure option <code>--list-decoders</code>.
|
|
</p>
|
|
<p>You can disable all the decoders with the configure option
|
|
<code>--disable-decoders</code> and selectively enable / disable single decoders
|
|
with the options <code>--enable-decoder=<var>DECODER</var></code> /
|
|
<code>--disable-decoder=<var>DECODER</var></code>.
|
|
</p>
|
|
<p>The option <code>-codecs</code> of the ff* tools will display the list of
|
|
enabled decoders.
|
|
</p>
|
|
|
|
<a name="Video-Decoders"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Video-Decoders">7. Video Decoders</a></h1>
|
|
|
|
<p>A description of some of the currently available video decoders
|
|
follows.
|
|
</p>
|
|
<a name="rawvideo"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-rawvideo">7.1 rawvideo</a></h2>
|
|
|
|
<p>Raw video decoder.
|
|
</p>
|
|
<p>This decoder decodes rawvideo streams.
|
|
</p>
|
|
<a name="Options"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Options">7.1.1 Options</a></h3>
|
|
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
|
|
<dd><p>Specify the assumed field type of the input video.
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>-1</samp>’</dt>
|
|
<dd><p>the video is assumed to be progressive (default)
|
|
</p></dd>
|
|
<dt> ‘<samp>0</samp>’</dt>
|
|
<dd><p>bottom-field-first is assumed
|
|
</p></dd>
|
|
<dt> ‘<samp>1</samp>’</dt>
|
|
<dd><p>top-field-first is assumed
|
|
</p></dd>
|
|
</dl>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<a name="Audio-Decoders"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Audio-Decoders">8. Audio Decoders</a></h1>
|
|
|
|
<a name="ffwavesynth"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-ffwavesynth">8.1 ffwavesynth</a></h2>
|
|
|
|
<p>Internal wave synthetizer.
|
|
</p>
|
|
<p>This decoder generates wave patterns according to predefined sequences. Its
|
|
use is purely internal and the format of the data it accepts is not publicly
|
|
documented.
|
|
</p>
|
|
<a name="Demuxers"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Demuxers">9. Demuxers</a></h1>
|
|
|
|
<p>Demuxers are configured elements in FFmpeg which allow to read the
|
|
multimedia streams from a particular type of file.
|
|
</p>
|
|
<p>When you configure your FFmpeg build, all the supported demuxers
|
|
are enabled by default. You can list all available ones using the
|
|
configure option "–list-demuxers".
|
|
</p>
|
|
<p>You can disable all the demuxers using the configure option
|
|
"–disable-demuxers", and selectively enable a single demuxer with
|
|
the option "–enable-demuxer=<var>DEMUXER</var>", or disable it
|
|
with the option "–disable-demuxer=<var>DEMUXER</var>".
|
|
</p>
|
|
<p>The option "-formats" of the ff* tools will display the list of
|
|
enabled demuxers.
|
|
</p>
|
|
<p>The description of some of the currently available demuxers follows.
|
|
</p>
|
|
<a name="image2"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-image2">9.1 image2</a></h2>
|
|
|
|
<p>Image file demuxer.
|
|
</p>
|
|
<p>This demuxer reads from a list of image files specified by a pattern.
|
|
</p>
|
|
<p>The pattern may contain the string "%d" or "%0<var>N</var>d", which
|
|
specifies the position of the characters representing a sequential
|
|
number in each filename matched by the pattern. If the form
|
|
"%d0<var>N</var>d" is used, the string representing the number in each
|
|
filename is 0-padded and <var>N</var> is the total number of 0-padded
|
|
digits representing the number. The literal character ’%’ can be
|
|
specified in the pattern with the string "%%".
|
|
</p>
|
|
<p>If the pattern contains "%d" or "%0<var>N</var>d", the first filename of
|
|
the file list specified by the pattern must contain a number
|
|
inclusively contained between 0 and 4, all the following numbers must
|
|
be sequential. This limitation may be hopefully fixed.
|
|
</p>
|
|
<p>The pattern may contain a suffix which is used to automatically
|
|
determine the format of the images contained in the files.
|
|
</p>
|
|
<p>For example the pattern "img-%03d.bmp" will match a sequence of
|
|
filenames of the form ‘<tt>img-001.bmp</tt>’, ‘<tt>img-002.bmp</tt>’, ...,
|
|
‘<tt>img-010.bmp</tt>’, etc.; the pattern "i%%m%%g-%d.jpg" will match a
|
|
sequence of filenames of the form ‘<tt>i%m%g-1.jpg</tt>’,
|
|
‘<tt>i%m%g-2.jpg</tt>’, ..., ‘<tt>i%m%g-10.jpg</tt>’, etc.
|
|
</p>
|
|
<p>The size, the pixel format, and the format of each image must be the
|
|
same for all the files in the sequence.
|
|
</p>
|
|
<p>The following example shows how to use <code>ffmpeg</code> for creating a
|
|
video from the images in the file sequence ‘<tt>img-001.jpeg</tt>’,
|
|
‘<tt>img-002.jpeg</tt>’, ..., assuming an input frame rate of 10 frames per
|
|
second:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv
|
|
</pre></td></tr></table>
|
|
|
|
<p>Note that the pattern must not necessarily contain "%d" or
|
|
"%0<var>N</var>d", for example to convert a single image file
|
|
‘<tt>img.jpeg</tt>’ you can employ the command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i img.jpeg img.png
|
|
</pre></td></tr></table>
|
|
|
|
<a name="applehttp-1"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-applehttp-1">9.2 applehttp</a></h2>
|
|
|
|
<p>Apple HTTP Live Streaming demuxer.
|
|
</p>
|
|
<p>This demuxer presents all AVStreams from all variant streams.
|
|
The id field is set to the bitrate variant index number. By setting
|
|
the discard flags on AVStreams (by pressing ’a’ or ’v’ in ffplay),
|
|
the caller can decide which variant streams to actually receive.
|
|
The total bitrate of the variant that the stream belongs to is
|
|
available in a metadata key named "variant_bitrate".
|
|
</p>
|
|
<a name="sbg"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-sbg">9.3 sbg</a></h2>
|
|
|
|
<p>SBaGen script demuxer.
|
|
</p>
|
|
<p>This demuxer reads the script language used by SBaGen
|
|
<a href="http://uazu.net/sbagen/">http://uazu.net/sbagen/</a> to generate binaural beats sessions. A SBG
|
|
script looks like that:
|
|
</p><table><tr><td> </td><td><pre class="example">-SE
|
|
a: 300-2.5/3 440+4.5/0
|
|
b: 300-2.5/0 440+4.5/3
|
|
off: -
|
|
NOW == a
|
|
+0:07:00 == b
|
|
+0:14:00 == a
|
|
+0:21:00 == b
|
|
+0:30:00 off
|
|
</pre></td></tr></table>
|
|
|
|
<p>A SBG script can mix absolute and relative timestamps. If the script uses
|
|
either only absolute timestamps (including the script start time) or only
|
|
relative ones, then its layout is fixed, and the conversion is
|
|
straightforward. On the other hand, if the script mixes both kind of
|
|
timestamps, then the <var>NOW</var> reference for relative timestamps will be
|
|
taken from the current time of day at the time the script is read, and the
|
|
script layout will be frozen according to that reference. That means that if
|
|
the script is directly played, the actual times will match the absolute
|
|
timestamps up to the sound controller’s clock accuracy, but if the user
|
|
somehow pauses the playback or seeks, all times will be shifted accordingly.
|
|
</p>
|
|
<a name="Protocols"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Protocols">10. Protocols</a></h1>
|
|
|
|
<p>Protocols are configured elements in FFmpeg which allow to access
|
|
resources which require the use of a particular protocol.
|
|
</p>
|
|
<p>When you configure your FFmpeg build, all the supported protocols are
|
|
enabled by default. You can list all available ones using the
|
|
configure option "–list-protocols".
|
|
</p>
|
|
<p>You can disable all the protocols using the configure option
|
|
"–disable-protocols", and selectively enable a protocol using the
|
|
option "–enable-protocol=<var>PROTOCOL</var>", or you can disable a
|
|
particular protocol using the option
|
|
"–disable-protocol=<var>PROTOCOL</var>".
|
|
</p>
|
|
<p>The option "-protocols" of the ff* tools will display the list of
|
|
supported protocols.
|
|
</p>
|
|
<p>A description of the currently available protocols follows.
|
|
</p>
|
|
<a name="applehttp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-applehttp">10.1 applehttp</a></h2>
|
|
|
|
<p>Read Apple HTTP Live Streaming compliant segmented stream as
|
|
a uniform one. The M3U8 playlists describing the segments can be
|
|
remote HTTP resources or local files, accessed using the standard
|
|
file protocol.
|
|
HTTP is default, specific protocol can be declared by specifying
|
|
"+<var>proto</var>" after the applehttp URI scheme name, where <var>proto</var>
|
|
is either "file" or "http".
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
|
|
applehttp+http://host/path/to/remote/resource.m3u8
|
|
applehttp+file://path/to/local/resource.m3u8
|
|
</pre></td></tr></table>
|
|
|
|
<a name="concat"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-concat">10.2 concat</a></h2>
|
|
|
|
<p>Physical concatenation protocol.
|
|
</p>
|
|
<p>Allow to read and seek from many resource in sequence as if they were
|
|
a unique resource.
|
|
</p>
|
|
<p>A URL accepted by this protocol has the syntax:
|
|
</p><table><tr><td> </td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
|
|
resource to be concatenated, each one possibly specifying a distinct
|
|
protocol.
|
|
</p>
|
|
<p>For example to read a sequence of files ‘<tt>split1.mpeg</tt>’,
|
|
‘<tt>split2.mpeg</tt>’, ‘<tt>split3.mpeg</tt>’ with <code>ffplay</code> use the
|
|
command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
|
</pre></td></tr></table>
|
|
|
|
<p>Note that you may need to escape the character "|" which is special for
|
|
many shells.
|
|
</p>
|
|
<a name="file"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-file">10.3 file</a></h2>
|
|
|
|
<p>File access protocol.
|
|
</p>
|
|
<p>Allow to read from or read to a file.
|
|
</p>
|
|
<p>For example to read from a file ‘<tt>input.mpeg</tt>’ with <code>ffmpeg</code>
|
|
use the command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
|
|
</pre></td></tr></table>
|
|
|
|
<p>The ff* tools default to the file protocol, that is a resource
|
|
specified with the name "FILE.mpeg" is interpreted as the URL
|
|
"file:FILE.mpeg".
|
|
</p>
|
|
<a name="gopher"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-gopher">10.4 gopher</a></h2>
|
|
|
|
<p>Gopher protocol.
|
|
</p>
|
|
<a name="http"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-http">10.5 http</a></h2>
|
|
|
|
<p>HTTP (Hyper Text Transfer Protocol).
|
|
</p>
|
|
<a name="mmst"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-mmst">10.6 mmst</a></h2>
|
|
|
|
<p>MMS (Microsoft Media Server) protocol over TCP.
|
|
</p>
|
|
<a name="mmsh"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-mmsh">10.7 mmsh</a></h2>
|
|
|
|
<p>MMS (Microsoft Media Server) protocol over HTTP.
|
|
</p>
|
|
<p>The required syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<a name="md5"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-md5">10.8 md5</a></h2>
|
|
|
|
<p>MD5 output protocol.
|
|
</p>
|
|
<p>Computes the MD5 hash of the data to be written, and on close writes
|
|
this to the designated output or stdout if none is specified. It can
|
|
be used to test muxers without writing an actual file.
|
|
</p>
|
|
<p>Some examples follow.
|
|
</p><table><tr><td> </td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
|
|
ffmpeg -i input.flv -f avi -y md5:output.avi.md5
|
|
|
|
# Write the MD5 hash of the encoded AVI file to stdout.
|
|
ffmpeg -i input.flv -f avi -y md5:
|
|
</pre></td></tr></table>
|
|
|
|
<p>Note that some formats (typically MOV) require the output protocol to
|
|
be seekable, so they will fail with the MD5 output protocol.
|
|
</p>
|
|
<a name="pipe"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-pipe">10.9 pipe</a></h2>
|
|
|
|
<p>UNIX pipe access protocol.
|
|
</p>
|
|
<p>Allow to read and write from UNIX pipes.
|
|
</p>
|
|
<p>The accepted syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">pipe:[<var>number</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p><var>number</var> is the number corresponding to the file descriptor of the
|
|
pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var>number</var>
|
|
is not specified, by default the stdout file descriptor will be used
|
|
for writing, stdin for reading.
|
|
</p>
|
|
<p>For example to read from stdin with <code>ffmpeg</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
|
|
# ...this is the same as...
|
|
cat test.wav | ffmpeg -i pipe:
|
|
</pre></td></tr></table>
|
|
|
|
<p>For writing to stdout with <code>ffmpeg</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
|
# ...this is the same as...
|
|
ffmpeg -i test.wav -f avi pipe: | cat > test.avi
|
|
</pre></td></tr></table>
|
|
|
|
<p>Note that some formats (typically MOV), require the output protocol to
|
|
be seekable, so they will fail with the pipe output protocol.
|
|
</p>
|
|
<a name="rtmp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-rtmp">10.10 rtmp</a></h2>
|
|
|
|
<p>Real-Time Messaging Protocol.
|
|
</p>
|
|
<p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
|
|
content across a TCP/IP network.
|
|
</p>
|
|
<p>The required syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p>The accepted parameters are:
|
|
</p><dl compact="compact">
|
|
<dt> ‘<samp>server</samp>’</dt>
|
|
<dd><p>The address of the RTMP server.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>port</samp>’</dt>
|
|
<dd><p>The number of the TCP port to use (by default is 1935).
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>app</samp>’</dt>
|
|
<dd><p>It is the name of the application to access. It usually corresponds to
|
|
the path where the application is installed on the RTMP server
|
|
(e.g. ‘<tt>/ondemand/</tt>’, ‘<tt>/flash/live/</tt>’, etc.).
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>playpath</samp>’</dt>
|
|
<dd><p>It is the path or name of the resource to play with reference to the
|
|
application specified in <var>app</var>, may be prefixed by "mp4:".
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>For example to read with <code>ffplay</code> a multimedia resource named
|
|
"sample" from the application "vod" from an RTMP server "myserver":
|
|
</p><table><tr><td> </td><td><pre class="example">ffplay rtmp://myserver/vod/sample
|
|
</pre></td></tr></table>
|
|
|
|
<a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">10.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
|
|
|
|
<p>Real-Time Messaging Protocol and its variants supported through
|
|
librtmp.
|
|
</p>
|
|
<p>Requires the presence of the librtmp headers and library during
|
|
configuration. You need to explicitly configure the build with
|
|
"–enable-librtmp". If enabled this will replace the native RTMP
|
|
protocol.
|
|
</p>
|
|
<p>This protocol provides most client functions and a few server
|
|
functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
|
|
encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
|
|
variants of these encrypted types (RTMPTE, RTMPTS).
|
|
</p>
|
|
<p>The required syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>where <var>rtmp_proto</var> is one of the strings "rtmp", "rtmpt", "rtmpe",
|
|
"rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
|
|
<var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
|
|
meaning as specified for the RTMP native protocol.
|
|
<var>options</var> contains a list of space-separated options of the form
|
|
<var>key</var>=<var>val</var>.
|
|
</p>
|
|
<p>See the librtmp manual page (man 3 librtmp) for more information.
|
|
</p>
|
|
<p>For example, to stream a file in real-time to an RTMP server using
|
|
<code>ffmpeg</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
|
|
</pre></td></tr></table>
|
|
|
|
<p>To play the same stream using <code>ffplay</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">ffplay "rtmp://myserver/live/mystream live=1"
|
|
</pre></td></tr></table>
|
|
|
|
<a name="rtp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-rtp">10.12 rtp</a></h2>
|
|
|
|
<p>Real-Time Protocol.
|
|
</p>
|
|
<a name="rtsp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-rtsp">10.13 rtsp</a></h2>
|
|
|
|
<p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
|
|
and muxer. The demuxer supports both normal RTSP (with data transferred
|
|
over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
|
|
data transferred over RDT).
|
|
</p>
|
|
<p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
|
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock’s
|
|
<a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
|
|
</p>
|
|
<p>The required syntax for a RTSP url is:
|
|
</p><table><tr><td> </td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>The following options (set on the <code>ffmpeg</code>/<code>ffplay</code> command
|
|
line, or set in code via <code>AVOption</code>s or in <code>avformat_open_input</code>),
|
|
are supported:
|
|
</p>
|
|
<p>Flags for <code>rtsp_transport</code>:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>udp</samp>’</dt>
|
|
<dd><p>Use UDP as lower transport protocol.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>tcp</samp>’</dt>
|
|
<dd><p>Use TCP (interleaving within the RTSP control channel) as lower
|
|
transport protocol.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>udp_multicast</samp>’</dt>
|
|
<dd><p>Use UDP multicast as lower transport protocol.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>http</samp>’</dt>
|
|
<dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
|
|
passing proxies.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>Multiple lower transport protocols may be specified, in that case they are
|
|
tried one at a time (if the setup of one fails, the next one is tried).
|
|
For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
|
|
</p>
|
|
<p>Flags for <code>rtsp_flags</code>:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>filter_src</samp>’</dt>
|
|
<dd><p>Accept packets only from negotiated peer address and port.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>When receiving data over UDP, the demuxer tries to reorder received packets
|
|
(since they may arrive out of order, or packets may get lost totally). In
|
|
order for this to be enabled, a maximum delay must be specified in the
|
|
<code>max_delay</code> field of AVFormatContext.
|
|
</p>
|
|
<p>When watching multi-bitrate Real-RTSP streams with <code>ffplay</code>, the
|
|
streams to display can be chosen with <code>-vst</code> <var>n</var> and
|
|
<code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
|
|
on the fly by pressing <code>v</code> and <code>a</code>.
|
|
</p>
|
|
<p>Example command lines:
|
|
</p>
|
|
<p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
|
|
</pre></td></tr></table>
|
|
|
|
<p>To watch a stream tunneled over HTTP:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffplay -rtsp_transport http rtsp://server/video.mp4
|
|
</pre></td></tr></table>
|
|
|
|
<p>To send a stream in realtime to a RTSP server, for others to watch:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
|
|
</pre></td></tr></table>
|
|
|
|
<a name="sap"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-sap">10.14 sap</a></h2>
|
|
|
|
<p>Session Announcement Protocol (RFC 2974). This is not technically a
|
|
protocol handler in libavformat, it is a muxer and demuxer.
|
|
It is used for signalling of RTP streams, by announcing the SDP for the
|
|
streams regularly on a separate port.
|
|
</p>
|
|
<a name="Muxer"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Muxer">10.14.1 Muxer</a></h3>
|
|
|
|
<p>The syntax for a SAP url given to the muxer is:
|
|
</p><table><tr><td> </td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
|
|
or to port 5004 if no port is specified.
|
|
<var>options</var> is a <code>&</code>-separated list. The following options
|
|
are supported:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>announce_addr=<var>address</var></samp>’</dt>
|
|
<dd><p>Specify the destination IP address for sending the announcements to.
|
|
If omitted, the announcements are sent to the commonly used SAP
|
|
announcement multicast address 224.2.127.254 (sap.mcast.net), or
|
|
ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>announce_port=<var>port</var></samp>’</dt>
|
|
<dd><p>Specify the port to send the announcements on, defaults to
|
|
9875 if not specified.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>ttl=<var>ttl</var></samp>’</dt>
|
|
<dd><p>Specify the time to live value for the announcements and RTP packets,
|
|
defaults to 255.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>same_port=<var>0|1</var></samp>’</dt>
|
|
<dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
|
|
default), all streams are sent on unique ports, with each stream on a
|
|
port 2 numbers higher than the previous.
|
|
VLC/Live555 requires this to be set to 1, to be able to receive the stream.
|
|
The RTP stack in libavformat for receiving requires all streams to be sent
|
|
on unique ports.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>Example command lines follow.
|
|
</p>
|
|
<p>To broadcast a stream on the local subnet, for watching in VLC:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
|
|
</pre></td></tr></table>
|
|
|
|
<p>Similarly, for watching in <code>ffplay</code>:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
|
|
</pre></td></tr></table>
|
|
|
|
<p>And for watching in <code>ffplay</code>, over IPv6:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
|
|
</pre></td></tr></table>
|
|
|
|
<a name="Demuxer"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Demuxer">10.14.2 Demuxer</a></h3>
|
|
|
|
<p>The syntax for a SAP url given to the demuxer is:
|
|
</p><table><tr><td> </td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p><var>address</var> is the multicast address to listen for announcements on,
|
|
if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
|
|
is the port that is listened on, 9875 if omitted.
|
|
</p>
|
|
<p>The demuxers listens for announcements on the given address and port.
|
|
Once an announcement is received, it tries to receive that particular stream.
|
|
</p>
|
|
<p>Example command lines follow.
|
|
</p>
|
|
<p>To play back the first stream announced on the normal SAP multicast address:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffplay sap://
|
|
</pre></td></tr></table>
|
|
|
|
<p>To play back the first stream announced on one the default IPv6 SAP multicast address:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
|
|
</pre></td></tr></table>
|
|
|
|
<a name="tcp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-tcp">10.15 tcp</a></h2>
|
|
|
|
<p>Trasmission Control Protocol.
|
|
</p>
|
|
<p>The required syntax for a TCP url is:
|
|
</p><table><tr><td> </td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>listen</samp>’</dt>
|
|
<dd><p>Listen for an incoming connection
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
|
|
ffplay tcp://<var>hostname</var>:<var>port</var>
|
|
</pre></td></tr></table>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="udp"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-udp">10.16 udp</a></h2>
|
|
|
|
<p>User Datagram Protocol.
|
|
</p>
|
|
<p>The required syntax for a UDP url is:
|
|
</p><table><tr><td> </td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p><var>options</var> contains a list of &-seperated options of the form <var>key</var>=<var>val</var>.
|
|
Follow the list of supported options.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>buffer_size=<var>size</var></samp>’</dt>
|
|
<dd><p>set the UDP buffer size in bytes
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>localport=<var>port</var></samp>’</dt>
|
|
<dd><p>override the local UDP port to bind with
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>localaddr=<var>addr</var></samp>’</dt>
|
|
<dd><p>Choose the local IP address. This is useful e.g. if sending multicast
|
|
and the host has multiple interfaces, where the user can choose
|
|
which interface to send on by specifying the IP address of that interface.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>pkt_size=<var>size</var></samp>’</dt>
|
|
<dd><p>set the size in bytes of UDP packets
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>reuse=<var>1|0</var></samp>’</dt>
|
|
<dd><p>explicitly allow or disallow reusing UDP sockets
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>ttl=<var>ttl</var></samp>’</dt>
|
|
<dd><p>set the time to live value (for multicast only)
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>connect=<var>1|0</var></samp>’</dt>
|
|
<dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
|
|
destination address can’t be changed with ff_udp_set_remote_url later.
|
|
If the destination address isn’t known at the start, this option can
|
|
be specified in ff_udp_set_remote_url, too.
|
|
This allows finding out the source address for the packets with getsockname,
|
|
and makes writes return with AVERROR(ECONNREFUSED) if "destination
|
|
unreachable" is received.
|
|
For receiving, this gives the benefit of only receiving packets from
|
|
the specified peer address/port.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>Some usage examples of the udp protocol with <code>ffmpeg</code> follow.
|
|
</p>
|
|
<p>To stream over UDP to a remote endpoint:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&buffer_size=65535
|
|
</pre></td></tr></table>
|
|
|
|
<p>To receive over UDP from a remote endpoint:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
|
|
</pre></td></tr></table>
|
|
|
|
<a name="Input-Devices"></a>
|
|
<h1 class="chapter"><a href="ffprobe.html#toc-Input-Devices">11. Input Devices</a></h1>
|
|
|
|
<p>Input devices are configured elements in FFmpeg which allow to access
|
|
the data coming from a multimedia device attached to your system.
|
|
</p>
|
|
<p>When you configure your FFmpeg build, all the supported input devices
|
|
are enabled by default. You can list all available ones using the
|
|
configure option "–list-indevs".
|
|
</p>
|
|
<p>You can disable all the input devices using the configure option
|
|
"–disable-indevs", and selectively enable an input device using the
|
|
option "–enable-indev=<var>INDEV</var>", or you can disable a particular
|
|
input device using the option "–disable-indev=<var>INDEV</var>".
|
|
</p>
|
|
<p>The option "-formats" of the ff* tools will display the list of
|
|
supported input devices (amongst the demuxers).
|
|
</p>
|
|
<p>A description of the currently available input devices follows.
|
|
</p>
|
|
<a name="alsa"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-alsa">11.1 alsa</a></h2>
|
|
|
|
<p>ALSA (Advanced Linux Sound Architecture) input device.
|
|
</p>
|
|
<p>To enable this input device during configuration you need libasound
|
|
installed on your system.
|
|
</p>
|
|
<p>This device allows capturing from an ALSA device. The name of the
|
|
device to capture has to be an ALSA card identifier.
|
|
</p>
|
|
<p>An ALSA identifier has the syntax:
|
|
</p><table><tr><td> </td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
|
|
</pre></td></tr></table>
|
|
|
|
<p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
|
|
</p>
|
|
<p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
|
|
specify card number or identifier, device number and subdevice number
|
|
(-1 means any).
|
|
</p>
|
|
<p>To see the list of cards currently recognized by your system check the
|
|
files ‘<tt>/proc/asound/cards</tt>’ and ‘<tt>/proc/asound/devices</tt>’.
|
|
</p>
|
|
<p>For example to capture with <code>ffmpeg</code> from an ALSA device with
|
|
card id 0, you may run the command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
|
|
</pre></td></tr></table>
|
|
|
|
<p>For more information see:
|
|
<a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
|
|
</p>
|
|
<a name="bktr"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-bktr">11.2 bktr</a></h2>
|
|
|
|
<p>BSD video input device.
|
|
</p>
|
|
<a name="dshow"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-dshow">11.3 dshow</a></h2>
|
|
|
|
<p>Windows DirectShow input device.
|
|
</p>
|
|
<p>DirectShow support is enabled when FFmpeg is built with mingw-w64.
|
|
Currently only audio and video devices are supported.
|
|
</p>
|
|
<p>Multiple devices may be opened as separate inputs, but they may also be
|
|
opened on the same input, which should improve synchronism between them.
|
|
</p>
|
|
<p>The input name should be in the format:
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example"><var>TYPE</var>=<var>NAME</var>[:<var>TYPE</var>=<var>NAME</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p>where <var>TYPE</var> can be either <var>audio</var> or <var>video</var>,
|
|
and <var>NAME</var> is the device’s name.
|
|
</p>
|
|
<a name="Options-1"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Options-1">11.3.1 Options</a></h3>
|
|
|
|
<p>If no options are specified, the device’s defaults are used.
|
|
If the device does not support the requested options, it will
|
|
fail to open.
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>video_size</samp>’</dt>
|
|
<dd><p>Set the video size in the captured video.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>framerate</samp>’</dt>
|
|
<dd><p>Set the framerate in the captured video.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>sample_rate</samp>’</dt>
|
|
<dd><p>Set the sample rate (in Hz) of the captured audio.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>sample_size</samp>’</dt>
|
|
<dd><p>Set the sample size (in bits) of the captured audio.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>channels</samp>’</dt>
|
|
<dd><p>Set the number of channels in the captured audio.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>list_devices</samp>’</dt>
|
|
<dd><p>If set to ‘<samp>true</samp>’, print a list of devices and exit.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>list_options</samp>’</dt>
|
|
<dd><p>If set to ‘<samp>true</samp>’, print a list of selected device’s options
|
|
and exit.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>video_device_number</samp>’</dt>
|
|
<dd><p>Set video device number for devices with same name (starts at 0,
|
|
defaults to 0).
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>audio_device_number</samp>’</dt>
|
|
<dd><p>Set audio device number for devices with same name (starts at 0,
|
|
defaults to 0).
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="Examples-2"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Examples-2">11.3.2 Examples</a></h3>
|
|
|
|
<ul>
|
|
<li>
|
|
Print the list of DirectShow supported devices and exit:
|
|
<table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f dshow -i dummy
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Open video device <var>Camera</var>:
|
|
<table><tr><td> </td><td><pre class="example">$ ffmpeg -f dshow -i video="Camera"
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Open second video device with name <var>Camera</var>:
|
|
<table><tr><td> </td><td><pre class="example">$ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Open video device <var>Camera</var> and audio device <var>Microphone</var>:
|
|
<table><tr><td> </td><td><pre class="example">$ ffmpeg -f dshow -i video="Camera":audio="Microphone"
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Print the list of supported options in selected device and exit:
|
|
<table><tr><td> </td><td><pre class="example">$ ffmpeg -list_options true -f dshow -i video="Camera"
|
|
</pre></td></tr></table>
|
|
|
|
</li></ul>
|
|
|
|
<a name="dv1394"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-dv1394">11.4 dv1394</a></h2>
|
|
|
|
<p>Linux DV 1394 input device.
|
|
</p>
|
|
<a name="fbdev"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-fbdev">11.5 fbdev</a></h2>
|
|
|
|
<p>Linux framebuffer input device.
|
|
</p>
|
|
<p>The Linux framebuffer is a graphic hardware-independent abstraction
|
|
layer to show graphics on a computer monitor, typically on the
|
|
console. It is accessed through a file device node, usually
|
|
‘<tt>/dev/fb0</tt>’.
|
|
</p>
|
|
<p>For more detailed information read the file
|
|
Documentation/fb/framebuffer.txt included in the Linux source tree.
|
|
</p>
|
|
<p>To record from the framebuffer device ‘<tt>/dev/fb0</tt>’ with
|
|
<code>ffmpeg</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
|
|
</pre></td></tr></table>
|
|
|
|
<p>You can take a single screenshot image with the command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
|
</pre></td></tr></table>
|
|
|
|
<p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
|
|
</p>
|
|
<a name="jack"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-jack">11.6 jack</a></h2>
|
|
|
|
<p>JACK input device.
|
|
</p>
|
|
<p>To enable this input device during configuration you need libjack
|
|
installed on your system.
|
|
</p>
|
|
<p>A JACK input device creates one or more JACK writable clients, one for
|
|
each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
|
|
<var>client_name</var> is the name provided by the application, and <var>N</var>
|
|
is a number which identifies the channel.
|
|
Each writable client will send the acquired data to the FFmpeg input
|
|
device.
|
|
</p>
|
|
<p>Once you have created one or more JACK readable clients, you need to
|
|
connect them to one or more JACK writable clients.
|
|
</p>
|
|
<p>To connect or disconnect JACK clients you can use the <code>jack_connect</code>
|
|
and <code>jack_disconnect</code> programs, or do it through a graphical interface,
|
|
for example with <code>qjackctl</code>.
|
|
</p>
|
|
<p>To list the JACK clients and their properties you can invoke the command
|
|
<code>jack_lsp</code>.
|
|
</p>
|
|
<p>Follows an example which shows how to capture a JACK readable client
|
|
with <code>ffmpeg</code>.
|
|
</p><table><tr><td> </td><td><pre class="example"># Create a JACK writable client with name "ffmpeg".
|
|
$ 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 writable client.
|
|
$ jack_connect metro:120_bpm ffmpeg:input_1
|
|
</pre></td></tr></table>
|
|
|
|
<p>For more information read:
|
|
<a href="http://jackaudio.org/">http://jackaudio.org/</a>
|
|
</p>
|
|
<a name="lavfi"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-lavfi">11.7 lavfi</a></h2>
|
|
|
|
<p>Libavfilter input virtual device.
|
|
</p>
|
|
<p>This input device reads data from the open output pads of a libavfilter
|
|
filtergraph.
|
|
</p>
|
|
<p>For each filtergraph open output, the input device will create a
|
|
corresponding stream which is mapped to the generated output. Currently
|
|
only video data is supported. The filtergraph is specified through the
|
|
option ‘<samp>graph</samp>’.
|
|
</p>
|
|
<a name="Options-3"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Options-3">11.7.1 Options</a></h3>
|
|
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>graph</samp>’</dt>
|
|
<dd><p>Specify the filtergraph to use as input. Each video open output must be
|
|
labelled by a unique string of the form "out<var>N</var>", where <var>N</var> is a
|
|
number starting from 0 corresponding to the mapped input stream
|
|
generated by the device.
|
|
The first unlabelled output is automatically assigned to the "out0"
|
|
label, but all the others need to be specified explicitly.
|
|
</p>
|
|
<p>If not specified defaults to the filename specified for the input
|
|
device.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<a name="Examples"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Examples">11.7.2 Examples</a></h3>
|
|
|
|
<ul>
|
|
<li>
|
|
Create a color video stream and play it back with <code>ffplay</code>:
|
|
<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "color=pink [out0]" dummy
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
As the previous example, but use filename for specifying the graph
|
|
description, and omit the "out0" label:
|
|
<table><tr><td> </td><td><pre class="example">ffplay -f lavfi color=pink
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Create three different video test filtered sources and play them:
|
|
<table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Read an audio stream from a file using the amovie source and play it
|
|
back with <code>ffplay</code>:
|
|
<table><tr><td> </td><td><pre class="example">ffplay -f lavfi "amovie=test.wav"
|
|
</pre></td></tr></table>
|
|
|
|
</li><li>
|
|
Read an audio stream and a video stream and play it back with
|
|
<code>ffplay</code>:
|
|
<table><tr><td> </td><td><pre class="example">ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
|
|
</pre></td></tr></table>
|
|
|
|
</li></ul>
|
|
|
|
<a name="libdc1394"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-libdc1394">11.8 libdc1394</a></h2>
|
|
|
|
<p>IIDC1394 input device, based on libdc1394 and libraw1394.
|
|
</p>
|
|
<a name="openal"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-openal">11.9 openal</a></h2>
|
|
|
|
<p>The OpenAL input device provides audio capture on all systems with a
|
|
working OpenAL 1.1 implementation.
|
|
</p>
|
|
<p>To enable this input device during configuration, you need OpenAL
|
|
headers and libraries installed on your system, and need to configure
|
|
FFmpeg with <code>--enable-openal</code>.
|
|
</p>
|
|
<p>OpenAL headers and libraries should be provided as part of your OpenAL
|
|
implementation, or as an additional download (an SDK). Depending on your
|
|
installation you may need to specify additional flags via the
|
|
<code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
|
|
system to locate the OpenAL headers and libraries.
|
|
</p>
|
|
<p>An incomplete list of OpenAL implementations follows:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt> <strong>Creative</strong></dt>
|
|
<dd><p>The official Windows implementation, providing hardware acceleration
|
|
with supported devices and software fallback.
|
|
See <a href="http://openal.org/">http://openal.org/</a>.
|
|
</p></dd>
|
|
<dt> <strong>OpenAL Soft</strong></dt>
|
|
<dd><p>Portable, open source (LGPL) software implementation. Includes
|
|
backends for the most common sound APIs on the Windows, Linux,
|
|
Solaris, and BSD operating systems.
|
|
See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
|
|
</p></dd>
|
|
<dt> <strong>Apple</strong></dt>
|
|
<dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
|
|
See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<p>This device allows to capture from an audio input device handled
|
|
through OpenAL.
|
|
</p>
|
|
<p>You need to specify the name of the device to capture in the provided
|
|
filename. If the empty string is provided, the device will
|
|
automatically select the default device. You can get the list of the
|
|
supported devices by using the option <var>list_devices</var>.
|
|
</p>
|
|
<a name="Options-2"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Options-2">11.9.1 Options</a></h3>
|
|
|
|
<dl compact="compact">
|
|
<dt> ‘<samp>channels</samp>’</dt>
|
|
<dd><p>Set the number of channels in the captured audio. Only the values
|
|
‘<samp>1</samp>’ (monaural) and ‘<samp>2</samp>’ (stereo) are currently supported.
|
|
Defaults to ‘<samp>2</samp>’.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>sample_size</samp>’</dt>
|
|
<dd><p>Set the sample size (in bits) of the captured audio. Only the values
|
|
‘<samp>8</samp>’ and ‘<samp>16</samp>’ are currently supported. Defaults to
|
|
‘<samp>16</samp>’.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>sample_rate</samp>’</dt>
|
|
<dd><p>Set the sample rate (in Hz) of the captured audio.
|
|
Defaults to ‘<samp>44.1k</samp>’.
|
|
</p>
|
|
</dd>
|
|
<dt> ‘<samp>list_devices</samp>’</dt>
|
|
<dd><p>If set to ‘<samp>true</samp>’, print a list of devices and exit.
|
|
Defaults to ‘<samp>false</samp>’.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<a name="Examples-1"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-Examples-1">11.9.2 Examples</a></h3>
|
|
|
|
<p>Print the list of OpenAL supported devices and exit:
|
|
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
|
|
</pre></td></tr></table>
|
|
|
|
<p>Capture from the OpenAL device ‘<tt>DR-BT101 via PulseAudio</tt>’:
|
|
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
|
|
</pre></td></tr></table>
|
|
|
|
<p>Capture from the default device (note the empty string ” as filename):
|
|
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
|
|
</pre></td></tr></table>
|
|
|
|
<p>Capture from two devices simultaneously, writing to two different files,
|
|
within the same <code>ffmpeg</code> command:
|
|
</p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
|
|
</pre></td></tr></table>
|
|
<p>Note: not all OpenAL implementations support multiple simultaneous capture -
|
|
try the latest OpenAL Soft if the above does not work.
|
|
</p>
|
|
<a name="oss"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-oss">11.10 oss</a></h2>
|
|
|
|
<p>Open Sound System input device.
|
|
</p>
|
|
<p>The filename to provide to the input device is the device node
|
|
representing the OSS input device, and is usually set to
|
|
‘<tt>/dev/dsp</tt>’.
|
|
</p>
|
|
<p>For example to grab from ‘<tt>/dev/dsp</tt>’ using <code>ffmpeg</code> use the
|
|
command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
|
</pre></td></tr></table>
|
|
|
|
<p>For more information about OSS see:
|
|
<a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
|
|
</p>
|
|
<a name="pulse"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-pulse">11.11 pulse</a></h2>
|
|
|
|
<p>pulseaudio input device.
|
|
</p>
|
|
<p>To enable this input device during configuration you need libpulse-simple
|
|
installed in your system.
|
|
</p>
|
|
<p>The filename to provide to the input device is a source device or the
|
|
string "default"
|
|
</p>
|
|
<p>To list the pulse source devices and their properties you can invoke
|
|
the command <code>pactl list sources</code>.
|
|
</p>
|
|
<table><tr><td> </td><td><pre class="example">ffmpeg -f pulse -i default /tmp/pulse.wav
|
|
</pre></td></tr></table>
|
|
|
|
<a name="server-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-server-AVOption">11.11.1 <var>server</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-server <var>server name</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Connects to a specific server.
|
|
</p>
|
|
<a name="name-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-name-AVOption">11.11.2 <var>name</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-name <var>application name</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the application name pulse will use when showing active clients,
|
|
by default it is the LIBAVFORMAT_IDENT string
|
|
</p>
|
|
<a name="stream_005fname-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-stream_005fname-AVOption">11.11.3 <var>stream_name</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-stream_name <var>stream name</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the stream name pulse will use when showing active streams,
|
|
by default it is "record"
|
|
</p>
|
|
<a name="sample_005frate-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-sample_005frate-AVOption">11.11.4 <var>sample_rate</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-sample_rate <var>samplerate</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the samplerate in Hz, by default 48kHz is used.
|
|
</p>
|
|
<a name="channels-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-channels-AVOption">11.11.5 <var>channels</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-channels <var>N</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the channels in use, by default 2 (stereo) is set.
|
|
</p>
|
|
<a name="frame_005fsize-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-frame_005fsize-AVOption">11.11.6 <var>frame_size</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-frame_size <var>bytes</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the number of byte per frame, by default it is set to 1024.
|
|
</p>
|
|
<a name="fragment_005fsize-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-fragment_005fsize-AVOption">11.11.7 <var>fragment_size</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-fragment_size <var>bytes</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>Specify the minimal buffering fragment in pulseaudio, it will affect the
|
|
audio latency. By default it is unset.
|
|
</p>
|
|
<a name="sndio"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-sndio">11.12 sndio</a></h2>
|
|
|
|
<p>sndio input device.
|
|
</p>
|
|
<p>To enable this input device during configuration you need libsndio
|
|
installed on your system.
|
|
</p>
|
|
<p>The filename to provide to the input device is the device node
|
|
representing the sndio input device, and is usually set to
|
|
‘<tt>/dev/audio0</tt>’.
|
|
</p>
|
|
<p>For example to grab from ‘<tt>/dev/audio0</tt>’ using <code>ffmpeg</code> use the
|
|
command:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
|
|
</pre></td></tr></table>
|
|
|
|
<a name="video4linux-and-video4linux2"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-video4linux-and-video4linux2">11.13 video4linux and video4linux2</a></h2>
|
|
|
|
<p>Video4Linux and Video4Linux2 input video devices.
|
|
</p>
|
|
<p>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 into the system, and has a name of the
|
|
kind ‘<tt>/dev/video<var>N</var></tt>’, where <var>N</var> is a number associated to
|
|
the device.
|
|
</p>
|
|
<p>Video4Linux and Video4Linux2 devices only support a limited set of
|
|
<var>width</var>x<var>height</var> sizes and framerates. You can check which are
|
|
supported for example with the command <code>dov4l</code> for Video4Linux
|
|
devices and using <code>-list_formats all</code> for Video4Linux2 devices.
|
|
</p>
|
|
<p>If the size for the device is set to 0x0, the input device will
|
|
try to auto-detect the size to use.
|
|
Only for the video4linux2 device, if the frame rate is set to 0/0 the
|
|
input device will use the frame rate value already set in the driver.
|
|
</p>
|
|
<p>Video4Linux support is deprecated since Linux 2.6.30, and will be
|
|
dropped in later versions.
|
|
</p>
|
|
<p>Note that if FFmpeg is build with v4l-utils support ("–enable-libv4l2"
|
|
option), it will always be used.
|
|
</p>
|
|
<p>Follow some usage examples of the video4linux devices with the ff*
|
|
tools.
|
|
</p><table><tr><td> </td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
|
|
# to the default of 25/1.
|
|
ffplay -s 320x240 -f video4linux /dev/video0
|
|
|
|
# Grab and show the input of a video4linux2 device, auto-adjust size.
|
|
ffplay -f video4linux2 /dev/video0
|
|
|
|
# Grab and record the input of a video4linux2 device, auto-adjust size,
|
|
# frame rate value defaults to 0/0 so it is read from the video4linux2
|
|
# driver.
|
|
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
|
|
</pre></td></tr></table>
|
|
|
|
<p>"v4l" and "v4l2" can be used as aliases for the respective "video4linux" and
|
|
"video4linux2".
|
|
</p>
|
|
<a name="vfwcap"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-vfwcap">11.14 vfwcap</a></h2>
|
|
|
|
<p>VfW (Video for Windows) capture input device.
|
|
</p>
|
|
<p>The filename passed as input is the capture driver number, ranging from
|
|
0 to 9. You may use "list" as filename to print a list of drivers. Any
|
|
other filename will be interpreted as device number 0.
|
|
</p>
|
|
<a name="x11grab"></a>
|
|
<h2 class="section"><a href="ffprobe.html#toc-x11grab">11.15 x11grab</a></h2>
|
|
|
|
<p>X11 video input device.
|
|
</p>
|
|
<p>This device allows to capture a region of an X11 display.
|
|
</p>
|
|
<p>The filename passed as input has the syntax:
|
|
</p><table><tr><td> </td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
|
|
</pre></td></tr></table>
|
|
|
|
<p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
|
|
X11 display name of the screen to grab from. <var>hostname</var> can be
|
|
omitted, and defaults to "localhost". The environment variable
|
|
<code>DISPLAY</code> contains the default display name.
|
|
</p>
|
|
<p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
|
|
area with respect to the top-left border of the X11 screen. They
|
|
default to 0.
|
|
</p>
|
|
<p>Check the X11 documentation (e.g. man X) for more detailed information.
|
|
</p>
|
|
<p>Use the <code>dpyinfo</code> program for getting basic information about the
|
|
properties of your X11 display (e.g. grep for "name" or "dimensions").
|
|
</p>
|
|
<p>For example to grab from ‘<tt>:0.0</tt>’ using <code>ffmpeg</code>:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
|
|
|
# Grab at position 10,20.
|
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
|
|
</pre></td></tr></table>
|
|
|
|
<a name="follow_005fmouse-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-follow_005fmouse-AVOption">11.15.1 <var>follow_mouse</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
|
|
</pre></td></tr></table>
|
|
|
|
<p>When it is specified with "centered", the grabbing region follows the mouse
|
|
pointer and keeps the pointer at the center of region; otherwise, the region
|
|
follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
|
|
zero) to the edge of region.
|
|
</p>
|
|
<p>For example:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
|
|
|
|
# Follows only when the mouse pointer reaches within 100 pixels to edge
|
|
ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
|
|
</pre></td></tr></table>
|
|
|
|
<a name="show_005fregion-AVOption"></a>
|
|
<h3 class="subsection"><a href="ffprobe.html#toc-show_005fregion-AVOption">11.15.2 <var>show_region</var> AVOption</a></h3>
|
|
|
|
<p>The syntax is:
|
|
</p><table><tr><td> </td><td><pre class="example">-show_region 1
|
|
</pre></td></tr></table>
|
|
|
|
<p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
|
|
region will be indicated on screen. With this option, it’s easy to know what is
|
|
being grabbed if only a portion of the screen is grabbed.
|
|
</p>
|
|
<p>For example:
|
|
</p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
|
|
|
|
# With follow_mouse
|
|
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
|
|
</pre></td></tr></table>
|
|
|
|
|
|
|
|
<div id="footer">
|
|
<p>
|
|
<font size="-1">
|
|
This document was generated by <em>Kyle</em> on <em>January 27, 2012</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
|
|
</font>
|
|
<br>
|
|
</div></div>
|
|
</p>
|
|
</body>
|
|
</html>
|
|
</div>
|