Options. Examples. Syntax. Expression Evaluation. Open. CL Options. Codec Options. 11 Decoders. Video Decoders. 13 Audio Decoders. Subtitles Decoders. Encoders. 16 Audio Encoders. Video Encoders. 18 Subtitles Encoders. Bitstream Filters. Format Options. 21 Demuxers. Muxers. 23 Metadata. Protocol Options. Protocols. 26 Device Options. Input Devices. 28 Output Devices. Resampler Options. Scaler Options. 31 Filtering Introduction. Filtergraph description. Timeline editing. Options for filters with several inputs framesync3. Audio Filters. 37 Audio Sources. Audio Sinks. 39 Video Filters. Video Sources. 40. Video Sinks. 42 Multimedia Filters. Multimedia Sources. See Also. 45 Authorsffmpeg globaloptions inputfileoptions i inputurl. It can also convert between arbitrary sample. Anything found on the command line which. Each input or output url can, in principle, contain any number of streams of. The allowed number andor. Selecting which. streams from which inputs will go into which output is either done automatically. Stream selection chapter. To refer to input files in options, you must use their indices 0 based. E. g. the first input file is 0, the second is 1, etc. Similarly, streams. E. g. 2 3 refers to the. Also see the Stream specifiers chapter. As a general rule, options are applied to the next specified. Therefore, order is important, and you can have the same. Each occurrence is. Exceptions from this rule are the global options e. Do not mix input and output files first specify all input files, then all. Also do not mix options which belong to different files. All. options apply ONLY to the next input or output file and are reset between files. To set the video bitrate of the output file to 6. To force the frame rate of the output file to 2. To force the frame rate of the input file valid for raw formats only. The format option may be needed for raw input files. The transcoding process in ffmpeg for each output can be described by. When there are. multiple input files, ffmpeg tries to keep them synchronized by. Encoded packets are then passed to the decoder unless streamcopy is selected. The decoder produces. PCM audio. which can be processed further by. After filtering, the frames are passed to the. Finally those are. Before encoding, ffmpeg can process raw audio and video frames using. Several chained filters form a filter. Simple filtergraphs are those that have exactly one input and output, both of. In the above diagram they can be represented by simply inserting. Simple filtergraphs are configured with the per stream filter option. A simple filtergraph for video can look for example like this. Note that some filters change frame properties but not frame contents. E. g. the. fps filter in the example above changes number of frames, but does not. Another example is the setpts filter, which. Complex filtergraphs are those which cannot be described as simply a linear. This is the case, for example, when the graph has. They can be represented with the following diagram. Complex filtergraphs are configured with the filtercomplex option. Note that this option is global, since a complex filtergraph, by its nature. The lavfi option is equivalent to filtercomplex. A trivial example of a complex filtergraph is the overlay filter, which. Its audio counterpart is the amix filter. Stream copy is a mode selected by supplying the copy parameter to the. It makes ffmpeg omit the decoding and encoding. It is useful. for changing the container format or modifying container level metadata. The. diagram above will, in this case, simplify to this. Since there is no decoding or encoding, it is very fast and there is no quality. However, it might not work in some cases because of many factors. Applying. filters is obviously also impossible, since filters work on uncompressed data. By default, ffmpeg includes only one stream of each type video, audio, subtitle. It picks the. best of each based upon the following criteria for video, it is the stream. In the case where several streams of. You can disable some of those defaults by using the vn an sn dn options. For. full manual control, use the map option, which disables the defaults just. All the numerical options, if not specified otherwise, accept a string. SI. unit prefixes, for example K, M, or G. If i is appended to the SI unit prefix, the complete prefix will be. Appending B to the SI unit. This allows using, for example. KB, Mi. B, G and B as number suffixes. Options which do not take arguments are boolean options, and set the. They can be set to false by prefixing. For example using nofoo. Some options are applied per stream, e. Stream specifiers. A stream specifier is a string generally appended to the option name and. E. g. codec a 1 ac. Therefore, it. would select the ac. A stream specifier can match several streams, so that the option is applied to all. E. g. the stream specifier in b a 1. An empty stream specifier matches all streams. For example, codec copy. Possible forms of stream specifiers are. Matches the stream with this index. E. g. threads 1 4 would set the. V for video, a for audio, s. V only matches video streams which are not attached pictures, video. If streamindex is given, then it matches. Otherwise, it matches all. If streamindex is given, then it matches the stream with number streamindex. Otherwise, it matches all streams in the. Match the stream by stream id e. PID in MPEG TS container. Matches streams with the metadata tag key having the specified value. If. value is not given, matches streams that contain the given tag with any. Matches streams with usable configuration, the codec must be defined and the. Note that in ffmpeg, matching by metadata will only work properly for. These options are shared amongst the ff tools. LShow license. h, help, help argShow help. An optional parameter may be specified to print help about a specific. If no argument is specified, only basic non advanced tool. 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. Print detailed information about the decoder named decodername. Use the. decoders option to get a list of all decoders. Print detailed information about the encoder named encodername. Use the. encoders option to get a list of all encoders. Print detailed information about the demuxer named demuxername. Use the. formats option to get a list of all demuxers and muxers. Print detailed information about the muxer named muxername. Use the. formats option to get a list of all muxers and demuxers. Print detailed information about the filter name filtername. Use the. filters option to get a list of all filters. Show version. formats. Show available formats including devices. Show available demuxers. Show available muxers. Show available devices. Show all codecs known to libavcodec. Note that the term codec is used throughout this documentation as a shortcut. 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. 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. 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. Set the logging level used by the library. Adding repeat indicates that repeated log output should not be compressed. Last message repeated n times line will be. If repeat is used alone, and with no prior loglevel set, the default.