ffplay [options] [‘input_file’]
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.
All the numerical options, if not specified otherwise, accept a string representing a number as input, which may be followed by one of the SI unit prefixes, for example: ’K’, ’M’, or ’G’.
If ’i’ is appended to the SI unit prefix, the complete prefix will be interpreted as a unit prefix for binary multiplies, which are based on powers of 1024 instead of powers of 1000. Appending ’B’ to the SI unit prefix multiplies the value by 8. This allows using, for example: ’KB’, ’MiB’, ’G’ and ’B’ as number suffixes.
Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing the option name with "no". For example using "-nofoo" will set the boolean option with name "foo" to false.
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) a given option belongs to.
A stream specifier is a string generally appended to the option name and
separated from it by a colon. E.g.
-codec:a:1 ac3 contains the
a:1 stream specifier, which matches the second audio stream. Therefore, it
would select the ac3 codec for the second audio stream.
A stream specifier can match several streams, so that the option is applied to all
of them. E.g. the stream specifier in
-b:a 128k matches all audio
An empty stream specifier matches all streams. For example,
-codec: copy would copy all the streams without reencoding.
Possible forms of stream specifiers are:
Matches the stream with this index. E.g.
-threads:1 4 would set the
thread count for the second stream to 4.
stream_type is one of following: ’v’ for video, ’a’ for audio, ’s’ for subtitle, ’d’ for data, and ’t’ for attachments. If stream_index is given, then it matches stream number stream_index of this type. Otherwise, it matches all streams of this type.
If stream_index is given, then it matches the stream with number stream_index in the program with the id program_id. Otherwise, it matches all streams in the program.
Match the stream by stream id (e.g. PID in MPEG-TS container).
These options are shared amongst the ff* tools.
Show help. An optional parameter may be specified to print help about a specific item. If no argument is specified, only basic (non advanced) tool options are shown.
Possible values of arg are:
Print advanced tool options in addition to the basic tool options.
Print complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc.
Print detailed information about the decoder named decoder_name. Use the ‘-decoders’ option to get a list of all decoders.
Print detailed information about the encoder named encoder_name. Use the ‘-encoders’ option to get a list of all encoders.
Print detailed information about the demuxer named demuxer_name. Use the ‘-formats’ option to get a list of all demuxers and muxers.
Print detailed information about the muxer named muxer_name. Use the ‘-formats’ option to get a list of all muxers and demuxers.
Print detailed information about the filter name filter_name. Use the ‘-filters’ option to get a list of all filters.
Show available formats.
Show all codecs known to libavcodec.
Note that the term ’codec’ is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format.
Show available decoders.
Show all available encoders.
Show available bitstream filters.
Show available protocols.
Show available libavfilter filters.
Show available pixel formats.
Show available sample formats.
Show channel names and standard channel layouts.
Show recognized color names.
Set the logging level used by the library. Adding "repeat+" indicates that repeated log output should not be compressed to the first line and the "Last message repeated n times" line will be omitted. "repeat" can also be used alone. If "repeat" is used alone, and with no prior loglevel set, the default loglevel will be used. If multiple loglevel parameters are given, using ’repeat’ will not change the loglevel. loglevel is a number or a string containing one of the following values:
Show nothing at all; be silent.
Only show fatal errors which could lead the process to crash, such as and assert failure. This is not currently used for anything.
Only show fatal errors. These are errors after which the process absolutely cannot continue after.
Show all errors, including ones which can be recovered from.
Show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown.
Show informative messages during processing. This is in addition to warnings and errors. This is the default value.
info, except more verbose.
Show everything, including debugging information.
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
NO_COLOR, or can be forced setting
the environment variable
The use of the environment variable
NO_COLOR is deprecated and
will be dropped in a following FFmpeg version.
Dump full command line and console output to a file named
program-YYYYMMDD-HHMMSS.log in the current
This file can be useful for bug reports.
It also implies
Setting the environment variable
FFREPORT 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:
set the file name to use for the report;
%p is expanded to the name
of the program,
%t is expanded to a timestamp,
%% is expanded
to a plain
Errors in parsing the environment variable are not fatal, and will not appear in the report.
Suppress printing banner.
All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information.
Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you’re doing.
ffmpeg -cpuflags -sse+mmx ... ffmpeg -cpuflags mmx ... ffmpeg -cpuflags 0 ...
Possible flags for this option are:
Benchmark all available OpenCL devices and show the results. This option
is only available when FFmpeg has been compiled with
Set OpenCL environment options. This option is only available when
FFmpeg has been compiled with
options must be a list of key=value option pairs separated by ’:’. See the “OpenCL Options” section in the ffmpeg-utils manual for the list of supported options.
These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the ‘-help’ option. They are separated into two categories:
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.
These options are specific to the given container, device or codec. Private options are listed under their corresponding containers/devices/codecs.
For example to write an ID3v2.3 header instead of a default ID3v2.4 to an MP3 file, use the ‘id3v2_version’ private option of the MP3 muxer:
ffmpeg -i input.flac -id3v2_version 3 out.mp3
All codec AVOptions are per-stream, and thus a stream specifier should be attached to them.
Note: the ‘-nooption’ syntax cannot be used for boolean AVOptions, use ‘-option 0’/‘-option 1’.
Note: the 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.
Force displayed width.
Force displayed height.
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.
Seek to a given position in seconds.
play <duration> seconds of audio/video
Seek by bytes.
Disable graphical display.
Set window title (default is the input filename).
Loops movie playback <number> times. 0 means forever.
Set the show mode to use. Available values for mode are:
show audio waves
show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
Default value is "video", if video is not present or cannot be played "rdft" is automatically selected.
You can interactively cycle through the available show modes by pressing the key <w>.
Create the filtergraph specified by filtergraph and use it to filter the video stream.
filtergraph is a description of the filtergraph to apply to
the stream, and must have a single video input and a single video
output. In the filtergraph, the input is associated to the label
in, and the output to the label
out. See the
ffmpeg-filters manual for more information about the filtergraph
filtergraph is a description of the filtergraph to apply to the input audio. Use the option "-filters" to show all the available filters (including sources and sinks).
Set pixel format. This option has been deprecated in favor of private options, try -pixel_format.
Print several playback statistics, in particular show the stream
duration, the codec parameters, the current position in the stream and
the audio/video synchronisation drift. It is on by default, to
explicitly disable it you need to specify
Work around bugs.
Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful if you are streaming with the RTSP protocol.
Set the master clock to audio (
type=video) or external (
type=ext). 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.
Set the thread count.
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.
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.
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.
Exit when video is done playing.
Exit if any key is pressed.
Exit if any mouse button is pressed.
Force a specific decoder implementation for the stream identified by
media_specifier, which can assume the values
v (video), and
Force a specific audio decoder.
Force a specific video decoder.
Force a specific subtitle decoder.
Toggle full screen.
Cycle audio channel in the curret program.
Cycle video channel.
Cycle subtitle channel in the current program.
Show audio waves.
Step to the next frame.
Pause if the stream is not already paused, step to the next video frame, and pause.
Seek backward/forward 10 seconds.
Seek backward/forward 1 minute.
Seek to the previous/next chapter. or if there are no chapters Seek backward/forward 10 minutes.
Seek to percentage in file corresponding to fraction of width.
The FFmpeg developers.
For details about the authorship, see the Git history of the project
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
git log in the FFmpeg source directory, or browsing the
online repository at http://source.ffmpeg.org.
Maintainers for the specific components are listed in the file ‘MAINTAINERS’ in the source code tree.