#include <stdio.h>
#include "libavcodec/codec_par.h"
#include "libavcodec/defs.h"
#include "libavcodec/packet.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "avio.h"
#include "libavformat/version_major.h"
Go to the source code of this file.
Main libavformat public API header
Definition in file avformat.h.
Definition at line 458 of file avformat.h.
Definition at line 459 of file avformat.h.
score for file extension
Definition at line 461 of file avformat.h.
score added for matching mime type
Definition at line 462 of file avformat.h.
maximum score
Definition at line 463 of file avformat.h.
extra allocated bytes at the end of the probe buffer
Definition at line 465 of file avformat.h.
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition at line 468 of file avformat.h.
Needs 'd' in filename.
Definition at line 469 of file avformat.h.
The muxer/demuxer is experimental and should be used with caution.
It will not be selected automatically, and must be specified explicitly.
Definition at line 475 of file avformat.h.
Show format stream IDs numbers.
Definition at line 476 of file avformat.h.
Format wants global header.
Definition at line 477 of file avformat.h.
Format does not need / have any timestamps.
Definition at line 478 of file avformat.h.
Use generic index building code.
Definition at line 479 of file avformat.h.
Format allows timestamp discontinuities.
Note, muxers always require valid (monotone) timestamps
Definition at line 480 of file avformat.h.
Format allows variable fps.
Definition at line 481 of file avformat.h.
Format does not need width/height.
Definition at line 482 of file avformat.h.
Format does not require any streams.
Definition at line 483 of file avformat.h.
Format does not allow to fall back on binary search via read_timestamp.
Definition at line 484 of file avformat.h.
Format does not allow to fall back on generic search.
Definition at line 485 of file avformat.h.
Format does not allow seeking by bytes.
Definition at line 486 of file avformat.h.
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition at line 487 of file avformat.h.
Format allows muxing negative timestamps.
If not set the timestamp will be shifted in av_write_frame and av_interleaved_write_frame so they start from 0. The user or muxer can override this through AVFormatContext.avoid_negative_ts
Definition at line 490 of file avformat.h.
Seeking is based on PTS.
Definition at line 499 of file avformat.h.
Definition at line 606 of file avformat.h.
Definition at line 607 of file avformat.h.
The stream should be chosen by default among other streams of the same type, unless the user has explicitly specified otherwise.
Definition at line 617 of file avformat.h.
The stream is not in original language.
Definition at line 625 of file avformat.h.
The stream is in original language.
Definition at line 631 of file avformat.h.
The stream is a commentary track.
Definition at line 635 of file avformat.h.
The stream contains song lyrics.
Definition at line 639 of file avformat.h.
The stream contains karaoke audio.
Definition at line 643 of file avformat.h.
Track should be used during playback by default.
Useful for subtitle track that should be displayed even when user did not explicitly ask for subtitles.
Definition at line 650 of file avformat.h.
The stream is intended for hearing impaired audiences.
Definition at line 654 of file avformat.h.
The stream is intended for visually impaired audiences.
Definition at line 658 of file avformat.h.
The audio stream contains music and sound effects without voice.
Definition at line 662 of file avformat.h.
The stream is stored in the file as an attached picture/"cover art" (e.g.
APIC frame in ID3v2). The first (usually only) packet associated with it will be returned among the first few packets read from the file unless seeking takes place. It can also be accessed at any time in AVStream.attached_pic.
Definition at line 670 of file avformat.h.
The stream is sparse, and contains thumbnail images, often corresponding to chapter markers.
Only ever used with AV_DISPOSITION_ATTACHED_PIC.
Definition at line 675 of file avformat.h.
The stream is intended to be mixed with a spatial audio track.
For example, it could be used for narration or stereo music, and may remain unchanged by listener head rotation.
Definition at line 682 of file avformat.h.
The subtitle stream contains captions, providing a transcription and possibly a translation of audio.
Typically intended for hearing-impaired audiences.
Definition at line 688 of file avformat.h.
The subtitle stream contains a textual description of the video content.
Typically intended for visually-impaired audiences or for the cases where the video cannot be seen.
Definition at line 694 of file avformat.h.
The subtitle stream contains time-aligned metadata that is not intended to be directly presented to the user.
Definition at line 699 of file avformat.h.
The stream is intended to be mixed with another stream before presentation.
Used for example to signal the stream contains an image part of a HEIF grid, or for mix_type=0 in mpegts.
Definition at line 705 of file avformat.h.
The video stream contains still images.
Definition at line 709 of file avformat.h.
The video stream contains multiple layers, e.g.
stereoscopic views (cf. H.264 Annex G/H, or HEVC Annex F).
Definition at line 714 of file avformat.h.
Options for behavior on timestamp wrap detection.
ignore the wrap
Definition at line 733 of file avformat.h.
add the format specific offset on wrap detection
Definition at line 734 of file avformat.h.
subtract the format specific offset on wrap detection
Definition at line 735 of file avformat.h.
Definition at line 862 of file avformat.h.
Definition at line 868 of file avformat.h.
Definition at line 1180 of file avformat.h.
signal that no header is present (streams are added dynamically)
Definition at line 1215 of file avformat.h.
signal that the stream is definitely not seekable, and attempts to call the seek function will fail.
For some network protocols (e.g. HLS), this can change dynamically at runtime.
Definition at line 1217 of file avformat.h.
Generate missing pts even if it requires parsing future frames.
Definition at line 1416 of file avformat.h.
Ignore index.
Definition at line 1417 of file avformat.h.
Do not block when reading packets from input.
Definition at line 1418 of file avformat.h.
Ignore DTS on frames that contain both DTS & PTS.
Definition at line 1419 of file avformat.h.
Do not infer any values from other values, just return what is stored in the container.
Definition at line 1420 of file avformat.h.
Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled.
Definition at line 1421 of file avformat.h.
Do not buffer frames when possible.
Definition at line 1422 of file avformat.h.
The caller has supplied a custom AVIOContext, don't avio_close() it.
Definition at line 1423 of file avformat.h.
Discard frames marked corrupted.
Definition at line 1424 of file avformat.h.
Flush the AVIOContext every packet.
Definition at line 1425 of file avformat.h.
When muxing, try to avoid writing any random/volatile data to the output.
This includes any random IDs, real-time timestamps/dates, muxer version, etc.
This flag is mainly intended for testing.
Definition at line 1432 of file avformat.h.
try to interleave outputted packets by dts (using this flag can slow demuxing down)
Definition at line 1433 of file avformat.h.
Enable fast, but inaccurate seeks for some formats.
Definition at line 1434 of file avformat.h.
Add bitstream filters as requested by the muxer.
Definition at line 1435 of file avformat.h.
Definition at line 1540 of file avformat.h.
Definition at line 1638 of file avformat.h.
Enabled when required by target format.
Definition at line 1649 of file avformat.h.
Do not shift timestamps even when they are negative.
Definition at line 1650 of file avformat.h.
Shift timestamps so they are non negative.
Definition at line 1651 of file avformat.h.
Shift timestamps so that they start at 0.
Definition at line 1652 of file avformat.h.
seek backward
Definition at line 2374 of file avformat.h.
seeking based on position in bytes
Definition at line 2375 of file avformat.h.
seek to any frame, even non-keyframes
Definition at line 2376 of file avformat.h.
seeking based on frame number
Definition at line 2377 of file avformat.h.
Callback used by devices to communicate with application.
Definition at line 1234 of file avformat.h.
Definition at line 1237 of file avformat.h.
Enumerator | |
---|---|
AVSTREAM_PARSE_NONE | |
AVSTREAM_PARSE_FULL | full parsing and repack |
AVSTREAM_PARSE_HEADERS | Only parse headers, do not repack. |
AVSTREAM_PARSE_TIMESTAMPS | full parsing and interpolation of timestamps for frames not starting on a packet boundary |
AVSTREAM_PARSE_FULL_ONCE | full parsing and repack of the first frame only, only implemented for H.264 currently |
AVSTREAM_PARSE_FULL_RAW | full parsing and repack with timestamp and position generation by parser for raw this assumes that each packet in the file contains no demuxer level headers and just codec level data, otherwise position generation would fail |
Definition at line 587 of file avformat.h.
Enumerator | |
---|---|
AV_STREAM_GROUP_PARAMS_NONE | |
AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT | |
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION | |
AV_STREAM_GROUP_PARAMS_TILE_GRID | |
AV_STREAM_GROUP_PARAMS_LCEVC |
Definition at line 1087 of file avformat.h.
The duration of a video can be estimated through various ways, and this enum can be used to know how the duration was estimated.
Enumerator | |
---|---|
AVFMT_DURATION_FROM_PTS | Duration accurately estimated from PTSes. |
AVFMT_DURATION_FROM_STREAM | Duration estimated from a stream with a known duration. |
AVFMT_DURATION_FROM_BITRATE | Duration estimated from bitrate (less accurate) |
Definition at line 1244 of file avformat.h.
Allocate and read the payload of a packet and initialize its fields with default values.
Definition at line 98 of file utils.c.
Referenced by aa_read_packet(), aal_read_packet(), aax_read_packet(), ac4_read_packet(), ace_read_packet(), adp_read_packet(), ads_read_packet(), adts_aac_read_packet(), adx_read_packet(), aea_read_packet(), afc_read_packet(), aiff_read_packet(), aix_read_packet(), apc_read_packet(), aptx_hd_read_packet(), aptx_read_packet(), apv_read_packet(), argo_brp_read_packet(), asf_read_header(), asf_read_subpayload(), ast_read_packet(), audio_frame_obu(), av_append_packet(), avi_read_packet(), bfi_read_packet(), cdata_read_packet(), cdxl_read_packet(), cin_read_packet(), cine_read_packet(), codec2_read_packet(), dat_read_packet(), daud_packet(), dcstr_read_packet(), dfa_read_packet(), dhav_read_packet(), dsf_read_packet(), dxa_read_packet(), ea_read_packet(), evc_read_packet(), ff_add_attached_pic(), ff_pcm_read_packet(), ff_rm_parse_packet(), ff_rm_retrieve_cache(), ff_voc_get_packet(), film_read_packet(), flv_data_packet(), flv_read_packet(), fourxm_read_packet(), frm_read_packet(), fsb_read_packet(), g726_read_packet(), g728_read_packet(), g729_read_packet(), gdv_read_packet(), genh_read_packet(), gsm_read_packet(), gxf_packet(), hca_read_packet(), hnm_read_packet(), hxvs_read_packet(), idcin_read_packet(), iff_read_packet(), ifv_read_packet(), ilbc_read_packet(), ingenient_read_packet(), iss_read_packet(), lmlm4_read_packet(), load_ipmovie_packet(), lvf_read_packet(), mmf_read_packet(), mods_read_packet(), mov_read_packet(), mp3_read_packet(), mpc8_read_packet(), mpegps_read_packet(), mpjpeg_read_packet(), msf_read_packet(), msnwc_tcp_read_packet(), msp_read_packet(), mtaf_read_packet(), mtv_read_packet(), musx_read_packet(), mv_read_packet(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), mxf_get_eia608_packet(), mxf_read_packet(), nc_read_packet(), nsv_read_chunk(), nuv_packet(), parse_chunk(), pdv_read_packet(), pmp_packet(), pp_bnk_read_packet(), pva_read_packet(), qcp_read_packet(), r3d_read_reda(), r3d_read_redv(), raw_read_packet(), rawvideo_read_packet(), rcwt_read_header(), read_dst_frame(), read_packet(), redspark_read_packet(), rka_read_packet(), rl2_read_packet(), roq_read_packet(), rpl_read_packet(), rsd_read_packet(), s337m_read_packet(), scd_read_packet(), sdns_read_packet(), sdr2_read_packet(), seq_read_packet(), ser_read_packet(), siff_read_packet(), simbiosis_imx_read_packet(), smacker_read_packet(), smjpeg_read_packet(), smush_read_packet(), sol_read_packet(), sup_read_packet(), svag_read_packet(), svs_read_packet(), swf_read_packet(), thp_read_packet(), threedostr_read_packet(), tmv_read_packet(), tta_read_packet(), txd_read_packet(), vag_read_packet(), vc1t_read_packet(), vid_read_packet(), viv_read_packet(), vivo_read_packet(), vpk_read_packet(), wavarc_read_packet(), wc3_read_packet(), wsaud_read_packet(), wsvqa_read_packet(), xa_read_packet(), xmv_fetch_audio_packet(), xmv_fetch_video_packet(), xvag_read_packet(), xwma_read_packet(), yop_read_packet(), and yuv4_read_packet().
Read data and append it to the current content of the AVPacket.
If pkt->size is 0 this is identical to av_get_packet. Note that this uses av_grow_packet and thus involves a realloc which is inefficient. Thus this function should only be used when there is no reasonable way to know (an upper bound of) the final size.
Definition at line 114 of file utils.c.
Referenced by adts_aac_read_packet(), apng_read_packet(), dfa_read_packet(), ea_read_packet(), fits_read_packet(), handle_id3(), is_image(), moflex_read_packet(), mpjpeg_read_packet(), msp_read_packet(), read_packet(), sup_read_packet(), vivo_read_packet(), wc3_read_header(), wc3_read_packet(), and wsvqa_read_packet().
Definition at line 542 of file options.c.
Referenced by print_dispositions(), and show_dispositions().
Definition at line 33 of file demux_utils.c.
Referenced by ist_dts_update().
Allocate an AVFormatContext for an output format.
avformat_free_context() can be used to free the context and everything allocated by the framework within it.
Definition at line 95 of file mux.c.
Referenced by avdevice_list_output_sinks(), fifo_mux_init(), hls_mux_init(), initialize_fifo_tst_muxer_chain(), main(), mov_init_ttml_writer(), of_open(), open_output_file(), open_slave(), segment_mux_init(), webm_chunk_init(), and write_muxed_file().