FFPLAY(1)
๐ธ FFplay โ the manual page, but make it cute ๐ธ
okay so this is FFPLAY(1), the manual page for ffplay, and bestie you're gonna love it. sit down, grab a strawberry drink ๐, and let's get into it.
โจ SYNOPSIS โจ
ffplay [options] [input_url]
literally that's it. options first, then the url. slay.
๐ DESCRIPTION ๐
FFplay is a very simple and portable media player that runs on the FFmpeg libraries and the SDL library. no cap.
and likeโฆ what's its whole deal? it's mostly used as a testbed for the various FFmpeg APIs. so it's the main character of API testing, basically ๐ it's not trying to be VLC, it's trying to be a vibe check for the libraries. and honestly? iconic.
๐ OPTIONS ๐
okay so first, ground rules for the numbers, because this applies everywhere:
- All the numerical options โ unless the page says otherwise โ accept a string representing a number as input, and that number may be followed by one of the SI unit prefixes, like
'K','M', or'G'. - If you slap an
'i'on the end of the SI unit prefix, the complete prefix gets interpreted as a unit prefix for binary multiples, which are based on powers of 1024 instead of powers of 1000. math girlie hours ๐งฎ - Appending
'B'to the SI unit prefix multiplies the value by 8. so you can use, for example:'KB','MiB','G'and'B'as number suffixes. yes really, that's a whole thing.
then there's boolean options:
- Options that don't take arguments are boolean options, and they set the corresponding value to true.
- You can set them to false by prefixing the option name with
"no". for example, using-nofoowill set the boolean option with name"foo"to false. cute, right? ๐ซถ
and here's a fun one โ options that do take arguments support a special syntax where the argument you gave on the command line gets interpreted as a path to the file from which the actual argument value is loaded. to use this feature, add a forward slash '/' immediately before the option name (after the leading dash). like so:
ffmpeg -i INPUT -/filter:v filter.script OUTPUT
that will load a filtergraph description from the file named filter.script. no cap, that's the whole trick ๐
๐ Stream specifiers ๐
some options are applied per-stream โ think bitrate or codec. stream specifiers are how you precisely specify which stream(s) a given option belongs to. so instead of guessing, you get to point at exactly the stream you mean. obsessed.
A stream specifier is a string that's 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. so it would select the ac3 codec for the second audio stream. see how that works? ๐ฏ
A stream specifier can match several streams, so the option gets applied to all of them. e.g. the stream specifier in -b:a 128k matches all audio streams. one little specifier, so much power.
An empty stream specifier matches all streams. for example, -codec copy or -codec: copy would copy all the streams without reencoding. okay short king behavior.
Possible forms of stream specifiers are:
stream_indexโ matches the stream with this index. e.g.-threads:1 4would set the thread count for the second stream to4. Ifstream_indexis used as an additional stream specifier (see below), then it selects stream numberstream_indexfrom the matching streams. Stream numbering is based on the order of the streams as detected by libavformat, except when a stream group specifier or program ID is also specified โ in that case it's based on the ordering of the streams in the group or program. nuance!! โจstream_type[:additional_stream_specifier]โstream_typeis one of the following:'v'or'V'for video,'a'for audio,'s'for subtitle,'d'for data, and't'for attachments.'v'matches all video streams, while'V'only matches video streams which are not attached pictures, video thumbnails or cover arts. Ifadditional_stream_specifieris used, then it matches streams which both have this type and match theadditional_stream_specifier. Otherwise, it matches all streams of the specified type.g:group_specifier[:additional_stream_specifier]โ matches streams which are in the group with the specifiergroup_specifier. ifadditional_stream_specifieris used, then it matches streams which both are part of the group and match theadditional_stream_specifier.group_specifiermay be one of the following:group_indexโ match the stream with this group index.#group_idori:group_idโ match the stream with this group id.
p:program_id[:additional_stream_specifier]โ matches streams which are in the program with the idprogram_id. Ifadditional_stream_specifieris used, then it matches streams which both are part of the program and match theadditional_stream_specifier.#stream_idori:stream_idโ match the stream by stream id (e.g. PID in MPEG-TS container). iykyk ๐ฆm:key[:value]โ matches streams with the metadata tagkeyhaving the specifiedvalue. Ifvalueis not given, matches streams that contain the given tag with any value. heads up: the colon character':'inkeyorvalueneeds to be backslash-escaped. don't forget, or it's giving chaos ๐ญdisp:dispositions[:additional_stream_specifier]โ matches streams with the given disposition(s).dispositionsis a list of one or more dispositions (as printed by the-dispositionsoption) joined with'+'.uโ matches streams with usable configuration: the codec must be defined, and the essential information such as video dimension or audio sample rate must be present.
note note note ๐ โ in ffmpeg, matching by metadata will only work properly for input files.
๐ Generic options ๐
these options are shared amongst the ff* tools. group project energy, but like, the good kind.
-L,-licenseโ show license.-h,-?,-help,--help [arg]โ 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 ofargare:longโ print advanced tool options in addition to the basic tool options.fullโ print the complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc. the whole buffet ๐decoder=decoder_nameโ print detailed information about the decoder named decoder_name. Use the-decodersoption to get a list of all decoders.encoder=encoder_nameโ print detailed information about the encoder named encoder_name. Use the-encodersoption to get a list of all encoders.demuxer=demuxer_nameโ print detailed information about the demuxer named demuxer_name. Use the-formatsoption to get a list of all demuxers and muxers.muxer=muxer_nameโ print detailed information about the muxer named muxer_name. Use the-formatsoption to get a list of all muxers and demuxers.filter=filter_nameโ print detailed information about the filter named filter_name. Use the-filtersoption to get a list of all filters.bsf=bitstream_filter_nameโ print detailed information about the bitstream filter named bitstream_filter_name. Use the-bsfsoption to get a list of all bitstream filters.protocol=protocol_nameโ print detailed information about the protocol named protocol_name. Use the-protocolsoption to get a list of all protocols.
-versionโ show version.-buildconfโ show the build configuration, one option per line.-formatsโ show available formats (including devices).-demuxersโ show available demuxers.-muxersโ show available muxers.-devicesโ show available devices.-codecsโ show all codecs known tolibavcodec.
little note ๐ โ the term 'codec' is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format.
-decodersโ show available decoders.-encodersโ show all available encoders.-bsfsโ show available bitstream filters.-protocolsโ show available protocols.-filtersโ show availablelibavfilterfilters.-pix_fmtsโ show available pixel formats.-sample_fmtsโ show available sample formats.-layoutsโ show channel names and standard channel layouts.-dispositionsโ show stream dispositions.-colorsโ show recognized color names.-sources device[,opt1=val1[,opt2=val2]...]โ show autodetected sources of the input device. Some devices may provide system-dependent source names that cannot be autodetected. The returned list cannot be assumed to be always complete. ๐
ffmpeg -sources pulse,server=192.168.0.4
-sinks device[,opt1=val1[,opt2=val2]...]โ show autodetected sinks of the output device. Some devices may provide system-dependent sink names that cannot be autodetected. The returned list cannot be assumed to be always complete.
ffmpeg -sinks pulse,server=192.168.0.4
-loglevel [flags+]loglevel,-v [flags+]loglevelโ set logging level and flags used by the library. The optionalflagsprefix can consist of the following values: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.levelโ indicates that log output should add a"[level]"prefix to each message line. This can be used as an alternative to log coloring, e.g. when dumping the log to file.timeโ indicates that log lines should be prefixed with time information.datetimeโ indicates that log lines should be prefixed with date and time information.
Flags can also be used alone by adding a '+'/'-' prefix to set/reset a single flag without affecting other flags or changing loglevel. When setting both flags and loglevel, a '+' separator is expected between the last flags value and before loglevel.
loglevel is a string or a number containing one of the following values:
quiet,-8โ show nothing at all; be silent. ๐คซpanic,0โ only show fatal errors which could lead the process to crash, such as an assertion failure. This is not currently used for anything.fatal,8โ only show fatal errors. These are errors after which the process absolutely cannot continue.error,16โ show all errors, including ones which can be recovered from.warning,24โ show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown.info,32โ show informative messages during processing. This is in addition to warnings and errors. This is the default value. โญverbose,40โ same as"info", except more verbose. it's giving chatty ๐debug,48โ show everything, including debugging information.trace,56โ that's the level, bestie, it's just56.
For example, to enable repeated log output, add the "level" prefix, and set loglevel to "verbose":
ffmpeg -loglevel repeat+level+verbose -i input output
bestie we're not done yet โ there's more page coming ๐โจ
Like, another example, bestie โ this one enables repeated log output without touching the current state of the level prefix flag or the loglevel:
ffmpeg [...] -loglevel +repeat
So by default the program logs to stderr. If your terminal supports coloring, colors get used to mark errors and warnings. Wanna kill the color? Set the environment variable AV_LOG_FORCE_NOCOLOR. Wanna force it on? Set the environment variable AV_LOG_FORCE_COLOR. Easy ๐
-reportโ dumps the full command line and the log output into a file namedprogram-YYYYMMDD-HHMMSS.login the current directory. Super useful for bug reports, fr. It also implies-loglevel debug.
Setting the environment variable FFREPORT to any value has the same effect. And if that value is a :-separated key=value sequence, those options will affect the report โ but heads up: option values must be escaped if they contain special characters or the options delimiter : (peep the "Quoting and escaping" section in the ffmpeg-utils manual, iykyk).
The following options are recognized:
fileโ set the file name to use for the report.%pis expanded to the name of the program,%tis expanded to a timestamp, and%%is expanded to a plain%.levelโ set the log verbosity level using a numerical value (see-loglevel).
So like, to output a report to a file named ffreport.log using a log level of 32 (which is an alias for log level info):
FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
Errors in parsing the environment variable are not fatal, and they won't show up in the report either. No drama ๐ซถ
-hide_bannerโ suppresses printing the banner. All FFmpeg tools normally show a copyright notice, build options and library versions, and this option lets you shut all that up. Iconic for clean output โจ-cpuflagsflags (global) โ lets you set and clear cpu flags. This option is intended for testing. Do not use it unless you know what you're doing, seriously ๐
ffmpeg -cpuflags -sse+mmx ...
ffmpeg -cpuflags mmx ...
ffmpeg -cpuflags 0 ...
Possible flags for this option are:
- x86
mmxmmxextssesse2sse2slowsse3sse3slowssse3atomsse4.1sse4.2avxavx2xopfma3fma43dnow3dnowextbmi1bmi2cmov
- ARM
armv5tearmv6armv6t2vfpvfpv3neonsetend
- AArch64
armv8vfpneon
- PowerPC
altivec
- Specific Processors
pentium2pentium3pentium4k6k62athlonathlonxpk8
-cpucountcount (global) โ overrides detection of CPU count. Again, this option is intended for testing. Do not use it unless you know what you're doing ๐
ffmpeg -cpucount 2
-max_allocbytes โ sets the maximum size limit for allocating a block on the heap by ffmpeg's family ofmallocfunctions. Exercise extreme caution when using this option. Don't use it if you don't understand the full consequence of doing so, bestie, I'm begging ๐ญ Default isINT_MAX.
๐ AVOptions ๐
These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the -help option. They're split into two categories:
genericโ these options can be set for any container, codec or device. Generic options are listed underAVFormatContextoptions for containers/devices and underAVCodecContextoptions for codecs.privateโ 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, so a stream specifier should be attached to them:
ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4
In the example above, a multichannel audio stream is mapped twice for output. The first instance is encoded with codec ac3 and bitrate 640k. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using the absolute index of the output stream. See how that works? Chef's kiss ๐
Note: the-nooptionsyntax cannot be used for boolean AVOptions โ use-option 0/-option 1instead. No cap.
Note: the old undocumented way of specifying per-stream AVOptions by prependingv/a/sto the options name is now obsolete and will be removed soon. It's giving deprecated, bestie, don't get attached ๐
๐ Main options ๐
-xwidth โ force displayed width.-yheight โ force displayed height.-fsโ start in fullscreen mode.-anโ disable audio.-vnโ disable video.-snโ disable subtitles.-sspos โ seek to pos. Note that in most formats it's not possible to seek exactly, soffplaywill seek to the nearest seek point to pos. pos must be a time duration specification โ see the Time duration section in theffmpeg-utils(1)manual ๐ธ-tduration โ play duration seconds of audio/video. duration must be a time duration specification, see the Time duration section in theffmpeg-utils(1)manual.-bytesโ seek by bytes.-seek_intervalโ set a custom interval, in seconds, for seeking using the left/right keys. Default is10seconds.-nodispโ disable graphical display.-noborderโ borderless window.-alwaysontopโ window always on top. Available on: X11 with SDL >= 2.0.5, Windows SDL >= 2.0.6.-volumeโ set the startup volume.0means silence,100means no volume reduction or amplification. Negative values are treated as0, values above100are treated as100.-ffmt โ force format.-window_titletitle โ set window title (default is the input filename).-lefttitle โ set the x position for the left of the window (default is a centered window).-toptitle โ set the y position for the top of the window (default is a centered window).-loopnumber โ loops movie playback <number> times.0means forever โพ๏ธ-showmodemode โ set the show mode to use. Available values for mode are:0,videoโ show video1,wavesโ show audio waves2,rdftโ show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
Default value is video, and if video is not present or can't be played, rdft is automatically selected. You can interactively cycle through the available show modes by pressing the key w ๐ฆ
-vffiltergraph โ 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 it must have a single video input and a single video output. In the filtergraph, the input is associated to the labelin, and the output to the labelout. See theffmpeg-filtersmanual for more info about the filtergraph syntax. You can specify this parameter multiple times and cycle through the specified filtergraphs along with the show modes by pressing the key w โจ-affiltergraph โ filtergraph is a description of the filtergraph to apply to the input audio. Use the option-filtersto show all the available filters (including sources and sinks).-iinput_url โ read input_url.
๐ Advanced options ๐
-statsโ 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's shown by default, unless the log level is lower thaninfo. Its display can be forced by manually specifying this option. To disable it, you need to specify-nostats.-fastโ non-spec-compliant optimizations.-genptsโ generate pts.-synctype โ set the master clock to audio (type=audio), video (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's necessary to change that. This option is mainly used for debugging purposes ๐ซถ-astaudio_stream_specifier โ select the desired audio stream using the given stream specifier. The stream specifiers are described in the Stream specifiers chapter. If this option is not specified, the "best" audio stream is selected in the program of the already selected video stream.-vstvideo_stream_specifier โ select the desired video stream using the given stream specifier. The stream specifiers are described in the Stream specifiers chapter. If this option is not specified, the "best" video stream is selected.-sstsubtitle_stream_specifier โ select the desired subtitle stream using the given stream specifier. The stream specifiers are described in the Stream specifiers chapter. If this option is not specified, the "best" subtitle stream is selected in the program of the already selected video or audio stream.-autoexitโ exit when video is done playing.-exitonkeydownโ exit if any key is pressed.-exitonmousedownโ exit if any mouse button is pressed.-codec:media_specifier codec_name โ force a specific decoder implementation for the stream identified by media_specifier, which can assume the valuesa(audio),v(video), andssubtitle.-acodeccodec_name โ force a specific audio decoder.-vcodeccodec_name โ force a specific video decoder.-scodeccodec_name โ force a specific subtitle decoder.-autorotateโ automatically rotate the video according to file metadata. Enabled by default, so use-noautorotateto disable it ๐-framedropโ drops video frames when the video is out of sync ๐ฅ ngl this one's already on by default whenever the master clock isn't set to video. Wanna turn on frame dropping for all master clock sources? That's literally what this flag is for, bestie. And if you'd rather it never drop frames,-noframedropis your girl ๐-infbufโ tells ffplay to not limit the input buffer size, so it reads as much data as possible from the input as fast as possible ๐โโ๏ธ๐จ it's enabled by default for realtime streams, where data can straight up get dropped if it isn't read in time ๐ญ. Want infinite buffers on everything? this option. Want it off?-noinfbuf.-filter_threadsnb_threads โ sets how many threads get used to process a filter pipeline ๐งต each pipeline makes its own thread pool with this many threads ready for parallel processing. default is0, which means the thread count gets figured out from how many CPUs you have available โจ-enable_vulkanโ use the vulkan renderer instead of the SDL builtin renderer ๐ฆ this one depends onlibplacebo(iykyk).-vulkan_paramsโ vulkan configuration, given as a list ofkey=valuepairs separated by":"๐-hwaccelโ use HW accelerated decoding โก enabling this option will automatically enable the vulkan renderer, no cap.-video_bgpattern โ sets the video background pattern used for transparent videos ๐ for solid color patterns you can use the color name or color code as specified in the Color section in theffmpeg-utils(1)manual. you can also use the special"tiles"keyword for a checker board style pattern โ and fun fact, that's the default too ๐ the"none"pattern does rendering without alpha blending, effectively ignoring the alpha channel entirely ๐ซถ
โจ While playing โจ
okay so this is the part where you're actually watching something and you just wanna vibe with the keyboard ๐
- q, ESC โ quit ๐จ
- f โ toggle full screen ๐ฅ๏ธโจ
- p, SPC โ pause โธ๏ธ
- m โ toggle mute ๐
- 9, 0
- /, * โ decrease and increase volume respectively ๐ (yes both pairs do it, pick your fave)
- a โ cycle audio channel in the current program ๐ง
- v โ cycle video channel ๐บ
- t โ cycle subtitle channel in the current program ๐ฌ
- c โ cycle program ๐
- w โ cycle video filters or show modes ๐จ
- s โ step to the next frame ๐ฆ it pauses if the stream isn't already paused, steps to the next video frame, and pauses. iconic behaviour honestly.
- left/right โ seek backward/forward by 10 seconds, or by a custom interval if
-seek_intervalis set โชโฉ - down/up โ seek backward/forward 1 minute โฑ๏ธ
- page down/page up โ seek to the previous/next chapter, or backward/forward 10 minutes if there are no chapters ๐
- right mouse click ๐ฑ๏ธ โ seek to a percentage in the file corresponding to the fraction of the width you clicked on ๐ฏ
- left mouse double-click ๐ฑ๏ธ๐ฑ๏ธ โ toggle full screen ๐
๐ SEE ALSO ๐
ffplay-all(1), ffmpeg(1), ffprobe(1), ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1), ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1), ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
like, the whole squad fr fr ๐ซถ
๐ AUTHORS ๐
The FFmpeg developers. ๐ฉโ๐ป๐งโ๐ป
For details about the authorship, see the Git history of the project (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in the FFmpeg source directory, or browsing the online repository at <https://git.ffmpeg.org/ffmpeg>.
Maintainers for the specific components are listed in the file MAINTAINERS in the source code tree. ๐โจ
and that's a wrap on the whole page, bestie ๐ this was the FFPLAY(1) page โ go be a main character and play some media ๐
๐
๐ฆ where this page comes from
- alpine 3.24: ffmpeg-doc 8.1.3-r0 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- nixos 26.05: ffmpeg 8.1.3
- nixos 26.05: ffmpeg-full 8.1.3
- nixpkgs unstable: ffmpeg 9.0.2
- nixpkgs unstable: ffmpeg-full 9.0.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms