<!DOCTYPE html> <html> <!-- Created on June 12, 2013 by texi2html 5.0 --> <!-- 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 5.0"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="default.css" /> <link rel="icon" href="favicon.png" type="image/png" /> </head> <body> <div id="container"> <h1 class="titlefont">ffplay Documentation</h1> <hr> <a name="SEC_Top"></a> <a name="SEC_Contents"></a> <h1>Table of Contents</h1> <div class="contents"> <ul class="no-bullet"> <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" href="#Options">3 Options</a> <ul class="no-bullet"> <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> <li><a name="toc-Advanced-options" href="#Advanced-options">3.5 Advanced options</a></li> <li><a name="toc-While-playing" href="#While-playing">3.6 While playing</a></li> </ul></li> <li><a name="toc-See-Also" href="#See-Also">4 See Also</a></li> <li><a name="toc-Authors" href="#Authors">5 Authors</a></li> </ul> </div> <hr size="6"> <a name="Synopsis"></a> <h1 class="chapter"><a href="ffplay.html#toc-Synopsis">1 Synopsis</a></h1> <p>ffplay [<var>options</var>] [‘<tt>input_file</tt>’] </p> <a name="Description"></a> <h1 class="chapter"><a href="ffplay.html#toc-Description">2 Description</a></h1> <p>FFplay is a very simple and portable media player using the FFmpeg libraries and the SDL library. It is mostly used as a testbed for the various FFmpeg APIs. </p> <a name="Options"></a> <h1 class="chapter"><a href="ffplay.html#toc-Options">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 SI unit prefixes, for example ’K’, ’M’, ’G’. If ’i’ is appended after the prefix, binary prefixes are used, which are based on powers of 1024 instead of powers of 1000. The ’B’ postfix multiplies the value by 8, and can be appended after a unit prefix or used alone. This allows using for example ’KB’, ’MiB’, ’G’ and ’B’ as number 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="ffplay.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 specifier, 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 streams, 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> <dt>‘<samp>#<var>stream_id</var></samp>’</dt> <dd><p>Matches the stream by format-specific ID. </p></dd> </dl> <a name="Generic-options"></a> <h2 class="section"><a href="ffplay.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 [<var>arg</var>]</samp>’</dt> <dd><p>Show help. An optional parameter may be specified to print help about a specific item. </p> <p>Possible values of <var>arg</var> are: </p><dl compact="compact"> <dt>‘<samp>decoder=<var>decoder_name</var></samp>’</dt> <dd><p>Print detailed information about the decoder named <var>decoder_name</var>. Use the ‘<samp>-decoders</samp>’ option to get a list of all decoders. </p> </dd> <dt>‘<samp>encoder=<var>encoder_name</var></samp>’</dt> <dd><p>Print detailed information about the encoder named <var>encoder_name</var>. Use the ‘<samp>-encoders</samp>’ option to get a list of all encoders. </p> </dd> <dt>‘<samp>demuxer=<var>demuxer_name</var></samp>’</dt> <dd><p>Print detailed information about the demuxer named <var>demuxer_name</var>. Use the ‘<samp>-formats</samp>’ option to get a list of all demuxers and muxers. </p> </dd> <dt>‘<samp>muxer=<var>muxer_name</var></samp>’</dt> <dd><p>Print detailed information about the muxer named <var>muxer_name</var>. Use the ‘<samp>-formats</samp>’ option to get a list of all muxers and demuxers. </p> </dd> </dl> </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 all codecs known to libavcodec. </p> <p>Note that the term ’codec’ is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format. </p> </dd> <dt>‘<samp>-decoders</samp>’</dt> <dd><p>Show available decoders. </p> </dd> <dt>‘<samp>-encoders</samp>’</dt> <dd><p>Show all available encoders. </p> </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>-layouts</samp>’</dt> <dd><p>Show channel names and standard channel layouts. </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>Setting the environment variable <code>FFREPORT</code> to any value has the same effect. If the value is a ’:’-separated key=value sequence, these options will affect the report; options values must be escaped if they contain special characters or the options delimiter ’:’ (see the “Quoting and escaping” section in the ffmpeg-utils manual). The following option is recognized: </p><dl compact="compact"> <dt>‘<samp>file</samp>’</dt> <dd><p>set the file name to use for the report; <code>%p</code> is expanded to the name of the program, <code>%t</code> is expanded to a timestamp, <code>%%</code> is expanded to a plain <code>%</code> </p></dd> </dl> <p>Errors in parsing the environment variable are not fatal, and will not appear in the report. </p> </dd> <dt>‘<samp>-cpuflags flags (<em>global</em>)</samp>’</dt> <dd><p>Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you’re doing. </p><div class="example"> <pre class="example">ffmpeg -cpuflags -sse+mmx ... ffmpeg -cpuflags mmx ... ffmpeg -cpuflags 0 ... </pre></div> </dd> </dl> <a name="AVOptions"></a> <h2 class="section"><a href="ffplay.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><div class="example"> <pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3 </pre></div> <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="ffplay.html#toc-Main-options">3.4 Main options</a></h2> <dl compact="compact"> <dt>‘<samp>-x <var>width</var></samp>’</dt> <dd><p>Force displayed width. </p></dd> <dt>‘<samp>-y <var>height</var></samp>’</dt> <dd><p>Force displayed height. </p></dd> <dt>‘<samp>-s <var>size</var></samp>’</dt> <dd><p>Set frame size (WxH or abbreviation), needed for videos which do not contain a header with the frame size like raw YUV. This option has been deprecated in favor of private options, try -video_size. </p></dd> <dt>‘<samp>-an</samp>’</dt> <dd><p>Disable audio. </p></dd> <dt>‘<samp>-vn</samp>’</dt> <dd><p>Disable video. </p></dd> <dt>‘<samp>-ss <var>pos</var></samp>’</dt> <dd><p>Seek to a given position in seconds. </p></dd> <dt>‘<samp>-t <var>duration</var></samp>’</dt> <dd><p>play <duration> seconds of audio/video </p></dd> <dt>‘<samp>-bytes</samp>’</dt> <dd><p>Seek by bytes. </p></dd> <dt>‘<samp>-nodisp</samp>’</dt> <dd><p>Disable graphical display. </p></dd> <dt>‘<samp>-f <var>fmt</var></samp>’</dt> <dd><p>Force format. </p></dd> <dt>‘<samp>-window_title <var>title</var></samp>’</dt> <dd><p>Set window title (default is the input filename). </p></dd> <dt>‘<samp>-loop <var>number</var></samp>’</dt> <dd><p>Loops movie playback <number> times. 0 means forever. </p></dd> <dt>‘<samp>-showmode <var>mode</var></samp>’</dt> <dd><p>Set the show mode to use. Available values for <var>mode</var> are: </p><dl compact="compact"> <dt>‘<samp>0, video</samp>’</dt> <dd><p>show video </p></dd> <dt>‘<samp>1, waves</samp>’</dt> <dd><p>show audio waves </p></dd> <dt>‘<samp>2, rdft</samp>’</dt> <dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform) </p></dd> </dl> <p>Default value is "video", if video is not present or cannot be played "rdft" is automatically selected. </p> <p>You can interactively cycle through the available show modes by pressing the key <w>. </p> </dd> <dt>‘<samp>-vf <var>filter_graph</var></samp>’</dt> <dd><p><var>filter_graph</var> is a description of the filter graph to apply to the input video. Use the option "-filters" to show all the available filters (including also sources and sinks). </p> </dd> <dt>‘<samp>-i <var>input_file</var></samp>’</dt> <dd><p>Read <var>input_file</var>. </p></dd> </dl> <a name="Advanced-options"></a> <h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.5 Advanced options</a></h2> <dl compact="compact"> <dt>‘<samp>-pix_fmt <var>format</var></samp>’</dt> <dd><p>Set pixel format. This option has been deprecated in favor of private options, try -pixel_format. </p></dd> <dt>‘<samp>-stats</samp>’</dt> <dd><p>Show the stream duration, the codec parameters, the current position in the stream and the audio/video synchronisation drift. </p></dd> <dt>‘<samp>-bug</samp>’</dt> <dd><p>Work around bugs. </p></dd> <dt>‘<samp>-fast</samp>’</dt> <dd><p>Non-spec-compliant optimizations. </p></dd> <dt>‘<samp>-genpts</samp>’</dt> <dd><p>Generate pts. </p></dd> <dt>‘<samp>-rtp_tcp</samp>’</dt> <dd><p>Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful if you are streaming with the RTSP protocol. </p></dd> <dt>‘<samp>-sync <var>type</var></samp>’</dt> <dd><p>Set the master clock to audio (<code>type=audio</code>), video (<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The master clock is used to control audio-video synchronization. Most media players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. </p></dd> <dt>‘<samp>-threads <var>count</var></samp>’</dt> <dd><p>Set the thread count. </p></dd> <dt>‘<samp>-ast <var>audio_stream_number</var></samp>’</dt> <dd><p>Select the desired audio stream number, counting from 0. The number refers to the list of all the input audio streams. If it is greater than the number of audio streams minus one, then the last one is selected, if it is negative the audio playback is disabled. </p></dd> <dt>‘<samp>-vst <var>video_stream_number</var></samp>’</dt> <dd><p>Select the desired video stream number, counting from 0. The number refers to the list of all the input video streams. If it is greater than the number of video streams minus one, then the last one is selected, if it is negative the video playback is disabled. </p></dd> <dt>‘<samp>-sst <var>subtitle_stream_number</var></samp>’</dt> <dd><p>Select the desired subtitle stream number, counting from 0. The number refers to the list of all the input subtitle streams. If it is greater than the number of subtitle streams minus one, then the last one is selected, if it is negative the subtitle rendering is disabled. </p></dd> <dt>‘<samp>-autoexit</samp>’</dt> <dd><p>Exit when video is done playing. </p></dd> <dt>‘<samp>-exitonkeydown</samp>’</dt> <dd><p>Exit if any key is pressed. </p></dd> <dt>‘<samp>-exitonmousedown</samp>’</dt> <dd><p>Exit if any mouse button is pressed. </p> </dd> <dt>‘<samp>-codec:<var>media_specifier</var> <var>codec_name</var></samp>’</dt> <dd><p>Force a specific decoder implementation for the stream identified by <var>media_specifier</var>, which can assume the values <code>a</code> (audio), <code>v</code> (video), and <code>s</code> subtitle. </p> </dd> <dt>‘<samp>-acodec <var>codec_name</var></samp>’</dt> <dd><p>Force a specific audio decoder. </p> </dd> <dt>‘<samp>-vcodec <var>codec_name</var></samp>’</dt> <dd><p>Force a specific video decoder. </p> </dd> <dt>‘<samp>-scodec <var>codec_name</var></samp>’</dt> <dd><p>Force a specific subtitle decoder. </p></dd> </dl> <a name="While-playing"></a> <h2 class="section"><a href="ffplay.html#toc-While-playing">3.6 While playing</a></h2> <dl compact="compact"> <dt><q, ESC></dt> <dd><p>Quit. </p> </dd> <dt><f></dt> <dd><p>Toggle full screen. </p> </dd> <dt><p, SPC></dt> <dd><p>Pause. </p> </dd> <dt><a></dt> <dd><p>Cycle audio channel. </p> </dd> <dt><v></dt> <dd><p>Cycle video channel. </p> </dd> <dt><t></dt> <dd><p>Cycle subtitle channel. </p> </dd> <dt><w></dt> <dd><p>Show audio waves. </p> </dd> <dt><left/right></dt> <dd><p>Seek backward/forward 10 seconds. </p> </dd> <dt><down/up></dt> <dd><p>Seek backward/forward 1 minute. </p> </dd> <dt><page down/page up></dt> <dd><p>Seek backward/forward 10 minutes. </p> </dd> <dt><mouse click></dt> <dd><p>Seek to percentage in file corresponding to fraction of width. </p> </dd> </dl> <a name="See-Also"></a> <h1 class="chapter"><a href="ffplay.html#toc-See-Also">4 See Also</a></h1> <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffprobe.html">ffprobe</a>, <a href="ffserver.html">ffserver</a>, <a href="ffmpeg-utils.html">ffmpeg-utils</a>, <a href="ffmpeg-scaler.html">ffmpeg-scaler</a>, <a href="ffmpeg-resampler.html">ffmpeg-resampler</a>, <a href="ffmpeg-codecs.html">ffmpeg-codecs</a>, <a href="ffmpeg-bitstream-filters">ffmpeg-bitstream-filters</a>, <a href="ffmpeg-formats.html">ffmpeg-formats</a>, <a href="ffmpeg-devices.html">ffmpeg-devices</a>, <a href="ffmpeg-protocols.html">ffmpeg-protocols</a>, <a href="ffmpeg-filters.html">ffmpeg-filters</a> </p> <a name="Authors"></a> <h1 class="chapter"><a href="ffplay.html#toc-Authors">5 Authors</a></h1> <p>The FFmpeg developers. </p> <p>For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command <code>git log</code> in the FFmpeg source directory, or browsing the online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>. </p> <p>Maintainers for the specific components are listed in the file ‘<tt>MAINTAINERS</tt>’ in the source code tree. </p> <footer class="footer pagination-right"> <span class="label label-info">This document was generated on <i>June 12, 2013</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 5.0</i></a>.</span></footer></div>