Go to the documentation of this file.
21 #ifndef AVFORMAT_AVFORMAT_H
22 #define AVFORMAT_AVFORMAT_H
321 #ifndef HAVE_AV_CONFIG_H
458 #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)
459 #define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
461 #define AVPROBE_SCORE_EXTENSION 50
462 #define AVPROBE_SCORE_MIME 75
463 #define AVPROBE_SCORE_MAX 100
465 #define AVPROBE_PADDING_SIZE 32
468 #define AVFMT_NOFILE 0x0001
469 #define AVFMT_NEEDNUMBER 0x0002
476 #define AVFMT_EXPERIMENTAL 0x0004
477 #define AVFMT_SHOW_IDS 0x0008
478 #define AVFMT_GLOBALHEADER 0x0040
479 #define AVFMT_NOTIMESTAMPS 0x0080
480 #define AVFMT_GENERIC_INDEX 0x0100
481 #define AVFMT_TS_DISCONT 0x0200
482 #define AVFMT_VARIABLE_FPS 0x0400
483 #define AVFMT_NODIMENSIONS 0x0800
484 #define AVFMT_NOSTREAMS 0x1000
485 #define AVFMT_NOBINSEARCH 0x2000
486 #define AVFMT_NOGENSEARCH 0x4000
487 #define AVFMT_NO_BYTE_SEEK 0x8000
488 #if FF_API_ALLOW_FLUSH
489 #define AVFMT_ALLOW_FLUSH 0x10000
491 #define AVFMT_TS_NONSTRICT 0x20000
494 #define AVFMT_TS_NEGATIVE 0x40000
503 #define AVFMT_SEEK_TO_PTS 0x4000000
610 #define AVINDEX_KEYFRAME 0x0001
611 #define AVINDEX_DISCARD_FRAME 0x0002
623 #define AV_DISPOSITION_DEFAULT (1 << 0)
631 #define AV_DISPOSITION_DUB (1 << 1)
637 #define AV_DISPOSITION_ORIGINAL (1 << 2)
641 #define AV_DISPOSITION_COMMENT (1 << 3)
645 #define AV_DISPOSITION_LYRICS (1 << 4)
649 #define AV_DISPOSITION_KARAOKE (1 << 5)
656 #define AV_DISPOSITION_FORCED (1 << 6)
660 #define AV_DISPOSITION_HEARING_IMPAIRED (1 << 7)
664 #define AV_DISPOSITION_VISUAL_IMPAIRED (1 << 8)
668 #define AV_DISPOSITION_CLEAN_EFFECTS (1 << 9)
676 #define AV_DISPOSITION_ATTACHED_PIC (1 << 10)
681 #define AV_DISPOSITION_TIMED_THUMBNAILS (1 << 11)
688 #define AV_DISPOSITION_NON_DIEGETIC (1 << 12)
694 #define AV_DISPOSITION_CAPTIONS (1 << 16)
700 #define AV_DISPOSITION_DESCRIPTIONS (1 << 17)
705 #define AV_DISPOSITION_METADATA (1 << 18)
711 #define AV_DISPOSITION_DEPENDENT (1 << 19)
715 #define AV_DISPOSITION_STILL_IMAGE (1 << 20)
720 #define AV_DISPOSITION_MULTILAYER (1 << 21)
739 #define AV_PTS_WRAP_IGNORE 0
740 #define AV_PTS_WRAP_ADD_OFFSET 1
741 #define AV_PTS_WRAP_SUB_OFFSET -1
850 #if FF_API_AVSTREAM_SIDE_DATA
900 #define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001
906 #define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1)
1218 #define AV_PROGRAM_RUNNING 1
1253 #define AVFMTCTX_NOHEADER 0x0001
1255 #define AVFMTCTX_UNSEEKABLE 0x0002
1454 #define AVFMT_FLAG_GENPTS 0x0001
1455 #define AVFMT_FLAG_IGNIDX 0x0002
1456 #define AVFMT_FLAG_NONBLOCK 0x0004
1457 #define AVFMT_FLAG_IGNDTS 0x0008
1458 #define AVFMT_FLAG_NOFILLIN 0x0010
1459 #define AVFMT_FLAG_NOPARSE 0x0020
1460 #define AVFMT_FLAG_NOBUFFER 0x0040
1461 #define AVFMT_FLAG_CUSTOM_IO 0x0080
1462 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
1463 #define AVFMT_FLAG_FLUSH_PACKETS 0x0200
1470 #define AVFMT_FLAG_BITEXACT 0x0400
1471 #define AVFMT_FLAG_SORT_DTS 0x10000
1472 #define AVFMT_FLAG_FAST_SEEK 0x80000
1473 #if FF_API_LAVF_SHORTEST
1474 #define AVFMT_FLAG_SHORTEST 0x100000
1476 #define AVFMT_FLAG_AUTO_BSF 0x200000
1581 #define FF_FDEBUG_TS 0x0001
1679 #define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001
1690 #define AVFMT_AVOID_NEG_TS_AUTO -1
1691 #define AVFMT_AVOID_NEG_TS_DISABLED 0
1692 #define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1
1693 #define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2
1932 #if FF_API_AVSTREAM_SIDE_DATA
1952 #if FF_API_GET_DUR_ESTIMATE_METHOD
2140 #if FF_API_AVSTREAM_SIDE_DATA
2172 uint8_t *av_stream_new_side_data(
AVStream *stream,
2187 uint8_t *av_stream_get_side_data(
const AVStream *stream,
2250 int is_opened,
int *score_max);
2260 int is_opened,
int *score_ret);
2280 const char *
url,
void *logctx,
2281 unsigned int offset,
unsigned int max_probe_size);
2287 const char *
url,
void *logctx,
2288 unsigned int offset,
unsigned int max_probe_size);
2381 int wanted_stream_nb,
2383 const struct AVCodec **decoder_ret,
2500 #define AVSEEK_FLAG_BACKWARD 1
2501 #define AVSEEK_FLAG_BYTE 2
2502 #define AVSEEK_FLAG_ANY 4
2503 #define AVSEEK_FLAG_FRAME 8
2510 #define AVSTREAM_INIT_IN_WRITE_HEADER 0
2511 #define AVSTREAM_INIT_IN_INIT_OUTPUT 1
2712 const char *filename,
2713 const char *mime_type);
2719 const char *filename,
const char *mime_type,
2923 char *authorization,
int authorization_size,
2924 char *hostname,
int hostname_size,
2926 char *path,
int path_size,
2946 #define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1
2962 const char *path,
int number,
int flags);
2965 const char *path,
int number);
3001 int av_match_ext(
const char *filename,
const char *extensions);
3014 int std_compliance);
3098 #if FF_API_INTERNAL_TIMING
3099 enum AVTimebaseSource {
3100 AVFMT_TBCF_AUTO = -1,
3103 #if FF_API_R_FRAME_RATE
3104 AVFMT_TBCF_R_FRAMERATE,
3112 int avformat_transfer_internal_stream_timing_info(
const AVOutputFormat *ofmt,
3114 enum AVTimebaseSource
copy_tb);
const struct AVCodecTag * avformat_get_riff_video_tags(void)
union AVStreamGroup::@366 params
Group type-specific parameters.
av_format_control_message control_message_cb
Callback used by devices to communicate with application.
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the specified file stream.
enum AVCodecID av_codec_get_id(const struct AVCodecTag *const *tags, unsigned int tag)
Get the AVCodecID for the given codec tag tag.
AVStreamGroup ** stream_groups
A list of all stream groups in the file.
int64_t id
Group type-specific group ID.
struct AVStreamGroupTileGrid * tile_grid
int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
Probe a bytestream to determine the input format.
unsigned int nb_stream_indexes
int max_chunk_duration
Max chunk time in microseconds.
unsigned int max_index_size
Maximum amount of memory in bytes to use for the index of each stream.
unsigned int nb_chapters
Number of chapters in AVChapter array.
This struct describes the properties of an encoded stream.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
int horizontal_offset
Offset in pixels from the left edge of the canvas where the actual image meant for presentation start...
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
AVProgram * av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s)
Find the programs which belong to a given stream.
int audio_preload
Audio preload in microseconds.
char * protocol_blacklist
',' separated list of disallowed protocols.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
This structure describes decoded (raw) audio or video data.
AVStream ** streams
A list of all streams in the file.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
int strict_std_compliance
Allow non-standard and experimental extension.
int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
Return in 'buf' the path with 'd' replaced by a number.
int64_t max_interleave_delta
Maximum buffering duration for interleaving.
AVRational avg_frame_rate
Average framerate.
int vertical_offset
Offset in pixels from the top edge of the canvas where the actual image meant for presentation starts...
enum AVDurationEstimationMethod duration_estimation_method
The duration field can be estimated through various ways, and this field can be used to know how the ...
int buf_size
Size of buf except extra allocated bytes.
int vertical
Offset in pixels from the top edge of the canvas where the tile should be placed.
int64_t probesize
Maximum number of bytes read from input in order to determine stream properties.
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
Test whether a muxer supports uncoded frame.
av_warn_unused_result int avformat_init_output(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and initialize the codec, but do not write the header.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
enum AVCodecID video_codec_id
Forced video codec_id.
const AVIndexEntry * avformat_index_get_entry_from_timestamp(AVStream *st, int64_t wanted_timestamp, int flags)
Get the AVIndexEntry corresponding to the given timestamp.
int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
Callback for checking whether to abort blocking functions.
int av_filename_number_test(const char *filename)
Check whether filename actually is a numbered sequence generator.
int avformat_queue_attached_pictures(AVFormatContext *s)
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
int flush_packets
Flush the I/O context after each packet.
const AVClass * av_class
A class for AVOptions.
const struct AVCodecTag * avformat_get_mov_video_tags(void)
unsigned int max_picture_buffer
Maximum amount of memory in bytes to use for buffering frames obtained from realtime capture devices.
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
unsigned avformat_version(void)
Return the LIBAVFORMAT_VERSION_INT constant.
const char * avformat_stream_group_name(enum AVStreamGroupParamsType type)
int coded_width
Width of the canvas.
enum AVDiscard discard
selects which program to discard and which to feed to the caller
uint8_t * dump_separator
dump format separator.
const AVClass * av_stream_group_get_class(void)
Get the AVClass for AVStreamGroup.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
int coded_height
Width of the canvas.
AVStreamGroupLCEVC is meant to define the relation between video streams and a data stream containing...
AVProgram * av_new_program(AVFormatContext *s, int id)
int64_t duration
Decoding: duration of the stream, in stream time base.
int av_codec_get_tag2(const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag)
Get the codec tag for the given codec id.
const AVInputFormat * av_probe_input_format3(const AVProbeData *pd, int is_opened, int *score_ret)
Guess the file format.
int avformat_network_init(void)
Do global initialization of network libraries.
int event_flags
Flags indicating events happening on the file, a combination of AVFMT_EVENT_FLAG_*.
AVPacket attached_pic
For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached pictu...
const struct AVCodecTag * avformat_get_riff_audio_tags(void)
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
int max_ts_probe
Maximum number of packets to read while waiting for the first timestamp.
char * format_whitelist
',' separated list of allowed demuxers.
int format_probesize
Maximum number of bytes read from input in order to identify the input format.
int avformat_index_get_entries_count(const AVStream *st)
Get the index entry count for the given AVStream.
AVDictionary * metadata
Metadata that applies to the whole file.
const char * mime_type
mime_type, when known.
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Print detailed information about the input or output format, such as duration, bitrate,...
int ctx_flags
Flags signalling stream properties.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
Test if the given container can store a codec.
int64_t end
chapter start/end time in time_base units
const struct AVCodec * video_codec
Forced video codec.
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Seek to the keyframe at timestamp.
int flags
Flags modifying the (de)muxer behaviour.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
const struct AVInputFormat * iformat
The input container format.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int av_match_ext(const char *filename, const char *extensions)
Return a positive value if the given filename has one of the given extensions, 0 otherwise.
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
int64_t output_ts_offset
Output timestamp offset, in microseconds.
unsigned int index
Group index in AVFormatContext.
int av_read_play(AVFormatContext *s)
Start playing a network-based stream (e.g.
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, struct AVFrame *frame)
Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.
int avformat_flush(AVFormatContext *s)
Discard all internally buffered data.
int min_distance
Minimum distance between this and the previous keyframe, used to avoid unneeded searching.
const struct AVCodec * data_codec
Forced data codec.
int probe_score
format probing score.
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
int64_t max_analyze_duration
Maximum duration (in AV_TIME_BASE units) of the data read from input in avformat_find_stream_info().
unsigned int correct_ts_overflow
Correct single timestamp overflows.
const AVInputFormat * av_probe_input_format2(const AVProbeData *pd, int is_opened, int *score_max)
Guess the file format.
enum AVCodecID audio_codec_id
Forced audio codec_id.
int height
Height of the final image for presentation.
const AVInputFormat * av_probe_input_format(const AVProbeData *pd, int is_opened)
Guess the file format.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Describe the class of an AVClass context structure.
int av_write_uncoded_frame(AVFormatContext *s, int stream_index, struct AVFrame *frame)
Write an uncoded frame to an output media file.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
int max_streams
The maximum number of streams.
int fps_probe_size
The number of frames used for determining the framerate in avformat_find_stream_info().
AVPacketSideData * coded_side_data
Additional data associated with the grid.
Rational number (pair of numerator and denominator).
char * protocol_whitelist
',' separated list of allowed protocols.
AVIOContext * pb
I/O context.
int64_t duration_probesize
Maximum number of bytes read from input in order to determine stream durations when using estimate_ti...
This structure contains the data a format has to probe a file.
unsigned int * stream_index
int skip_estimate_duration_from_pts
Skip duration calcuation in estimate_timings_from_pts.
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
const struct AVCodec * audio_codec
Forced audio codec.
int64_t nb_frames
number of frames in this stream if known or 0
AVCodecID
Identify the syntax and semantics of the bitstream.
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st)
Add an already allocated stream to a stream group.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int metadata_header_padding
Number of bytes to be written as padding in a metadata header.
const OptionDef options[]
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
int64_t pts_wrap_reference
reference dts for wrap detection
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the stream st contained in s is matched by the stream specifier spec.
int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, const struct AVCodec **decoder_ret, int flags)
Find the "best" stream in the file.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
unsigned int av_codec_get_tag(const struct AVCodecTag *const *tags, enum AVCodecID id)
Get the codec tag for the given codec id id.
char * url
input or output URL.
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
struct AVIAMFAudioElement * iamf_audio_element
int event_flags
Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*.
int pts_wrap_behavior
behavior on wrap detection
const AVInputFormat * av_demuxer_iterate(void **opaque)
Iterate over all registered demuxers.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
#define attribute_deprecated
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
unsigned int nb_tiles
Amount of tiles in the grid.
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
Generate an SDP for an RTP session.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
unsigned int lcevc_index
Index of the LCEVC data stream in AVStreamGroup.
struct AVStreamGroupLCEVC * lcevc
int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
Like av_probe_input_buffer2() but returns 0 on success.
AVStream ** streams
A list of streams in the group.
struct AVStreamGroupTileGrid::@365 * offsets
An nb_tiles sized array of offsets in pixels from the topleft edge of the canvas, indicating where ea...
struct AVIAMFMixPresentation * iamf_mix_presentation
int64_t skip_initial_bytes
Skip initial bytes when opening stream.
#define av_warn_unused_result
int error_recognition
Error recognition; higher values will detect more errors but may misdetect some more or less valid pa...
int nb_coded_side_data
Amount of entries in coded_side_data.
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
int width
Width of the final image for presentation.
int64_t id
unique ID to identify the chapter
const struct AVCodec * subtitle_codec
Forced subtitle codec.
const struct AVCodecTag * avformat_get_mov_audio_tags(void)
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
const AVIndexEntry * avformat_index_get_entry(AVStream *st, int idx)
Get the AVIndexEntry corresponding to the given index.
const AVClass * av_class
A class for AVOptions.
int av_get_output_timestamp(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
Get timing information for the data currently output.
char * codec_whitelist
',' separated list of allowed decoders.
int avoid_negative_ts
Avoid negative timestamps during muxing.
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
int av_find_default_stream_index(AVFormatContext *s)
int io_repositioned
IO repositioned flag.
New fields can be added to the end with minor version bumps.
int av_read_pause(AVFormatContext *s)
Pause a network-based stream (e.g.
const AVIOInterruptCB int_cb
int horizontal
Offset in pixels from the left edge of the canvas where the tile should be placed.
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
int id
Format-specific stream ID.
AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, struct AVFrame *frame)
Guess the frame rate, based on both the container and codec information.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the log.
const struct AVOutputFormat * oformat
The output container format.
AVDictionary * metadata
Metadata that applies to the whole group.
const AVClass * av_class
A class for logging and AVOptions.
enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
Guess the codec ID based upon muxer and filename.
int avformat_network_deinit(void)
Undo the initialization done by avformat_network_init.
int debug
Flags to enable debugging.
enum AVCodecID data_codec_id
Forced Data codec_id.
int index
stream index in AVFormatContext
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
static int format_name(const char *buf, char **s, int index, const char *varname)
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
int seek2any
Force seeking to any (also non key) frames.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
AVRational r_frame_rate
Real base framerate of the stream.
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
int width
Width of the final stream for presentation.
const AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
const char * avformat_license(void)
Return the libavformat license.
const AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
Return the output format in the list of registered output formats which best matches the provided par...
enum AVStreamGroupParamsType type
Group type.
int64_t start_time_realtime
Start time of the stream in real world time, in microseconds since the Unix epoch (00:00 1st January ...
const char * avformat_configuration(void)
Return the libavformat build-time configuration.
AVStreamGroup * avformat_stream_group_create(AVFormatContext *s, enum AVStreamGroupParamsType type, AVDictionary **options)
Add a new empty stream group to a media file.
unsigned int nb_stream_groups
Number of elements in AVFormatContext.stream_groups.
int height
Height of the final image for presentation.
int max_probe_packets
Maximum number of packets that can be probed.
int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index, struct AVFrame *frame)
Write an uncoded frame to an output media file.
This structure stores compressed data.
int use_wallclock_as_timestamps
forces the use of wallclock timestamps as pts/dts of packets This has undefined results in the presen...
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file ensuring correct interleaving.
int(* io_close2)(struct AVFormatContext *s, AVIOContext *pb)
A callback for closing the streams opened with AVFormatContext.io_open().
static float distance(float x, float y, int band)
#define flags(name, subs,...)
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds.
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the log.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
const AVClass * av_stream_get_class(void)
Get the AVClass for AVStream.
int avio_flags
avio flags, used to force AVIO_FLAG_DIRECT.
unsigned int idx
Index of the stream in the group this tile references.
int pts_wrap_bits
Number of bits in timestamps.
AVRational time_base
time base in which the start/end timestamps are specified
void * priv_data
Format private data.
uint8_t background[4]
The pixel value per channel in RGBA format used if no pixel of any tile is located at a particular pi...
int max_chunk_size
Max chunk size in bytes Note, not all formats support this and unpredictable things may happen if it ...
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx)
enum AVCodecID subtitle_codec_id
Forced subtitle codec_id.
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the specified file stream.