FFmpeg
Data Fields
AVStream Struct Reference

Stream structure. More...

#include <avformat.h>

Data Fields

const AVClassav_class
 A class for AVOptions. More...
 
int index
 stream index in AVFormatContext More...
 
int id
 Format-specific stream ID. More...
 
AVCodecParameterscodecpar
 Codec parameters associated with this stream. More...
 
void * priv_data
 
AVRational time_base
 This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. More...
 
int64_t start_time
 Decoding: pts of the first frame of the stream in presentation order, in stream time base. More...
 
int64_t duration
 Decoding: duration of the stream, in stream time base. More...
 
int64_t nb_frames
 number of frames in this stream if known or 0 More...
 
int disposition
 Stream disposition - a combination of AV_DISPOSITION_* flags. More...
 
enum AVDiscard discard
 Selects which packets can be discarded at will and do not need to be demuxed. More...
 
AVRational sample_aspect_ratio
 sample aspect ratio (0 if unknown) More...
 
AVDictionarymetadata
 
AVRational avg_frame_rate
 Average framerate. More...
 
AVPacket attached_pic
 For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached picture. More...
 
int event_flags
 Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*. More...
 
AVRational r_frame_rate
 Real base framerate of the stream. More...
 
int pts_wrap_bits
 Number of bits in timestamps. More...
 

Detailed Description

Stream 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. sizeof(AVStream) must not be used outside libav*.

Examples
demux_decode.c, extract_mvs.c, hw_decode.c, mux.c, qsv_decode.c, qsv_transcode.c, remux.c, transcode.c, transcode_aac.c, and vaapi_transcode.c.

Definition at line 743 of file avformat.h.

Field Documentation

◆ av_class

const AVClass* AVStream::av_class

A class for AVOptions.

Set on stream creation.

Definition at line 747 of file avformat.h.

Referenced by avformat_new_stream().

◆ index

int AVStream::index

stream index in AVFormatContext

Examples
mux.c, and qsv_decode.c.

Definition at line 749 of file avformat.h.

Referenced by aac_parse_packet(), ac3_handle_packet(), add_stream_to_programs(), amr_handle_packet(), asf_read_stream_properties(), audio_frame_obu(), av_read_frame(), avformat_find_stream_info(), avformat_match_stream_specifier(), avformat_new_stream(), avformat_stream_group_add_stream(), avpriv_set_pts_info(), cdxl_read_packet(), cin_read_header(), compute_muxer_pkt_fields(), compute_pkt_fields(), configure_output_audio_filter(), configure_output_video_filter(), dash_check_bitstream(), dc1394_read_common(), demux_stream_alloc(), dhav_read_packet(), dshow_add_device(), dump_stream_group(), dv_handle_packet(), ea_read_header(), eit_cb(), enc_stats_write(), enc_thread_set_name(), encode_frame(), ff_add_attached_pic(), ff_h263_handle_packet(), ff_id3v2_write_apic(), ff_rm_parse_packet(), ff_rm_retrieve_cache(), ff_rtsp_open_transport_ctx(), fg_complex_bind_input(), fg_thread_set_name(), film_read_header(), find_matching_stream(), flac_write_picture(), flv_data_packet(), flv_read_packet(), get_dvb_stream_type(), get_m2ts_stream_type(), get_subtitle_pkt(), gxf_write_header(), gxf_write_media_preamble(), h261_handle_packet(), h263_handle_packet(), h264_handle_packet(), heif_add_stream(), hevc_handle_packet(), hls_init(), hls_read_packet(), idcin_read_header(), ifv_read_header(), init_audio(), init_simple_filtergraph(), init_video_stream(), ipmovie_read_header(), jpeg_parse_packet(), latm_parse_packet(), main(), match_stream_specifier(), mov_build_index(), mov_estimate_video_delay(), mov_fix_index(), mov_init_iamf_track(), mov_read_kind(), mov_read_stts(), mov_read_trak(), mov_read_trun(), mov_seek_stream(), mov_write_packet(), mov_write_squashed_packet(), mov_write_squashed_packets(), mov_write_subtitle_tag(), mov_write_tkhd_tag(), movie_common_init(), mpa_robust_parse_packet(), mpeg_parse_packet(), mpegps_read_packet(), mpegts_init(), mpegts_push_data(), mpegts_set_stream_info(), mpegts_write_pes(), muxer_thread(), mxf_compute_sample_count(), mxf_handle_missing_index_segment(), mxf_init(), mxf_parse_structural_metadata(), mxf_set_current_edit_unit(), mxf_write_generic_desc(), mxf_write_packet(), mxf_write_structural_component(), mxf_write_track(), new_pes_packet(), new_stream_video(), nsv_read_chunk(), nuv_header(), open_input_file(), ost_add(), parse_chunk(), parse_packet(), parse_strk(), parse_vtrk(), playlist_needed(), pmt_cb(), prepare_input_packet(), print_report(), print_stream_maps(), probe_codec(), qdm2_restore_block(), qt_rtp_parse_packet(), rdt_load_mdpr(), rdt_parse_packet(), read_frame(), read_frame_internal(), read_image_iovl(), return_stored_frame(), rfc4175_handle_packet(), roq_read_packet(), rtp_parse_packet_internal(), scd_read_track(), seg_check_bitstream(), seg_write_packet(), seq_read_header(), sga_audio_packet(), sga_video_packet(), show_frame(), show_stream(), show_stream_group(), smacker_read_header(), smjpeg_read_header(), smush_read_header(), store_packet(), str_read_packet(), svq3_parse_packet(), thp_read_header(), update_video_stats(), vc2hq_handle_frame_fragment(), vc2hq_handle_sequence_header(), vc2hq_mark_end_of_sequence(), vid_read_packet(), decklink_input_callback::VideoInputFrameArrived(), vmd_read_header(), vp8_handle_packet(), vp9_handle_packet(), wc3_read_header(), write_frame(), write_packet(), write_packets_from_bsfs(), write_stream_data(), wsaud_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), xa_read_packet(), xiph_handle_packet(), and xmv_process_packet_header().

◆ id

