What is ffmpeg g
A… Enhance the decoded audio adds delay from 0 to 1 default 0. Codec Format from 0 to 2 default 2. Digital Cinema from 0 to 3 default 0. Progression Order from 0 to 4 default 0.
Enable use of alternate reference frames 2-pass only from -1 to 1 default Time to spend encoding, in microseconds. Error resilience configuration default 0. Improve resiliency against losses of whole frames. The frame partitions are independently decodable by the bool decoder, meaning that partitions can be decoded even though earlier partitions have been lost.
Note that intra predicition is still done over the partition boundary. Select the quality for constant quality mode from 0 to 63 default 0. Number of frames to look ahead for alternate reference frame selection from 0 to 25 default Lossless mode from -1 to 1 default Number of tile columns to use, log2 from -1 to 6 default Number of tile rows to use, log2 from -1 to 2 default Enable frame parallel decodability features from -1 to 1 default Set the encoding preset cf.
Tune the encoding params cf. Set profile restrictions cf. Use fast settings when encoding first pass from 0 to 1 default 1. Specify level as defined by Annex A. Filename for 2 pass stats. Weighted prediction for P-frames. Variance AQ complexity mask. Auto-variance AQ experimental. AQ strength. Reduces blocking and blurring in flat and textured areas. Use psychovisual optimizations.
Strength of psychovisual optimization, in : format. Weighted prediction for B-frames. Weighted prediction analysis method. Calculate and print SSIM stats. Bluray compatibility workarounds. Keep some B-frames as references. Strictly hierarchical pyramid. Non-strict not Blu-ray compatible. One reference per partition, as opposed to one reference per macroblock from -1 to 1 default Use access unit delimiters. Use macroblock tree ratecontrol.
Loop filter parameters, in form. A comma-separated list of partitions to consider. Signal HRD information requires vbv-bufsize; cbr not allowed in. Luminance masking AQ from 0 to 1 default 0. Variance AQ from 0 to 1 default 0. Show SSIM information to stdout from 0 to 2 default 0. SSIM accuracy from 0 to 4 default 2. D…… reduce the latency by flushing out packets immediately. D…… ignore index. D…… generate pts. D…… do not fill in missing values that can be exactly calculated. D…… disable AVParsers, this needs nofillin too.
D…… ignore dts. D…… discard corrupted frames. D…… try to interleave outputted packets by dts. D…… reduce the latency introduced by optional buffering. D…… allow seeking to non-keyframes on demuxer level when supported from 0 to 1 default 0. D…… decryption key.
D…… number of frames used to probe fps from -1 to 2. D…… verify embedded CRCs. D…… detect bitstream specification deviations. D…… detect improper bitstream length. D…… abort decoding on minor error detection. D…… consider things that violate the spec, are fast to check and have not been seen in the wild as errors. D…… consider all spec non compliancies as errors. D…… set error detection flags default 1. D…… use wallclock as timestamps from 0 to 2. D…… set number of bytes to skip before reading header and frames from 0 to 2.
D…… correct single timestamp overflows from 0 to 1 default 1. D…… from -1 to default D…… from 0 to default 0. D…… from 1 to default 1. D…… AES decryption key. D…… AES decryption initialization vector. E-mail address should be used. D…… control seekability of connection from -1 to 1 default D…… request ICY metadata from 0 to 1 default 0. D…… survive in case of UDP receiving circular buffer overrun from 0 to 1 default 0.
D…… set video pixel format default none. D…… set video frame rate. D…… set audio sample size from 0 to 16 default 0. D…… list available devices from 0 to 1 default 0. D…… list available options for specified device from 0 to 1 default 0. D…… draw the mouse pointer from 0 to 1 default 1. D…… draw border around capture area from 0 to 1 default 0. D…… set video frame size.
D…… set libavfilter graph. D…… set libavfilter graph filename. D…… dump graph to stderr. D…… use odml index from -1 to 1 default 1. Binary text demuxer AVOptions:. D…… enable safe mode from -1 to 1 default Allocate streams according to the onMetaData array from 0 to 1 default 0. D…… minimum valid delay between frames in hundredths of second from 0 to default 2. D…… default delay between frames in hundredths of second from 0 to default D…… ignore loop setting netscape extension from 0 to 1 default 1.
D…… from 1 to 6. D…… force loop over input file sequence from 0 to 1 default 0. D…… select glob pattern type. D…… select sequence pattern type. D…… set video pixel format. D…… set video size. D…… none. D…… second precision. D…… nano second precision. D…… use table of contents from -1 to 1 default D…… Try to fix pts values of dvb teletext streams. XR Output option carrying the raw packet size.
D…… Compute exact PCR for each transport stream packet. D…… set frame size. D…… set RTP flags default 0. D…… only receive packets from the negotiated peer IP. D…… do not start playing the stream immediately from 0 to 1 default 0. RTP muxer flags default 0.
Use mode 0 for H in RTP. D…… UDP multicast. D…… HTTP tunneling. D…… set RTSP flags default 0. D…… wait for incoming connections. D…… set media types to accept from the server default 7. D…… Video. D…… Audio. D…… Data. D…… SDP flags default 0. D…… send RTCP packets to the source address of received packets. D…… Ignore length from 0 to 1 default 0. ModPlug demuxer AVOptions:.
D…… Enable noise reduction 0 off -1 on from 0 to 1 default 0. D…… Reverb level 0 quiet loud from 0 to default 0. D…… XBass level 0 quiet loud from 0 to default 0. D…… XBass cutoff in Hz from 0 to default 0.
D…… Surround level 0 quiet heavy from 0 to default 0. D…… Max file size supported in bytes. Default is 5MB. Set to 0 for no limit not recommended from 0 to 1. D…… Color formula. D…… Make demuxer output a video stream from 0 to 1 default 0. D…… Print speed, tempo, order, … in video stream from 0 to 1 default 1. Enable APE tag writing from 0 to 1 default 0.
Enable ID3 tags writing. Select ID3v2 version to write. Currently 3 and 4 are supported. For the subtitle stream to be detected, both values must be large enough.
The -sameq option meant "same quantizer", and made sense only in a very limited set of cases. Unfortunately, a lot of people mistook it for "same quality" and used it in places where it did not make sense: it had roughly the expected visible effect, but achieved it in a very inefficient way. Each encoder has its own set of options to set the quality-vs-size balance, use the options for the encoder you are using to set the quality level to a point acceptable for your tastes.
The most common options to do that are -qscale and -qmax , but you should peruse the documentation of the encoder you chose. A lot of video codecs and formats can store the aspect ratio of the video: this is the ratio between the width and the height of either the full image DAR, display aspect ratio or individual pixels SAR, sample aspect ratio.
Most still image processing work with square pixels, i. Do not forget to examine carefully the original video to check whether the stretching comes from the image or from the aspect ratio information. When it checks the console input, that can cause the process running ffmpeg in the background to suspend.
To prevent those input checks, allowing ffmpeg to run as a background task, use the -nostdin option in the ffmpeg invocation. This is effective whether you run ffmpeg in a shell or invoke ffmpeg in its own process via an operating system API. You can do this redirect either on the ffmpeg invocation, or from a shell script which calls ffmpeg.
If you run ffmpeg in the background, you may find that its process suspends. There may be a message like suspended tty output.
The question is how to prevent the process from being suspended. The message "tty output" notwithstanding, the problem here is that ffmpeg normally checks the console input when it runs. The operating system detects this, and suspends the process until you can bring it to the foreground and attend to it.
The solution is to use the right techniques to tell ffmpeg not to consult console input. Also you may read the Developers Guide of the FFmpeg documentation. Alternatively, examine the source code for one of the many open source projects that already incorporate FFmpeg at projects. It depends. If your compiler is Ccompliant, then patches to support it are likely to be welcome if they do not pollute the source code with ifdef s related to the compiler.
FFmpeg is already organized in a highly modular manner and does not need to be rewritten in a formal object language. Further, many of the developers favor straight C; it works for them. For more arguments on this matter, read "Programming Religion". Those binaries are stripped to create ffmpeg , ffplay , etc. FFmpeg builds static libraries by default.
In static libraries, dependencies are not handled. That has two consequences. First, you must specify the libraries in dependency order: -lavdevice must come before -lavformat , -lavutil must come after everything else, etc.
Second, external libraries that are used in FFmpeg have to be specified too. An easy way to get the full list of required libraries in dependency order is to use pkg-config.
You can do this by encompassing your FFmpeg includes using extern "C". Even if peculiar since it is network oriented, RTP is a container like any other.
The encoders chosen will be the default ones registered by each output format, which may not match the codec of the selected input streams. For the third output, codec option for audio streams has been set to copy , so no decoding-filtering-encoding operations will occur, or can occur. Packets of selected streams shall be conveyed from the input file and muxed within the output file.
Although out1. The subtitle stream of C. However, in out2. The presence of -an disables audio stream selection for out2. The overlay filter requires exactly two video inputs, but none are specified, so the first two available video streams are used, those of A. The output pad of the filter has no label and so is sent to the first output file out1. Due to this, automatic selection of the video stream is skipped, which would have selected the stream in B. The audio stream with most channels viz.
The 2nd output file, out2. So, even though the first subtitle stream available belongs to C. The selected stream, stream 2 in B. The above command will fail, as the output pad labelled [outv] has been mapped twice. None of the output files shall be processed. The video stream from B. Then a copy each is mapped to the first and third output files.
The overlay filter, requiring two video inputs, uses the first two unused video streams. Those are the streams from A. The aresample filter is sent the first unused audio stream, that of A. Since this filter output is also unlabelled, it too is mapped to the first output file.
The presence of -an only suppresses automatic or manual stream selection of audio streams, not outputs sent from filtergraphs. Both these mapped streams shall be ordered before the mapped stream in out1. The video, audio and subtitle streams mapped to out2.
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. 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.
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. An empty stream specifier matches all streams. For example, -codec copy or -codec: copy would copy all the streams without reencoding.
Matches the stream with this index. Stream numbering is based on the order of the streams as detected by libavformat except when a program ID is also specified. In this case it is based on the ordering of the streams in the program.
Otherwise, it matches all streams of the specified type. 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 value. 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.
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. Print complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc.
Use the -decoders option to get a list of all decoders. Use the -encoders option to get a list of all encoders. Use the -formats option to get a list of all demuxers and muxers. Use the -formats option to get a list of all muxers and demuxers.
Use the -filters option to get a list of all filters. Use the -bsfs option to get a list of all bitstream filters. Use the -protocols option to get a list of all protocols. 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.
Indicates that repeated log output should not be compressed to the first line and the "Last message repeated n times" line will be omitted. Indicates that log output should add a [level] prefix to each message line. This can be used as an alternative to log coloring, e. Only show fatal errors which could lead the process to crash, such as an assertion failure. This is not currently used for anything. 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. For example to enable repeated log output, add the level prefix, and set loglevel to verbose :. Another example that enables repeated log output without affecting current state of level prefix flag or loglevel :.
By default the program logs to stderr. If coloring is supported by the terminal, colors are used to mark errors and warnings. This file can be useful for bug reports. It also implies -loglevel debug. For example, to output a report to a file named ffreport.
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. Override detection of CPU count. Exercise extreme caution when using this option. 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. These options are specific to the given container, device or codec. For example to write an ID3v2. In the above example, a multichannel audio stream is mapped twice for output. The first instance is encoded with codec ac3 and bitrate k.
The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of k is specified for it using absolute index of the output stream. Force input or output file format. The format is normally auto detected for input files and guessed from the file extension for output files, so this option is not needed in most cases.
Set number of times input stream shall be looped. Loop 0 means no loop, loop -1 means infinite loop. Allow forcing a decoder of a different media type than the one detected or designated by the demuxer. Useful for decoding media data muxed as data streams. Select an encoder when used before an output file or a decoder when used before an input file for one or more streams. When used as an input option before -i , limit the duration of data read from the input file. When used as an output option before an output url , stop writing the output after its duration reaches duration.
Stop writing the output or reading the input at position. Set the file size limit, expressed in bytes. No further chunk of bytes is written after the limit is exceeded. The size of the output file is slightly more than the requested file size. When used as an input option before -i , seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position.
When used as an output option before an output url , decodes but discards input until the timestamps reach position. Like the -ss option but relative to the "end of file". That is negative values are earlier in the file, 0 is at EOF. The offset is added to the timestamps of the input files.
Specifying a positive offset means that the corresponding streams are delayed by the time duration specified in offset. It is also possible to delete metadata by using an empty value. This option overrides the disposition copied from the input stream. It is also possible to delete the disposition by setting it to 0. To make the second subtitle stream the default stream and remove the default disposition from the first subtitle stream:.
Specify target file type vcd , svcd , dvd , dv , dv All the format options bitrate, codecs, buffer sizes are then set automatically. You can just type:. Nevertheless you can specify additional options as long as you know they do not conflict with the standard, as in:. The dv50 target is identical to the dv target except that the pixel format set is yuvp for all three standards. Any user-set value for a parameter above will override the target preset value.
In that case, the output may not comply with the target standard. As an input option, blocks all data streams of a file from being filtered or being automatically selected or mapped for any output. See -discard option to disable streams individually. As an output option, disables data recording i. For full manual control see the -map option. Set the number of data frames to output. This is an obsolete alias for -frames:d , which you should use instead. Use fixed quality scale VBR.
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 syntax. This option is similar to -filter , the only difference is that its argument is the name of the file from which a filtergraph description is to be read. This boolean option determines if the filtergraph s to which this stream is fed gets reinitialized when input frame parameters change mid-stream.
This option is enabled by default as most video and all audio filters cannot handle deviation in input frame properties. Upon reinitialization, existing filter state is lost, like e.
Any frames buffered at time of reinitialization are lost. The properties where a change triggers reinitialization are, for video, frame resolution or pixel format; for audio, sample format, sample rate, channel count or channel layout. Defines how many threads are used to process a filter pipeline. Each pipeline will produce a thread pool with this many threads available for parallel processing. The default is the number of available CPUs.
It is on by default, to explicitly disable it you need to specify -nostats. Progress information is written periodically and at the end of the encoding process. The last key of a sequence of progress information is always "progress". Enable interaction on standard input. On by default unless standard input is used as an input. To explicitly disable interaction you need to specify -nostdin.
Disabling interaction on standard input is useful, for example, if ffmpeg is in the background process group. Roughly the same result can be achieved with ffmpeg Print timestamp information.
0コメント