Buffer 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:
- video_size
-
Specify the size (width and height) of the buffered video frames. For the syntax of this option, check the "Video size" section in the ffmpeg-utils manual.
- width
-
The input video width.
- height
-
The input video height.
- pix_fmt
-
A string representing the pixel format of the buffered video frames. It may be a number corresponding to a pixel format, or a pixel format name.
- time_base
-
Specify the timebase assumed by the timestamps of the buffered frames.
- frame_rate
-
Specify the frame rate expected for the video stream.
- pixel_aspect, sar
-
The sample (pixel) aspect ratio of the input video.
- sws_param
-
Specify the optional parameters to be used for the scale filter which is automatically inserted when an input change is detected in the input size or format.
- hw_frames_ctx
-
When using a hardware pixel format, this should be a reference to an AVHWFramesContext describing input frames.
For example:
buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
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 AVPixelFormat definition in libavutil/pixfmt.h), this example corresponds to:
buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
Alternatively, the options can be specified as a flat string, but this syntax is deprecated:
width:height:pix_fmt:time_base.num:time_base.den:pixel_aspect.num:pixel_aspect.den[:sws_param]