int AVStream::id

Format-specific stream ID.

decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset

Examples
mux.c.

Definition at line 755 of file avformat.h.

Referenced by add_dstream(), add_stream(), add_video_stream(), asf_read_stream_properties(), asfrtp_parse_packet(), asfrtp_parse_sdp_line(), avi_read_header(), avisynth_create_stream(), choose_encoder(), compute_pkt_fields(), concat_parse_script(), create_new_audio_stream(), dat_read_packet(), dshow_add_device(), dump_stream_format(), dvdvideo_audio_stream_add(), dvdvideo_subp_stream_add(), dvdvideo_video_stream_add(), eit_cb(), ff_iamf_add_audio_element(), ff_parse_mpeg2_descriptor(), ff_rm_parse_packet(), ff_rtp_chain_mux_open(), find_matching_stream(), get_attachment(), get_curr_st(), get_sindex(), handle_file(), heif_add_stream(), hls_mux_init(), iamf_read_header(), iamf_write_packet(), lavfi_read_header(), match_stream_specifier(), match_streams_exact_id(), mov_read_covr(), mov_read_iacb(), mov_read_tkhd(), mov_read_trak(), mov_setup_track_ids(), mpegps_read_packet(), mpegts_init(), mpegts_push_data(), mpegts_set_stream_info(), mxf_add_metadata_stream(), mxf_parse_structural_metadata(), new_stream(), nsv_parse_NSVs_header(), ogg_new_stream(), open_demux_for_component(), ost_add(), parse_strk(), pmt_cb(), rdt_parse_sdp_line(), read_header(), read_packet(), rm_read_header(), rm_read_multi(), rm_sync(), rtp_mpegts_write_header(), rtp_write_header(), sap_fetch_packet(), sap_read_header(), set_context_streams_from_tracks(), show_stream(), stream_params_copy(), swf_read_packet(), track_header(), ts_discontinuity_detect(), update_streams_from_subdemuxer(), and write_muxed_file().

◆ codecpar

AVCodecParameters* AVStream::codecpar

Codec parameters associated with this stream.

Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively.

Examples
decode_filter_audio.c, decode_filter_video.c, demux_decode.c, extract_mvs.c, mux.c, qsv_decode.c, qsv_transcode.c, remux.c, transcode.c, transcode_aac.c, and vaapi_transcode.c.

Definition at line 766 of file avformat.h.

