debug - encoding: Set by user. - decoding: Set by user.
Which multithreading methods are in use by the codec. - encoding: Set by libavcodec. - decoding: Set by libavcodec.
Type of service that the audio stream conveys. - encoding: Set by user. - decoding: Set by libavcodec.
information on struct for av_log - set by avcodec_alloc_context3
@deprecated use encoder private options instead
qscale factor between IP and B-frames If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset). If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). - encoding: Set by user. - decoding: unused
qscale offset between IP and B-frames - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
- encoding: Set by user. - decoding: unused
the average bitrate - encoding: Set by user; unused for constant quantizer encoding. - decoding: Set by libavcodec. 0 or some bitrate if this info is available in the stream.
number of bits the bitstream is allowed to diverge from the reference. the reference can be CBR (for CBR pass1) or VBR (for pass2) - encoding: Set by user; unused for constant quantizer encoding. - decoding: unused
bits per sample/pixel from the demuxer (needed for huffyuv). - encoding: Set by libavcodec. - decoding: Set by user.
Bits per sample/pixel of internal libavcodec pixel/sample format. - encoding: set by user. - decoding: set by libavcodec.
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs.
@deprecated use encoder private options instead
@deprecated use encoder private options instead
Audio channel layout. - encoding: set by user. - decoding: set by user, may be overwritten by libavcodec.
< number of audio channels
custom intra quantization matrix Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix() - encoding: Set by user, can be NULL. - decoding: unused.
This defines the location of chroma samples. - encoding: Set by user - decoding: Set by libavcodec
@deprecated use encoder private options instead
AVCodecDescriptor Code outside libavcodec should access this field using: av_codec_{get,set}codec_descriptor(avctx) - encoding: unused. - decoding: set by libavcodec.
@deprecated this field is not used for anything in libavcodec
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). This is used to work around some encoder bugs. A demuxer should set this to what is stored in the field used to identify the codec. If there are multiple such fields in a container then the demuxer should choose the one which maximizes the information about the used codec. If the codec tag field in a container is larger than 32 bits then the demuxer should remap the longer ID to 32 bits with a table or other structure. Alternatively a new extra_codec_tag + size could be added but for this a clear advantage must be demonstrated first. - encoding: Set by user, if not then the default based on codec_id will be used. - decoding: Set by user, will be converted to uppercase by libavcodec during init.
',' separated list of allowed decoders. If NULL then all are allowed - encoding: unused - decoding: set by user through AVOPtions (NO direct access)
the picture in the bitstream - encoding: Set by libavcodec. - decoding: unused
Bitstream width / height, may be different from width/height e.g. when the decoded frame is cropped before being output or lowres is enabled.
Additional data associated with the entire coded stream.
Bitstream width / height, may be different from width/height e.g. when the decoded frame is cropped before being output or lowres is enabled.
@deprecated use encoder private options instead
Chromaticity coordinates of the source primaries. - encoding: Set by user - decoding: Set by libavcodec
MPEG vs JPEG YUV range. - encoding: Set by user - decoding: Set by libavcodec
Color Transfer Characteristic. - encoding: Set by user - decoding: Set by libavcodec
YUV colorspace type. - encoding: Set by user - decoding: Set by libavcodec
- encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
Audio cutoff bandwidth (0 means "automatic") - encoding: Set by user. - decoding: unused
darkness masking (0-> disabled) - encoding: Set by user. - decoding: unused
DCT algorithm, see FF_DCT_* below - encoding: Set by user. - decoding: unused
debug motion vectors Code outside libavcodec should access this field using AVOptions - encoding: Set by user. - decoding: Set by user.
debug Code outside libavcodec should access this field using AVOptions - encoding: Set by user. - decoding: Set by user.
Codec delay.
ME diamond size & shape - encoding: Set by user. - decoding: unused
If non NULL, 'draw_horiz_band' is called by the libavcodec decoder to draw a horizontal band. It improves cache usage. Not all codecs can do that. You must check the codec capabilities beforehand. When multithreading is used, it may be called from multiple threads at the same time; threads might draw different parts of the same AVFrame, or multiple AVFrames, and there is no guarantee that slices will be drawn in order. The function is also used by hardware acceleration APIs. It is called at least once during frame decoding to pass the data needed for hardware render. In that mode instead of pixel data, AVFrame points to a structure specific to the acceleration API. The application reads the structure and can change some fields to indicate progress or mark state. - encoding: unused - decoding: Set by user. @param height the height of the slice @param y the y position of the slice @param type 1->top field, 2->bottom field, 3->frame @param offset offset into the AVFrame.data from which the slice should be read
DTG active format information (additional aspect ratio information only used in DVB MPEG-2 transport streams) 0 if not set.
dump format separator. can be ", " or "\n " or anything else Code outside libavcodec should access this field using AVOptions (NO direct access). - encoding: Set by user. - decoding: Set by user.
Error recognition; may misdetect some more or less valid parts as errors. - encoding: unused - decoding: Set by user.
error - encoding: Set by libavcodec if flags&CODEC_FLAG_PSNR. - decoding: unused
error concealment flags - encoding: unused - decoding: Set by user.
@deprecated use the 'error_rate' private AVOption of the mpegvideo encoders
The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. @param count the number of things to execute - encoding: Set by libavcodec, user can override. - decoding: Set by libavcodec, user can override.
The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. Also see avcodec_thread_init and e.g. the --enable-pthread configure option. @param c context passed also to func @param count the number of things to execute @param arg2 argument passed unchanged to func @param ret return values of executed functions, must have space for "count" values. May be NULL. @param func function that will be called count times, with jobnr from 0 to count-1. threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no two instances of func executing at the same time will have the same threadnr. @return always 0 currently, but code should handle a future improvement where when any call to func returns < 0 no further calls to func may be done and < 0 is returned. - encoding: Set by libavcodec, user can override. - decoding: Set by libavcodec, user can override.
some codecs need / can use extradata like Huffman tables. mjpeg: Huffman tables rv10: additional flags mpeg4: global headers (they can be in the bitstream or here) The allocated memory should be FF_INPUT_BUFFER_PADDING_SIZE bytes larger than extradata_size to avoid problems if it is read with the bitstream reader. The bytewise contents of extradata must not depend on the architecture or CPU endianness. - encoding: Set/allocated/freed by libavcodec. - decoding: Set/allocated/freed by user.
Field order - encoding: set by libavcodec - decoding: Set by user.
CODEC_FLAG_*. - encoding: Set by user. - decoding: Set by user.
CODEC_FLAG2_* - encoding: Set by user. - decoding: Set by user.
@deprecated this field is unused
Frame counter, set by libavcodec.
Number of samples per channel in an audio frame.
@deprecated use encoder private options instead
@deprecated use encoder private options instead
@deprecated use encoder private options instead
@deprecated use encoder private options instead
- decoding: For codecs that store a framerate value in the compressed bitstream, the decoder may export it here. { 0, 1} when unknown. - encoding: May be used to signal the framerate of CFR content to an encoder.
This callback is called at the beginning of each frame to get data buffer(s) for it. There may be one contiguous buffer for all the data or there may be a buffer per each data plane or anything in between. What this means is, you may set however many entries in buf[] you feel necessary. Each buffer must be reference-counted using the AVBuffer API (see description of buf[] below).
callback to negotiate the pixelFormat @param fmt is the list of formats which are supported by the codec, it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. The first is always the native one. @note The callback may be called again immediately if initialization for the selected (hardware-accelerated) pixel format failed. @warning Behavior is undefined if the callback returns a value not in the fmt list of formats. @return the chosen format - encoding: unused - decoding: Set by user, if not set the native format will be chosen.
Global quality for codecs which cannot change it per frame. This should be proportional to MPEG-1/2/4 qscale. - encoding: Set by user. - decoding: unused
the number of pictures in a group of pictures, or 0 for intra_only - encoding: Set by user. - decoding: unused
Size of the frame reordering buffer in the decoder. For MPEG-2 it is 1 IPB or 0 low delay IP. - encoding: Set by libavcodec. - decoding: Set by libavcodec.
picture width / height.
Hardware accelerator in use - encoding: unused. - decoding: Set by libavcodec
Hardware accelerator context. For some hardware accelerators, a global context needs to be provided by the user. In that case, this holds display-dependent data FFmpeg cannot instantiate itself. Please refer to the FFmpeg HW accelerator documentation to know how to fill this is. e.g. for VA API, this is a struct vaapi_context. - encoding: unused - decoding: Set by user
qscale factor between P and I-frames If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset). If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). - encoding: Set by user. - decoding: unused
qscale offset between P and I-frames - encoding: Set by user. - decoding: unused
IDCT algorithm, see FF_IDCT_* below. - encoding: Set by user. - decoding: Set by user.
interlaced DCT comparison function - encoding: Set by user. - decoding: unused
Audio only. The number of "priming" samples (padding) inserted by the encoder at the beginning of the audio. I.e. this number of leading decoded samples must be discarded by the caller to get the original audio without leading padding.
custom inter quantization matrix - encoding: Set by user, can be NULL. - decoding: Set by libavcodec.
@deprecated use encoder private option instead
Private context used for internal data.
precision of the intra DC coefficient - 8 - encoding: Set by user. - decoding: unused
custom intra quantization matrix - encoding: Set by user, can be NULL. - decoding: Set by libavcodec.
@deprecated use encoder private option instead
minimum GOP size - encoding: Set by user. - decoding: unused
amount of previous MV predictors (2a+1 x 2a+1 square) - encoding: Set by user. - decoding: unused
level - encoding: Set by user. - decoding: Set by libavcodec.
@deprecated use encoder private options instead
@deprecated use encoder private options instead
low resolution decoding, 1-> 1/2 size, 2->1/4 size - encoding: unused - decoding: Set by user. Code outside libavcodec should access this field using: av_codec_{get,set}lowres(avctx)
low resolution decoding, 1-> 1/2 size, 2->1/4 size - encoding: unused - decoding: Set by user. Code outside libavcodec should access this field using: av_codec_{get,set}lowres(avctx)
luminance masking (0-> disabled) - encoding: Set by user. - decoding: unused
maximum number of B-frames between non-B-frames Note: The output will be delayed by max_b_frames+1 relative to the input. - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
maximum quantizer difference between frames - encoding: Set by user. - decoding: unused
macroblock comparison function (not supported yet) - encoding: Set by user. - decoding: unused
macroblock decision mode - encoding: Set by user. - decoding: unused
maximum MB lagrange multipler - encoding: Set by user. - decoding: unused
minimum MB lagrange multipler - encoding: Set by user. - decoding: unused
@deprecated this field is unused
motion estimation comparison function - encoding: Set by user. - decoding: unused
This option does nothing @deprecated use codec private options instead
@deprecated use encoder private options instead
motion estimation prepass comparison function - encoding: Set by user. - decoding: unused
maximum motion estimation search range in subpel units If 0 then no limit.
subpixel motion estimation comparison function - encoding: Set by user. - decoding: unused
subpel ME quality - encoding: Set by user. - decoding: unused
@deprecated this field is unused
@deprecated use encoder private options instead
@deprecated use encoder private options instead
Note: Value depends upon the compare function used for fullpel ME. - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
noise vs. sse weight for the nsse comparison function - encoding: Set by user. - decoding: unused
Private data of the user, can be used to carry app specific stuff. - encoding: Set by user. - decoding: Set by user.
p block masking (0-> disabled) - encoding: Set by user. - decoding: unused
Pixel format, see AV_PIX_FMT_xxx. May be set by the demuxer if known from headers. May be overridden by the decoder if it knows better.
Timebase in which pkt_dts/pts and AVPacket.dts/pts are. Code outside libavcodec should access this field using: av_codec_{get,set}pkt_timebase(avctx) - encoding unused. - decoding set by user.
ME prepass diamond size & shape - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
@deprecated use encoder private options instead
profile - encoding: Set by user. - decoding: Set by libavcodec.
DTS of the last frame
PTS of the last frame
Number of incorrect DTS values so far
* Current statistics for PTS correction. * - decoding: maintained and used by libavcodec, not intended to be used by user apps * - encoding: unused *//// Number of incorrect PTS values so fa
< amount of qscale smoothing over time (0.0-1.0)
< amount of qscale change between easy & hard scenes (0.0-1.0)
maximum quantizer - encoding: Set by user. - decoding: unused
minimum quantizer - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
decoder bitstream buffer size - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
Number of bits which should be loaded into the rc buffer before decoding starts. - encoding: Set by user. - decoding: unused
Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow. - encoding: Set by user. - decoding: unused.
maximum bitrate - encoding: Set by user. - decoding: Set by libavcodec.
minimum bitrate - encoding: Set by user. - decoding: unused
Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow. - encoding: Set by user. - decoding: unused.
ratecontrol override, see RcOverride - encoding: Allocated/set/freed by user. - decoding: unused
@deprecated use encoder private options instead
@deprecated use codec private option instead
If non-zero, the decoded audio and video frames returned from avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted and are valid indefinitely. The caller must free them with av_frame_unref() when they are not needed anymore. Otherwise, the decoded frames must not be freed by the caller and are only valid until the next decode call.
number of reference frames - encoding: Set by user. - decoding: Set by lavc.
opaque 64bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque - encoding: unused - decoding: Set by user.
Request decoder to use this channel layout if it can (0 for default) - encoding: unused - decoding: Set by user.
desired sample format - encoding: Not used. - decoding: Set by user. Decoder will decode to this format if it can.
@deprecated unused
@deprecated use encoder private options instead
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel. Numerator and denominator must be relatively prime and smaller than 256 for some video standards. - encoding: Set by user. - decoding: Set by libavcodec.
* audio sample format * - encoding: Set by user. * - decoding: Set by libavcodec. *////< sample forma
< samples per second
Multiplied by qscale for each frame and added to scene_change_score. - encoding: Set by user. - decoding: unused
@deprecated use encoder private options instead
Number of samples to skip after a discontinuity - decoding: unused - encoding: set by libavcodec
Encoding only. Allow encoders to output packets that do not contain any encoded data, only side data.
Skip processing alpha if supported by codec. Note that if the format uses pre-multiplied alpha (common with VP6, and recommended due to better video quality/compression) the image will look as if alpha-blended onto a black background. However for formats that do not use pre-multiplied alpha there might be serious artefacts (though e.g. libswscale currently assumes pre-multiplied alpha anyway). Code outside libavcodec should access this field using AVOptions
Number of macroblock rows at the bottom which are skipped. - encoding: unused - decoding: Set by user.
Skip decoding for selected frames. - encoding: unused - decoding: Set by user.
Skip IDCT/dequantization for selected frames. - encoding: unused - decoding: Set by user.
Skip loop filtering for selected frames. - encoding: unused - decoding: Set by user.
Number of macroblock rows at the top which are skipped. - encoding: unused - decoding: Set by user.
slice count - encoding: Set by libavcodec. - decoding: Set by user (or 0).
slice flags - encoding: unused - decoding: Set by user.
slice offsets in the frame in bytes - encoding: Set/allocated by libavcodec. - decoding: Set/allocated by user (or NULL).
Number of slices. Indicates number of picture subdivisions. Used for parallelized decoding. - encoding: Set by user - decoding: unused
spatial complexity masking (0-> disabled) - encoding: Set by user. - decoding: unused
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed here. - encoding: Allocated/set/freed by user. - decoding: unused
pass1 encoding statistics output buffer - encoding: Set by libavcodec. - decoding: unused
@deprecated this field is unused
strictly follow the standard (MPEG4, ...). - encoding: Set by user. - decoding: Set by user. Setting this to STRICT or higher means the encoder and decoder will generally do stupid things, whereas setting it to unofficial or lower will mean the encoder might produce output that is not supported by all spec-compliant decoders. Decoders don't differentiate between normal, unofficial and experimental (that is, they always try to decode things when they can) unless they are explicitly asked to behave stupidly (=strictly conform to the specs)
Character encoding of the input subtitles file. - decoding: set by user - encoding: unused
Subtitles character encoding mode. Formats or codecs might be adjusting this setting (if they are doing the conversion themselves for instance). - decoding: set by libavcodec - encoding: unused
Header containing style information for text subtitles. For SUBTITLE_ASS subtitle type, it should contain the whole ASS [Script Info] and [V4+ Styles] section, plus the Events line and the Format line following. It shouldn't include any Dialogue line. - encoding: Set/allocated/freed by user (before avcodec_open2()) - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx. - encoding: unused. - decoding: Set by libavcodec before calling get_format()
temporary complexity masking (0-> disabled) - encoding: Set by user. - decoding: unused
thread count is used to decide how many independent tasks should be passed to execute() - encoding: Set by user. - decoding: Set by user.
Set by the client if its custom get_buffer() callback can be called synchronously from another thread, which allows faster multithreaded decoding. draw_horiz_band() will be called from other threads regardless of this setting. Ignored if the default get_buffer() is used. - encoding: Set by user. - decoding: Set by user.
Which multithreading methods to use. Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread, so clients which cannot provide future frames should not use it.
For some codecs, the time base is closer to the field rate than the frame rate. Most notably, H.264 and MPEG-2 specify time_base as half of frame duration if no telecine is used ...
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. For fixed-fps content, timebase should be 1/framerate and timestamp increments should be identically 1. This often, but not always is the inverse of the frame rate or field rate for video. - encoding: MUST be set by user. - decoding: the use of this field for decoding is deprecated. Use framerate instead.
@deprecated use encoder private options instead
trellis RD quantization - encoding: Set by user. - decoding: unused
VBV delay coded in the last frame (in periods of a 27 MHz clock). Used for compliant TS muxing. - encoding: Set by libavcodec. - decoding: unused.
picture width / height.
Work around bugs in encoders which sometimes cannot be detected automatically. - encoding: Set by user - decoding: Set by user
XVideo Motion Acceleration - encoding: forbidden - decoding: set by decoder @deprecated XvMC doesn't need it anymore.
main external API structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user applications. sizeof(AVCodecContext) must not be used outside libav*.