Referenced by aa_read_header(), ac4_read_header(), ace_read_header(), acm_read_header(), add_display_matrix(), add_display_matrix_to_stream(), add_dstream(), add_keyframes_index(), add_metadata_from_renditions(), add_video_stream(), adp_read_header(), ads_read_header(), adts_aac_read_header(), aea_read_header(), aea_write_header(), aea_write_trailer(), afc_read_header(), aiff_read_header(), aiff_read_packet(), aiff_write_header(), aix_read_header(), amf_parse_object(), amr_handle_packet(), amv_init(), amv_write_header(), apac_read_header(), apc_read_header(), ape_read_header(), ape_tag_read_field(), apng_read_header(), apng_write_header(), aptx_hd_read_header(), aptx_read_header(), aptx_read_header_common(), aqt_read_header(), argo_brp_read_header(), asf_read_ext_stream_properties(), asf_read_header(), asf_read_picture(), asf_read_stream_properties(), asf_write_header1(), asfrtp_parse_sdp_line(), ass_read_header(), ast_read_header(), at_write_header(), audio_read_header(), audio_write_header(), av1_read_header(), av_find_best_stream(), av_find_default_stream_index(), av_guess_sample_aspect_ratio(), avformat_find_stream_info(), avformat_new_stream(), avformat_transfer_internal_stream_timing_info(), avi_extract_stream_metadata(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_sync(), avi_write_header(), avisynth_create_stream_audio(), avisynth_create_stream_video(), avisynth_read_packet(), avisynth_read_seek(), avr_read_header(), bfi_read_header(), binka_read_header(), binka_read_packet(), bitstream_switching(), bmv_read_header(), bonk_read_header(), bsf_init(), build_open_gop_key_points(), caca_write_header(), caf_write_packet(), caf_write_trailer(), calculate_bitrate(), can_seek_to_key_sample(), cdata_read_header(), cdxl_read_packet(), celt_header(), check_stream_max_drift(), choose_chroma_location(), choose_decoder(), cin_read_header(), cine_read_header(), codec2_read_header(), codec2_read_header_common(), codec2_read_packet(), codec2_write_header(), codec2raw_read_header(), compute_display_area(), compute_frame_duration(), compute_muxer_pkt_fields(), compute_pkt_fields(), compute_texture_rect(), concat_parse_script(), configure_output_audio_filter(), copy_stream_props(), create_audio_stream(), create_master_playlist(), create_new_audio_stream(), create_stream(), create_subcc_streams(), dash_init(), dash_write_packet(), dat_read_packet(), daud_header(), dc1394_read_common(), dcstr_read_header(), dec_enc(), decklink_setup_audio(), decklink_setup_data(), decklink_setup_subtitle(), decklink_setup_video(), decklink_write_audio_packet(), decklink_write_video_packet(), decode_stream_header(), demux_stream_alloc(), derf_read_header(), detect_stream_specific(), dfa_read_header(), dfpwm_read_header(), dhav_read_packet(), dirac_header(), dsf_read_header(), dsf_read_packet(), dshow_add_device(), dss_723_1_read_packet(), dss_read_header(), dtshd_read_header(), dump_attachment(), dump_sidedata(), dump_stream_format(), dump_stream_group(), dv_assemble_frame(), dv_init_mux(), dvdvideo_audio_stream_add(), dvdvideo_subp_stream_add(), dvdvideo_video_stream_add(), dxa_read_header(), ea_read_header(), eit_cb(), enable_pcr_generation_for_stream(), enable_tracks(), enc_open(), epaf_read_header(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), evc_read_header(), export_orphan_timecode(), extract_extradata_check(), extract_extradata_init(), fbdev_read_header(), ff_add_attached_pic(), ff_alsa_open(), ff_argo_asf_fill_stream(), ff_decklink_write_header(), ff_decklink_write_packet(), ff_find_decoder(), ff_flac_parse_picture(), ff_framehash_write_header(), ff_free_stream(), ff_generate_avci_extradata(), ff_get_bmp_header(), ff_hls_senc_parse_audio_setup_info(), ff_hls_write_stream_info(), ff_iamf_add_audio_element(), ff_id3v2_parse_apic(), ff_id3v2_write_apic(), ff_img_read_header(), ff_interleave_add_packet(), ff_interleave_packet_per_dts(), ff_isom_parse_dvcc_dvvc(), ff_load_image(), ff_mov_read_chan(), ff_mov_read_chnl(), ff_mov_read_stsd_entries(), ff_mp4_read_dec_config_descr(), ff_parse_mpeg2_descriptor(), ff_parse_specific_params(), ff_pcm_read_seek(), ff_raw_audio_read_header(), ff_raw_subtitle_read_header(), ff_raw_video_read_header(), ff_replaygain_export_raw(), ff_rfps_calculate(), ff_rm_parse_packet(), ff_rm_read_mdpr_codecdata(), ff_rm_retrieve_cache(), ff_rtp_chain_mux_open(), ff_rtp_parse_open(), ff_sauce_read(), ff_spdif_read_packet(), ff_stream_add_bitstream_filter(), ff_voc_get_packet(), fill_codec_config(), film_init(), film_read_header(), film_write_header(), film_write_packet(), filter_codec_opts(), find_matching_stream(), find_stream(), fits_read_header(), flac_header(), flac_init(), flac_read_header(), flac_read_timestamp(), flac_write_picture(), flush(), flv_check_bitstream(), flv_data_packet(), flv_get_extradata(), flv_read_metabody(), flv_read_packet(), flv_set_video_codec(), flv_update_video_color_info(), force_codec_ids(), framecrc_write_header(), frm_read_header(), frm_read_packet(), fsb_read_header(), fwse_read_header(), g722_read_header(), g723_1_init(), g726_read_header(), g729_read_header(), g729_read_packet(), gdigrab_read_header(), gdv_read_header(), genh_read_header(), get_attachment(), get_codec_data(), get_dvb_stream_type(), get_m2ts_stream_type(), get_mimetype(), get_packet_header(), get_pes_stream_id(), get_private_data(), get_sindex(), get_stream_bit_rate(), gif_read_header(), grab_read_header(), gsm_read_header(), guess_channel_layout(), guess_pkt_duration(), gxf_compare_field_nb(), gxf_find_lines_index(), gxf_interleave_packet(), gxf_packet(), gxf_write_dv_auxiliary(), gxf_write_header(), gxf_write_media_preamble(), gxf_write_mpeg_auxiliary(), gxf_write_packet(), gxf_write_umf_media_description(), gxf_write_umf_media_dv(), gxf_write_umf_media_mpeg(), handle_file(), has_codec_parameters(), has_decode_delay_been_guessed(), hca_read_header(), hcom_read_header(), hds_write_header(), hds_write_packet(), heif_add_stream(), hevc_parse_sdp_line(), hls_init(), hls_mux_init(), hls_read_packet(), hls_write_header(), hls_write_packet(), hnm_read_header(), iamf_read_header(), idcin_read_header(), iff_read_header(), iff_read_packet(), ifile_open(), ifilter_bind_ist(), ifv_read_header(), ilbc_parse_fmtp(), ilbc_parse_sdp_line(), ilbc_read_header(), imf_read_packet(), init(), init_audio(), init_filters(), init_fps(), init_muxer(), init_pts(), init_stream(), init_video_stream(), interleave_compare_dts(), ipmovie_read_header(), ipu_read_header(), ircam_read_header(), ism_write_header(), ism_write_packet(), iss_read_header(), ist_add(), ist_use(), jacosub_read_header(), jpegxl_anim_read_header(), kmsgrab_read_header(), laf_read_header(), laf_read_packet(), latm_check_bitstream(), lavfi_read_header(), lavfi_read_packet(), lmlm4_read_header(), loas_read_header(), log_slave(), lrc_read_header(), lvf_read_header(), lxf_read_header(), m4sl_cb(), main(), map_auto_audio(), map_auto_video(), map_manual(), match_stream_specifier(), mcc_read_header(), microdvd_read_header(), mkv_check_bitstream(), mkv_handle_rotation(), mkv_handle_spherical(), mkv_init(), mkv_write_attachments(), mkv_write_blockadditionmapping(), mkv_write_stereo_mode(), mkv_write_tags(), mkv_write_track(), mkv_write_tracks(), mkv_write_video_color(), mmf_read_header(), modplug_read_header(), mods_read_header(), moflex_read_sync(), mov_build_index(), mov_check_bitstream(), mov_codec_id(), mov_create_dvd_sub_decoder_specific_info(), mov_estimate_video_delay(), mov_finalize_stsd_codec(), mov_fix_index(), mov_get_skip_samples(), mov_init(), mov_init_ttml_writer(), mov_parse_stsd_audio(), mov_parse_stsd_data(), mov_parse_stsd_subtitle(), mov_parse_stsd_video(), mov_read_ares(), mov_read_chapters(), mov_read_colr(), mov_read_covr(), mov_read_dac3(), mov_read_ddts(), mov_read_dec3(), mov_read_dfla(), mov_read_dmlp(), mov_read_dops(), mov_read_dvc1(), mov_read_extradata(), mov_read_fiel(), mov_read_frma(), mov_read_glbl(), mov_read_hdlr(), mov_read_header(), mov_read_iacb(), mov_read_kind(), mov_read_packet(), mov_read_pcmc(), mov_read_pssh(), mov_read_SA3D(), mov_read_strf(), mov_read_stsd(), mov_read_stss(), mov_read_stts(), mov_read_trak(), mov_read_trun(), mov_read_vpcc(), mov_read_wave(), mov_read_wfex(), mov_rewrite_dvd_sub_extradata(), mov_write_amve_tag(), mov_write_clli_tag(), mov_write_colr_tag(), mov_write_ftyp_tag(), mov_write_header(), mov_write_identification(), mov_write_mdcv_tag(), mov_write_moov_tag(), mov_write_squashed_packet(), mov_write_squashed_packets(), mov_write_tkhd_tag(), mov_write_video_tag(), mov_write_wfex_tag(), movie_common_init(), movie_config_output_props(), movie_query_formats(), mp3_init(), mp3_parse_vbr_tags(), mp3_read_header(), mpc8_read_header(), mpc_read_header(), mpeg_mux_init(), mpeg_mux_write_packet(), mpeg_parse_packet(), mpegps_read_packet(), mpegts_check_bitstream(), mpegts_find_stream_type(), mpegts_init(), mpegts_push_data(), mpegts_read_header(), mpegts_set_stream_info(), mpegts_write_packet_internal(), mpegts_write_pes(), mpegts_write_pmt(), mpjpeg_read_header(), mpl2_read_header(), mpsub_read_header(), msf_read_header(), msnwc_tcp_read_header(), msp_read_header(), msp_read_packet(), mtaf_read_header(), mtv_read_header(), musx_read_header(), mux_final_stats(), mux_fixup_ts(), mv_read_header(), mxf_add_metadata_stream(), mxf_check_bitstream(), mxf_compute_edit_units_per_packet(), mxf_compute_sample_count(), mxf_get_d10_aes3_packet(), mxf_handle_missing_index_segment(), mxf_init(), mxf_parse_dnxhd_frame(), mxf_parse_ffv1_frame(), mxf_parse_h264_frame(), mxf_parse_jpeg2000_frame(), mxf_parse_mpeg2_frame(), mxf_parse_prores_frame(), mxf_parse_structural_metadata(), mxf_read_seek(), mxf_set_pts(), mxf_write_avc_subdesc(), mxf_write_cdci_common(), mxf_write_cdci_desc(), mxf_write_common_fields(), mxf_write_d10_audio_packet(), mxf_write_ffv1_desc(), mxf_write_ffv1_subdesc(), mxf_write_generic_desc(), mxf_write_generic_sound_common(), mxf_write_jpeg2000_subdesc(), mxf_write_mpegvideo_desc(), mxf_write_packet(), mxf_write_wav_common(), mxg_read_header(), nc_read_header(), new_stream(), nist_read_header(), nsp_read_header(), nsv_parse_NSVs_header(), nsv_read_chunk(), nut_write_header(), nuv_header(), of_streamcopy(), ogg_buffer_data(), ogg_build_vp8_headers(), ogg_free(), ogg_init(), ogg_write_packet_internal(), ogm_dshow_header(), ogm_header(), old_dirac_header(), old_flac_header(), oma_read_header(), oma_read_seek(), open_audio(), open_codec_context(), open_demux_for_component(), open_input_file(), open_output_file(), open_slave(), open_stream(), open_video(), opengl_compute_display_area(), opengl_write_header(), opt_target(), opus_header(), osq_read_header(), ost_add(), output_packet(), parse_audio_var(), parse_chunk(), parse_dsd_prop(), parse_fmtp(), parse_fmtp_config(), parse_h264_sdp_line(), parse_mca_labels(), parse_media_type(), parse_mpeg1waveformatex(), parse_packet(), parse_strk(), parse_video_info(), parse_video_var(), parse_videoinfoheader2(), parse_vtrk(), pcm_read_header(), pdv_read_header(), pjs_read_header(), pmp_header(), pmt_cb(), pp_bnk_read_header(), probe_codec(), process_frame(), pulse_read_header(), pulse_write_header(), pulse_write_packet(), put_frame(), put_videoinfoheader2(), pva_read_header(), pvf_read_header(), qcp_read_header(), qdm2_parse_config(), qdm2_parse_packet(), qoa_read_header(), qt_rtp_parse_packet(), r3d_read_red1(), r3d_read_reda(), raw_data_read_header(), rawvideo_read_header(), rdt_parse_packet(), read_desc_chunk(), read_frame(), read_frame_internal(), read_gab2_sub(), read_header(), read_header_gme(), read_header_openmpt(), read_header_vs(), read_index(), read_kuki_chunk(), read_packet(), read_packet_vs(), read_seek(), read_thread(), real_parse_asm_rule(), realtext_read_header(), redspark_read_header(), report_new_stream(), rfc4175_parse_fmtp(), rfc4175_parse_format(), rfc4175_parse_sdp_line(), rka_read_header(), rl2_read_header(), rm_ac3_swap_bytes(), rm_read_audio_stream_info(), rm_read_dts(), rm_read_header(), rm_read_multi(), roq_read_packet(), rpl_read_header(), rpl_read_packet(), rsd_read_header(), rso_read_header(), rtp_hinting_needed(), rtp_mpegts_write_header(), rtp_send_ilbc(), rtp_write_header(), rtp_write_packet(), s337m_read_packet(), sami_read_header(), sap_fetch_packet(), sap_read_header(), sbg_read_header(), sbg_read_packet(), scan_file(), scc_read_header(), scd_read_track(), sdl2_write_header(), sdns_read_header(), sdp_parse_fmtp_config_h264(), sdr2_read_header(), sds_read_header(), sdx_read_header(), seek_frame_generic(), seek_test(), seg_write_packet(), segment_mux_init(), select_from_pts_buffer(), select_pcr_streams(), seq_read_header(), ser_read_header(), set_channels(), set_codec_from_probe_data(), set_last_stream_little_endian(), set_max_size(), set_stream_info_from_input_stream(), sga_audio_packet(), sga_video_packet(), show_frame(), show_packet(), show_stream(), siff_parse_vbv1(), simbiosis_imx_read_header(), skeleton_header(), smacker_read_header(), smjpeg_read_header(), smjpeg_write_header(), smjpeg_write_packet(), smush_read_header(), sol_read_header(), sox_read_header(), speex_header(), srt_read_header(), srt_write_header(), stl_read_header(), str_read_packet(), stream_component_close(), stream_component_open(), stream_cycle_channel(), stream_params_copy(), streamcopy_init(), subviewer1_read_header(), subviewer_read_header(), sup_read_header(), svag_read_header(), svq3_parse_packet(), svs_read_header(), swf_read_packet(), tak_read_header(), tb_unreliable(), tedcaptions_read_header(), theora_header(), thp_read_header(), threedostr_read_header(), threedostr_read_packet(), tmcd_is_referenced(), tmv_read_header(), track_header(), try_decode_frame(), ts_to_samples(), tta_read_header(), ttml_write_header(), txd_read_header(), ty_read_header(), update_initial_timestamps(), update_stream_avctx(), update_stream_extradata(), update_stream_timings(), v4l2_read_header(), vag_read_header(), validate_codec_tag(), vc1t_read_header(), vfw_read_header(), vid_read_packet(), video_decode(), video_decode_example(), decklink_input_callback::VideoInputFrameArrived(), viv_read_packet(), vivo_read_header(), vmd_read_header(), voc_read_packet(), vorbis_header(), vp8_header(), vpk_read_header(), vpk_read_seek(), vplayer_read_header(), vqf_read_header(), vqf_read_seek(), wady_read_header(), wavarc_read_header(), wc3_read_header(), webm_chunk_write_packet(), webvtt_read_header(), write_adaptation_set(), write_codec_attr(), write_header(), write_image_header(), write_manifest(), write_muxed_file(), write_odml_master(), write_packet(), write_representation(), write_stream_codec(), write_stream_codec_info(), write_stream_data(), write_streamheader(), write_streaminfo(), write_trailer(), wsaud_read_header(), wsaud_read_packet(), wsaud_write_header(), wsd_read_header(), wsvqa_read_header(), wsvqa_read_packet(), wv_read_header(), wve_read_header(), xa_read_header(), xa_read_packet(), xiph_parse_fmtp_pair(), xmd_read_header(), xmv_process_packet_header(), xvag_read_header(), xwma_read_header(), xwma_read_packet(), yop_read_header(), yuv4_read_header(), yuv4_write_header(), and yuv4_write_packet().

◆ priv_data

void* AVStream::priv_data

Definition at line 768 of file avformat.h.

Referenced by avi_read_close(), avi_read_header(), avi_read_idx1(), avi_read_packet(), avi_read_seek(), avi_sync(), avi_write_header(), build_open_gop_key_points(), caf_write_packet(), caf_write_trailer(), can_seek_to_key_sample(), check_stream_max_drift(), clean_index(), dhav_read_packet(), dhav_read_seek(), enable_pcr_generation_for_stream(), ff_free_stream(), ff_mov_read_stsd_entries(), find_prev_closest_index(), flac_finish_header(), flac_write_packet(), flush_packet(), get_current_encryption_info(), get_dvb_stream_type(), get_frag_time(), get_m2ts_stream_type(), get_subtitle_pkt(), get_system_header_size(), gxf_compare_field_nb(), gxf_find_lines_index(), gxf_interleave_packet(), gxf_write_header(), gxf_write_media_preamble(), gxf_write_mpeg_auxiliary(), gxf_write_umf_media_mpeg(), heif_add_stream(), ivr_read_header(), ivr_read_packet(), moflex_read_sync(), mov_build_index(), mov_change_extradata(), mov_estimate_video_delay(), mov_finalize_packet(), mov_find_next_sample(), mov_fix_index(), mov_free_stream_context(), mov_get_skip_samples(), mov_init(), mov_init_iamf_track(), mov_parse_stsd_data(), mov_read_chapters(), mov_read_covr(), mov_read_ctts(), mov_read_custom(), mov_read_dref(), mov_read_frma(), mov_read_header(), mov_read_iacb(), mov_read_mdhd(), mov_read_packet(), mov_read_pcmc(), mov_read_rtmd_track(), mov_read_sbgp(), mov_read_schm(), mov_read_sdtp(), mov_read_seek(), mov_read_sgpd(), mov_read_sidx(), mov_read_st3d(), mov_read_stco(), mov_read_stps(), mov_read_stsc(), mov_read_stsd(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_sv3d(), mov_read_tenc(), mov_read_tfdt(), mov_read_timecode_track(), mov_read_tkhd(), mov_read_trak(), mov_read_trun(), mov_read_uuid(), mov_seek_stream(), mov_update_iamf_streams(), mpc_read_header(), mpeg_mux_deinit(), mpeg_mux_end(), mpeg_mux_init(), mpeg_mux_write_packet(), mpegts_deinit(), mpegts_init(), mpegts_insert_pcr_only(), mpegts_set_stream_info(), mpegts_write_flush(), mpegts_write_packet_internal(), mpegts_write_pes(), mpegts_write_pmt(), mxf_compute_edit_unit_byte_count(), mxf_compute_edit_units_per_packet(), mxf_compute_index_tables(), mxf_compute_sample_count(), mxf_handle_missing_index_segment(), mxf_init(), mxf_parse_dnxhd_frame(), mxf_parse_dv_frame(), mxf_parse_ffv1_frame(), mxf_parse_h264_frame(), mxf_parse_jpeg2000_frame(), mxf_parse_mpeg2_frame(), mxf_parse_prores_frame(), mxf_parse_structural_metadata(), mxf_read_packet(), mxf_read_seek(), mxf_set_audio_pts(), mxf_set_current_edit_unit(), mxf_set_pts(), mxf_write_cdci_common(), mxf_write_ffv1_subdesc(), mxf_write_generic_desc(), mxf_write_h264_desc(), mxf_write_index_table_segment(), mxf_write_jpeg2000_subdesc(), mxf_write_mpegvideo_desc(), mxf_write_opatom_body_partition(), mxf_write_package(), mxf_write_packet(), mxf_write_track(), new_stream(), ni_prepare_read(), nsv_parse_NSVs_header(), nsv_read_chunk(), nsv_read_seek(), ogg_buffer_data(), ogg_compare_granule(), ogg_free(), ogg_init(), ogg_write_header(), ogg_write_packet_internal(), output_packet(), put_system_header(), qt_rtp_parse_packet(), read_gab2_sub(), read_odml_index(), remove_decoded_packets(), rm_read_header(), rm_read_header_old(), rm_read_multi(), rm_read_packet(), seek_subtitle(), select_pcr_streams(), smacker_read_header(), tmcd_is_referenced(), and write_odml_master().

◆ time_base

AVRational AVStream::time_base

This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.

decoding: set by libavformat encoding: May be set by the caller before avformat_write_header() to provide a hint to the muxer about the desired timebase. In avformat_write_header(), the muxer will overwrite this field with the timebase that will actually be used for the timestamps written into the file (which may or may not be related to the user-provided one, depending on the format).

Examples
decode_filter_audio.c, decode_filter_video.c, mux.c, qsv_transcode.c, remux.c, transcode.c, transcode_aac.c, and vaapi_transcode.c.

Definition at line 782 of file avformat.h.

Referenced by aa_read_header(), add_stream(), amv_init(), amv_write_header(), amv_write_trailer(), av_pkt_dump2(), av_pkt_dump_log2(), avformat_find_stream_info(), avformat_transfer_internal_stream_timing_info(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_write_header(), avpriv_set_pts_info(), avpriv_update_cur_dts(), bsf_init(), caca_write_header(), calculate_bitrate(), check_stream_max_drift(), choose_timebase(), compute_frame_duration(), compute_muxer_pkt_fields(), compute_pkt_fields(), concat_read_packet(), copy_stream_props(), correct_input_start_times(), create_subcc_streams(), dash_flush(), dash_init(), dash_read_packet(), dash_write_packet(), dec_enc(), decklink_setup_video(), dump_stream_format(), dv_init_mux(), enc_open(), encode_write(), encode_write_frame(), estimate_timings(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), extract_extradata_init(), ff_configure_buffers_for_index(), ff_framehash_write_header(), ff_get_muxer_ts_offset(), ff_interleave_add_packet(), ff_interleave_packet_per_dts(), ff_mov_init_hinting(), ff_parse_specific_params(), ff_pcm_read_seek(), ff_rfps_add_frame(), ff_rfps_calculate(), ff_rtp_chain_mux_open(), ff_rtp_send_aac(), ff_rtp_send_amr(), ff_rtp_send_xiph(), ff_rtsp_open_transport_ctx(), ff_stream_add_bitstream_filter(), ff_write_chained(), fifo_thread_attempt_recovery(), fifo_thread_write_packet(), fill_all_stream_timings(), fill_timing_for_id3_timestamped_stream(), flac_read_header(), flush_packet(), get_audio_frame(), get_frag_time(), get_subtitle_pkt(), get_timebase(), guess_pkt_duration(), handle_avoid_negative_ts(), handle_file(), hds_write_header(), hds_write_packet(), heif_add_stream(), hls_mux_init(), hls_read_packet(), hls_write_header(), hls_write_packet(), imf_read_packet(), imf_seek(), init_filters(), init_fps(), init_muxer(), init_pts(), init_stream(), interleave_compare_dts(), ism_write_header(), ism_write_packet(), ist_add(), log_packet(), main(), mkv_write_track(), mkv_write_trailer(), mov_get_dv_codec_tag(), mov_get_skip_samples(), mov_init(), mov_init_ttml_writer(), mov_read_chapters(), mov_read_seek(), mov_read_sidx(), mov_update_iamf_streams(), mov_write_prft_tag(), mov_write_ttml_document_from_queue(), movie_common_init(), movie_config_output_props(), mp3_parse_info_tag(), mp3_parse_vbr_tags(), mpegts_init(), mpegts_write_packet_internal(), mux_fixup_ts(), mux_frames(), mux_log_debug_ts(), mxf_compute_sample_count(), mxf_handle_missing_index_segment(), mxf_init(), mxf_parse_structural_metadata(), mxf_read_seek(), mxf_set_audio_pts(), mxf_set_current_edit_unit(), next_duration(), ni_prepare_read(), of_stream_init(), ogg_buffer_data(), ogg_build_vp8_headers(), ogg_compare_granule(), ogg_init(), ogg_write_packet_internal(), open_demux_for_component(), open_input_file(), open_output_file(), open_slave(), open_track_resource_context(), opt_target(), ost_add(), output_segment_list(), parse_packet(), pulse_write_packet(), r3d_read_rdvo(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), r3d_seek(), rawvideo_read_header(), read_gab2_sub(), read_header(), read_interval_packets(), read_packet(), read_seek(), read_thread(), real_seek(), report_new_stream(), rl2_read_seek(), rm_write_header(), rtp_mpegts_write_header(), rtp_mpegts_write_packet(), rtp_send_ilbc(), rtsp_read_play(), sap_fetch_packet(), sap_read_header(), sap_write_header(), sbg_read_seek2(), seek_frame_internal(), seek_subtitle(), seg_init(), seg_write_packet(), ser_read_header(), set_context_streams_from_tracks(), set_stream_info_from_input_stream(), show_frame(), show_packet(), show_stream(), smush_read_header(), stream_component_open(), stream_has_enough_packets(), stream_params_copy(), streamcopy_init(), swf_write_header(), tb_unreliable(), tee_write_packet(), ts_fixup(), ts_to_samples(), txd_read_header(), update_initial_timestamps(), update_stream_timings(), update_timestamps(), update_wrap_reference(), video_decode_example(), decklink_input_callback::VideoInputFrameArrived(), viv_read_packet(), vqf_read_seek(), webm_chunk_init(), webm_chunk_write_packet(), write_frame(), write_hls_media_playlist(), write_packet(), write_packets_from_bsfs(), write_trailer(), yuv4_read_header(), and yuv4_write_header().

◆ start_time

int64_t AVStream::start_time

Decoding: pts of the first frame of the stream in presentation order, in stream time base.

Only set this if you are absolutely 100% sure that the value you set it to really is the pts of the first frame. This may be undefined (AV_NOPTS_VALUE).

Note
The ASF header does NOT contain a correct start_time the ASF demuxer must NOT set this.

Definition at line 792 of file avformat.h.

Referenced by aa_read_header(), aax_read_header(), ace_read_header(), acm_read_header(), adp_read_header(), aiff_read_header(), ape_read_header(), aptx_read_header_common(), argo_brp_read_header(), asf_read_ext_stream_properties(), ast_read_header(), avformat_find_stream_info(), avformat_new_stream(), avi_read_header(), avisynth_create_stream_video(), cdxl_read_packet(), correct_input_start_times(), create_audio_stream(), dss_read_header(), ea_read_header(), estimate_timings(), estimate_timings_from_pts(), ff_argo_asf_fill_stream(), ff_img_read_header(), ff_raw_audio_read_header(), ff_raw_subtitle_read_header(), fill_all_stream_timings(), g723_1_init(), gdv_read_header(), gif_read_header(), gxf_header(), hnm_read_header(), idcin_read_header(), ifv_read_header(), ilbc_read_header(), ipu_read_header(), mov_build_index(), mov_fix_index(), mov_read_iacb(), mov_update_iamf_streams(), mp3_parse_info_tag(), mp3_read_header(), mpc8_read_header(), mpc_read_header(), mpegts_read_header(), mxf_parse_structural_metadata(), nsv_parse_NSVs_header(), oma_read_header(), opus_packet(), osq_read_header(), parse_chunk(), pdv_read_header(), pp_bnk_read_header(), qoa_read_header(), raw_data_read_header(), read_header(), read_thread(), rka_read_header(), rm_read_header(), rm_read_multi(), sbg_read_header(), sbg_read_packet(), scd_read_track(), seq_read_header(), sga_audio_packet(), sga_video_packet(), show_stream(), simbiosis_imx_read_header(), skeleton_header(), smush_read_header(), str_read_packet(), stream_params_copy(), svs_read_header(), tak_read_header(), tedcaptions_read_header(), tta_read_header(), update_initial_timestamps(), update_stream_timings(), update_timestamps(), vid_read_packet(), vivo_read_header(), vqf_read_header(), wavarc_read_header(), wsvqa_read_header(), wv_read_header(), and xa_read_header().

◆ duration

int64_t AVStream::duration

Decoding: duration of the stream, in stream time base.

If a source file does not specify a duration, but does specify a bitrate, this value will be estimated from bitrate and file size.

Encoding: May be set by the caller before avformat_write_header() to provide a hint to the muxer about the estimated duration.

Definition at line 802 of file avformat.h.

Referenced by aa_read_header(), ace_read_header(), acm_read_header(), adp_read_header(), ads_read_header(), afc_read_header(), aiff_read_header(), ape_read_header(), argo_brp_read_header(), argo_brp_read_packet(), asf_read_ext_stream_properties(), asf_read_stream_properties(), ast_read_header(), avformat_new_stream(), avi_read_header(), avi_write_header(), avisynth_create_stream_audio(), avisynth_create_stream_video(), bfi_read_header(), binka_read_header(), bonk_read_header(), caf_write_trailer(), cdxl_read_packet(), cine_read_header(), dcstr_read_header(), derf_read_header(), dfa_read_header(), dhav_read_packet(), dtshd_read_header(), estimate_timings(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), ff_argo_asf_fill_stream(), ff_img_read_header(), fill_all_stream_timings(), flac_read_header(), fsb_read_header(), fwse_read_header(), gdv_read_header(), genh_read_header(), gif_read_header(), gxf_header(), handle_file(), has_duration(), hca_read_header(), iff_read_header(), init_video_stream(), ipu_read_header(), ivr_read_header(), laf_read_header(), lxf_read_header(), modplug_read_header(), mov_build_index(), mov_finalize_packet(), mov_fix_index(), mov_read_chapters(), mov_read_header(), mov_read_iacb(), mov_read_mdhd(), mov_read_sidx(), mov_read_stts(), mov_read_trun(), mov_update_iamf_streams(), mp3_parse_vbr_tags(), mp3_seek(), mpc8_read_header(), mpc_read_header(), msf_read_header(), mtaf_read_header(), mxf_handle_missing_index_segment(), mxf_parse_structural_metadata(), nist_read_header(), nsv_parse_NSVs_header(), of_stream_init(), osq_read_header(), ost_add(), parse_chunk(), parse_video_var(), pdv_read_header(), pmp_header(), pp_bnk_read_header(), qoa_read_header(), r3d_read_rdvo(), read_header(), read_header_gme(), read_header_openmpt(), read_header_vs(), read_packet(), read_pakt_chunk(), read_seek(), redspark_read_header(), rka_read_header(), rm_read_header(), rm_read_multi(), rpl_read_header(), rsd_read_header(), rso_read_header(), sbg_read_header(), sbg_read_packet(), sds_read_header(), ser_read_header(), set_context_streams_from_tracks(), show_stream(), siff_parse_vbv1(), simbiosis_imx_read_header(), smacker_read_header(), smjpeg_read_header(), smush_read_header(), stream_params_copy(), svag_read_header(), svs_read_header(), tak_read_header(), tedcaptions_read_header(), thp_read_header(), threedostr_read_header(), tta_read_header(), update_stream_timings(), vag_read_header(), vc1t_read_header(), vpk_read_header(), wady_read_header(), wsvqa_read_header(), wv_read_header(), wve_read_header(), xmd_read_header(), xmv_process_packet_header(), xvag_read_header(), xwma_read_header(), and yuv4_read_header().

◆ nb_frames

int64_t AVStream::nb_frames

◆ disposition

int AVStream::disposition

◆ discard

enum AVDiscard AVStream::discard

◆ sample_aspect_ratio

AVRational AVStream::sample_aspect_ratio

◆ metadata

AVDictionary* AVStream::metadata

Definition at line 823 of file avformat.h.

Referenced by add_metadata_from_renditions(), add_stream_to_programs(), aea_read_header(), aea_write_header(), ape_tag_read_field(), asf_read_header(), asf_read_picture(), avi_extract_stream_metadata(), avi_read_tag(), avi_write_header(), bitstream_switching(), cine_read_header(), concat_parse_script(), copy_meta(), copy_metadata(), copy_stream_props(), dash_read_header(), decode_info_header(), dump_attachment(), dump_stream_format(), dvdvideo_audio_stream_add(), dvdvideo_subp_stream_add(), export_orphan_timecode(), ff_flac_parse_picture(), ff_free_stream(), ff_id3v2_parse_apic(), ff_id3v2_write_apic(), ff_metadata_conv_ctx(), ff_parse_mpeg2_descriptor(), ff_vorbis_stream_comment(), find_compressor(), flac_write_picture(), get_attachment(), get_mimetype(), gxf_write_header(), heif_add_stream(), hls_mux_init(), hls_read_header(), hls_read_packet(), iff_read_header(), match_stream_specifier(), mkv_write_attachments(), mkv_write_stereo_mode(), mkv_write_tags(), mkv_write_track(), mkv_write_track_video(), mov_init(), mov_parse_stsd_audio(), mov_parse_stsd_data(), mov_parse_stsd_video(), mov_read_hdlr(), mov_read_header(), mov_read_iacb(), mov_read_mdhd(), mov_read_rtmd_track(), mov_write_hdlr_tag(), mov_write_header(), mov_write_isml_manifest(), mov_write_tmcd_tag(), mov_write_track_metadata(), move_metadata(), mp3_parse_info_tag(), mpegts_write_pmt(), mxf_add_metadata_stream(), mxf_init(), mxf_init_timecode(), mxf_parse_physical_source_package(), mxf_parse_structural_metadata(), mxf_write_header_metadata_sets(), of_add_attachments(), of_add_metadata(), ogg_build_vp8_headers(), ogg_init(), parse_chunks(), parse_dsd_prop(), parse_mca_labels(), parse_timecode_in_framenum_format(), r3d_read_red1(), read_gab2_sub(), read_header(), scd_read_track(), set_encoder_id(), set_stream_info_from_input_stream(), show_stream(), stream_params_copy(), ttml_write_header(), vorbis_header(), vorbis_update_metadata(), write_adaptation_set(), write_representation(), write_streaminfo(), write_table_entries_attrib(), and write_table_redirector_legacy_attrib().

◆ avg_frame_rate

AVRational AVStream::avg_frame_rate

Average framerate.

Definition at line 832 of file avformat.h.

Referenced by add_video_stream(), amf_parse_object(), asf_read_ext_stream_properties(), av1_read_header(), av_guess_frame_rate(), avformat_find_stream_info(), avformat_transfer_internal_stream_timing_info(), avi_read_header(), avisynth_create_stream_video(), compute_frame_duration(), copy_stream_props(), create_stream(), dash_init(), dash_write_packet(), dc1394_read_common(), defined_frame_rate(), dhav_read_packet(), dshow_add_device(), dump_s12m_timecode(), dump_stream_format(), dvdvideo_video_stream_add(), enable_pcr_generation_for_stream(), enc_open(), evc_read_header(), fbdev_read_header(), ff_img_read_header(), ff_raw_video_read_header(), ff_rfps_calculate(), ff_rm_read_mdpr_codecdata(), gdigrab_read_header(), gif_read_header(), grab_read_header(), guess_pkt_duration(), heif_add_stream(), init_convert_timestamp(), init_video_stream(), ist_dts_update(), ist_use(), lavfi_read_header(), mkv_write_track(), mov_check_timecode_track(), mov_create_timecode_track(), mov_parse_stsd_data(), mov_read_header(), mov_read_timecode_track(), mov_write_dvc1_structs(), mov_write_tmcd_tag(), mov_write_uuidprof_tag(), mxf_parse_structural_metadata(), nuv_header(), parse_timecode_in_framenum_format(), parse_video_var(), pdv_read_header(), print_frame_side_data(), put_videoinfoheader2(), r3d_read_rdvo(), r3d_read_red1(), r3d_read_redv(), r3d_seek(), read_header(), rfc4175_parse_format(), show_stream(), smush_read_header(), stream_params_copy(), streamcopy_init(), txd_read_header(), v4l2_read_header(), v4l2_set_parameters(), vfw_read_header(), write_adaptation_set(), write_streaminfo(), and yuv4_read_header().

◆ attached_pic

AVPacket AVStream::attached_pic

For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet will contain the attached picture.

decoding: set by libavformat, must not be modified by the caller. encoding: unused

Definition at line 841 of file avformat.h.

Referenced by ff_add_attached_pic(), ff_free_stream(), ff_id3v2_parse_apic(), id3_has_changed_values(), mov_read_chapters(), mov_read_covr(), and stream_params_copy().

◆ event_flags

int AVStream::event_flags

Flags indicating events happening on the stream, a combination of AVSTREAM_EVENT_FLAG_*.

Definition at line 886 of file avformat.h.

Referenced by decode_info_header(), ff_vorbis_stream_comment(), hls_read_packet(), map_auto_audio(), map_auto_video(), read_frame_internal(), and stream_params_copy().

◆ r_frame_rate

AVRational AVStream::r_frame_rate

Real base framerate of the stream.

This is the lowest framerate with which all timestamps can be represented accurately (it is the least common multiple of all framerates in the stream). Note, this value is just a guess! For example, if the time base is 1/90000 and all frames have either approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.

Definition at line 909 of file avformat.h.

Referenced by add_video_stream(), av_guess_frame_rate(), avformat_find_stream_info(), avformat_transfer_internal_stream_timing_info(), compute_frame_duration(), copy_stream_props(), decode_info_header(), dshow_add_device(), dump_stream_format(), dvdvideo_video_stream_add(), ff_img_read_header(), ff_rfps_calculate(), ff_rm_read_mdpr_codecdata(), init_video_stream(), lavfi_read_header(), mkv_write_track(), mov_read_trak(), movie_config_output_props(), mxf_parse_structural_metadata(), nuv_header(), ogg_build_vp8_headers(), r3d_read_red1(), reopen_demux_for_component(), show_stream(), stream_params_copy(), streamcopy_init(), v4l2_set_parameters(), decklink_input_callback::VideoInputFrameArrived(), and write_streaminfo().

◆ pts_wrap_bits

int AVStream::pts_wrap_bits

The documentation for this struct was generated from the following file: