FFmpegKit iOS / macOS / tvOS API 6.0
Loading...
Searching...
No Matches
fftools_ffmpeg.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 * Copyright (c) 2018-2022 Taner Sener
4 * Copyright (c) 2023 ARTHENICA LTD
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * This file is the modified version of ffmpeg.h file living in ffmpeg source code under the fftools folder. We
23 * manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied
24 * by us to develop mobile-ffmpeg and later ffmpeg-kit libraries.
25 *
26 * ffmpeg-kit changes by ARTHENICA LTD
27 *
28 * 07.2023
29 * --------------------------------------------------------
30 * - FFmpeg 6.0 changes migrated
31 * - WARN_MULTIPLE_OPT_USAGE, MATCH_PER_STREAM_OPT, MATCH_PER_TYPE_OPT, SPECIFIER_OPT_FMT declarations migrated to
32 * ffmpeg_mux.h
33 * - "class" member field renamed as clazz
34 * - time field in set_report_callback updated as double
35 *
36 * mobile-ffmpeg / ffmpeg-kit changes by Taner Sener
37 *
38 * 09.2022
39 * --------------------------------------------------------
40 * - config.h include added back
41 * - volatile dropped from thread local variables
42 * - dropped signatures of ffmpeg_opt.c methods called by both ffmpeg and ffprobe
43 *
44 * 06.2020
45 * --------------------------------------------------------
46 * - cancel_operation() method signature updated with id
47 *
48 * 12.2019
49 * --------------------------------------------------------
50 * - concurrent execution support ("__thread" specifier added to variables used by multiple threads,
51 * signatures of ffmpeg_opt.c methods called by both ffmpeg and ffprobe added)
52 *
53 * 03.2019
54 * --------------------------------------------------------
55 * - config.h include removed
56 *
57 * 08.2018
58 * --------------------------------------------------------
59 * - fftools_ prefix added to file name and include guards
60 * - set_report_callback() method declared
61 * - cancel_operation() method declared
62 *
63 * 07.2018
64 * --------------------------------------------------------
65 * - include guards renamed
66 */
67
68#ifndef FFTOOLS_FFMPEG_H
69#define FFTOOLS_FFMPEG_H
70
71#include "config.h"
72
73#include <stdatomic.h>
74#include <stdint.h>
75#include <stdio.h>
76#include <signal.h>
77
78#include "fftools_cmdutils.h"
79#include "fftools_sync_queue.h"
80
81#include "libavformat/avformat.h"
82#include "libavformat/avio.h"
83
84#include "libavcodec/avcodec.h"
85#include "libavcodec/bsf.h"
86
87#include "libavfilter/avfilter.h"
88
89#include "libavutil/avutil.h"
90#include "libavutil/dict.h"
91#include "libavutil/eval.h"
92#include "libavutil/fifo.h"
93#include "libavutil/hwcontext.h"
94#include "libavutil/pixfmt.h"
95#include "libavutil/rational.h"
96#include "libavutil/thread.h"
97#include "libavutil/threadmessage.h"
98
99#include "libswresample/swresample.h"
100
101// deprecated features
102#define FFMPEG_OPT_PSNR 1
103#define FFMPEG_OPT_MAP_CHANNEL 1
104#define FFMPEG_OPT_MAP_SYNC 1
105#define FFMPEG_ROTATION_METADATA 1
106
114};
115
116#define MAX_STREAMS 1024 /* arbitrary sanity check value */
117
122};
123
124typedef struct HWDevice {
125 const char *name;
126 enum AVHWDeviceType type;
127 AVBufferRef *device_ref;
129
130/* select an input stream for an output stream */
131typedef struct StreamMap {
132 int disabled; /* 1 is this mapping is disabled by a negative map */
135 char *linklabel; /* name of an output link, for mapping lavfi outputs */
137
138#if FFMPEG_OPT_MAP_CHANNEL
139typedef struct {
140 int file_idx, stream_idx, channel_idx; // input
141 int ofile_idx, ostream_idx; // output
143#endif
144
145typedef struct OptionsContext {
147
148 /* input/output options */
149 int64_t start_time;
152 const char *format;
153
170
171 /* input options */
173 int loop;
175 float readrate;
180
193
194 /* output options */
197#if FFMPEG_OPT_MAP_CHANNEL
198 AudioChannelMap *audio_channel_maps; /* one info entry per -map_channel */
199 int nb_audio_channel_maps; /* number of (valid) -map_channel settings */
200#endif
201 const char **attachments;
203
205
207 int64_t stop_time;
214
219
220 /* indexed by output file stream index */
223
319
320typedef struct InputFilter {
321 AVFilterContext *filter;
324 uint8_t *name;
325 enum AVMediaType type; // AVMEDIA_TYPE_SUBTITLE for sub2video
326
327 AVFifo *frame_queue;
328
329 // parameters configured for this input
331
334
336 AVChannelLayout ch_layout;
337
338 AVBufferRef *hw_frames_ctx;
340
341 int eof;
343
344typedef struct OutputFilter {
345 AVFilterContext *filter;
348 uint8_t *name;
349
350 /* temporary storage until stream maps are processed */
351 AVFilterInOut *out_tmp;
352 enum AVMediaType type;
353
354 /* desired output stream properties */
356 AVRational frame_rate;
359 AVChannelLayout ch_layout;
360
361 // those are only set if no format is specified and the encoder gives us multiple options
362 // They point directly to the relevant lists of the encoder.
363 const int *formats;
364 const AVChannelLayout *ch_layouts;
365 const int *sample_rates;
367
368typedef struct FilterGraph {
369 int index;
370 const char *graph_desc;
371
372 AVFilterGraph *graph;
374 // true when the filtergraph contains only meta filters
375 // that do not modify the frame data
377
383
384typedef struct InputStream {
386 AVStream *st;
387 int discard; /* true if stream data should be discarded */
389 int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
390#define DECODING_FOR_OST 1
391#define DECODING_FOR_FILTER 2
392 int processing_needed; /* non zero if the packets must be processed */
393 // should attach FrameData as opaque_ref after decoding
395
401 AVCodecParameters *par;
402 AVCodecContext *dec_ctx;
403 const AVCodec *dec;
405 AVPacket *pkt;
406
408
410 int64_t start; /* time when read started */
411 /* predicted dts of the next packet read for this stream or (when there are
412 * several frames in a packet) of the next frame in current packet (in AV_TIME_BASE units) */
413 int64_t next_dts;
414 int64_t first_dts;
415 int64_t dts;
416
417 int64_t next_pts;
418 int64_t pts;
420
421 // the value of AVCodecParserContext.repeat_pict from the AVStream parser
422 // for the last packet returned from ifile_get_packet()
423 // -1 if unknown
424 // FIXME: this is a hack, the avstream parser should not be used
426
428
429 int64_t min_pts; /* pts with the smallest value in a current stream */
430 int64_t max_pts; /* pts with the higher value in a current stream */
431
432 // when forcing constant input framerate through -r,
433 // this contains the pts that will be given to the next decoded frame
435
436 int64_t nb_samples; /* number of samples in the last decoded audio frame before looping */
437
438 double ts_scale;
440 AVDictionary *decoder_opts;
441 AVRational framerate; /* framerate forced with -r */
444
446
448 struct { /* previous decoded subtitle and related variables */
450 int ret;
451 AVSubtitle subtitle;
453
454 struct sub2video {
455 int64_t last_pts;
456 int64_t end_pts;
457 AVFifo *sub_queue;
458 AVFrame *frame;
459 int w, h;
460 unsigned int initialize;
461 } sub2video;
462
463 /* decoded data from this stream goes into all those filters
464 * currently video and audio only */
467
469
470 /* hwaccel options */
472 enum AVHWDeviceType hwaccel_device_type;
474 enum AVPixelFormat hwaccel_output_format;
475
476 int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
477 enum AVPixelFormat hwaccel_pix_fmt;
478
479 /* stats */
480 // combined size of all the packets read
481 uint64_t data_size;
482 /* number of packets successfully read for this stream */
483 uint64_t nb_packets;
484 // number of frames/samples retrieved from the decoder
487
488 int64_t *dts_buffer;
490
491 int got_output;
493
494typedef struct LastFrameDuration {
496 int64_t duration;
498
499typedef struct InputFile {
500 int index;
501
502 AVFormatContext *ctx;
503 int eof_reached; /* true if eof reached */
504 int eagain; /* true if last read attempt returned EAGAIN */
511 int64_t ts_offset;
516 int64_t last_ts;
517 int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
519
520 /* streams that ffmpeg is aware of;
521 * there may be extra streams in ctx that are not mapped to an InputStream
522 * if new streams appear dynamically during demuxing */
525
527 float readrate;
529
530 /* when looping the input file, this queue is used by decoders to report
531 * the last frame duration back to the demuxer thread */
532 AVThreadMessageQueue *audio_duration_queue;
535
542 FKF_NB
544
545#define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0)
546#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1)
547
567};
568
569typedef struct EncStatsComponent {
571
572 uint8_t *str;
573 size_t str_len;
575
576typedef struct EncStats {
579
580 AVIOContext *io;
582
583extern const char *const forced_keyframes_const_names[];
584
585typedef enum {
588} OSTFinished ;
589
590enum {
593};
594
595typedef struct KeyframeForceCtx {
596 int type;
597
598 int64_t ref_pts;
599
600 // timestamps of the forced keyframes, in AV_TIME_BASE_Q
601 int64_t *pts;
603 int index;
604
605 AVExpr *pexpr;
607
610
611typedef struct OutputStream {
612 const AVClass *clazz;
613
614 int file_index; /* file index */
615 int index; /* stream index in the output file */
616
617 /* input stream that is the source for this output stream;
618 * may be NULL for streams with no well-defined source, e.g.
619 * attachments or outputs from complex filtergraphs */
621
622 AVStream *st; /* stream in the output file */
623 /* number of frames emitted by the video-encoding sync code */
625 /* predicted pts of the next frame to be encoded
626 * audio/video encoding only */
627 int64_t next_pts;
628 /* dts of the last packet sent to the muxing queue, in AV_TIME_BASE_Q */
630 /* pts of the last frame received from the filters, in AV_TIME_BASE_Q */
632
633 // timestamp from which the streamcopied streams should start,
634 // in AV_TIME_BASE_Q;
635 // everything before it should be discarded
637
638 // the timebase of the packets sent to the muxer
639 AVRational mux_timebase;
640 AVRational enc_timebase;
641
642 AVCodecContext *enc_ctx;
644 AVFrame *last_frame;
645 AVFrame *sq_frame;
646 AVPacket *pkt;
648 int64_t last_nb0_frames[3];
649
650 /* video only */
651 AVRational frame_rate;
652 AVRational max_frame_rate;
657#if FFMPEG_ROTATION_METADATA
659#endif
663#if FFMPEG_ROTATION_METADATA
665#endif
666
668
670
671 /* audio only */
672#if FFMPEG_OPT_MAP_CHANNEL
673 int *audio_channels_map; /* list of the channels id to pick from the source stream */
674 int audio_channels_mapped; /* number of channels in audio_channels_map */
675#endif
676
678 FILE *logfile;
679
681 char *avfilter;
682 char *filters;
684
685 AVDictionary *encoder_opts;
686 AVDictionary *sws_dict;
687 AVDictionary *swr_opts;
688 char *apad;
689 OSTFinished finished; /* no more packets should be written for this stream */
690 int unavailable; /* true if the steram is unavailable (possibly temporarily) */
691
692 // init_output_stream() has been called for this stream
693 // The encoder and the bitstream filters have been initialized and the stream
694 // parameters are set in the AVStream.
696
698
703
705
706 /* stats */
707 // combined size of all the packets sent to the muxer
709 // combined size of all the packets received from the encoder
711 // number of packets send to the muxer
712 atomic_uint_least64_t packets_written;
713 // number of frames/samples sent to the encoder
716 // number of packets received from the encoder
718
719 /* packet quality factor */
721
722 /* packet picture type */
724
725 /* frame encode sum of squared error values */
726 int64_t error[4];
727
730
733
734 /*
735 * bool on whether this stream should be utilized for splitting
736 * subtitles utilizing fix_sub_duration at random access points.
737 */
740
741typedef struct OutputFile {
742 const AVClass *clazz;
743
744 int index;
745
746 const AVOutputFormat *format;
747 const char *url;
748
751
753
755 int64_t start_time;
756
760
761extern __thread InputFile **input_files;
762extern __thread int nb_input_files;
763
764extern __thread OutputFile **output_files;
765extern __thread int nb_output_files;
766
767extern __thread FilterGraph **filtergraphs;
768extern __thread int nb_filtergraphs;
769
770extern __thread char *vstats_filename;
771extern __thread char *sdp_filename;
772
773extern __thread float audio_drift_threshold;
774extern __thread float dts_delta_threshold;
775extern __thread float dts_error_threshold;
776
777extern __thread enum VideoSyncMethod video_sync_method;
778extern __thread float frame_drop_threshold;
779extern __thread int do_benchmark;
780extern __thread int do_benchmark_all;
781extern __thread int do_hex_dump;
782extern __thread int do_pkt_dump;
783extern __thread int copy_ts;
784extern __thread int start_at_zero;
785extern __thread int copy_tb;
786extern __thread int debug_ts;
787extern __thread int exit_on_error;
788extern __thread int abort_on_flags;
789extern __thread int print_stats;
790extern __thread int64_t stats_period;
791extern __thread int qp_hist;
792extern __thread int stdin_interaction;
793extern __thread AVIOContext *progress_avio;
794extern __thread float max_error_rate;
795
796extern __thread char *filter_nbthreads;
797extern __thread int filter_complex_nbthreads;
798extern __thread int vstats_version;
799extern __thread int auto_conversion_filters;
800
801extern __thread const AVIOInterruptCB int_cb;
802
803extern __thread HWDevice *filter_hw_device;
804
805extern __thread unsigned nb_output_dumped;
806extern __thread int main_ffmpeg_return_code;
807
808extern __thread int ignore_unknown_streams;
809extern __thread int copy_unknown_streams;
810
811extern __thread int recast_media;
812
813#if FFMPEG_OPT_PSNR
814extern __thread int do_psnr;
815#endif
816
817void term_init(void);
818void term_exit(void);
819
820void show_usage(void);
821
822void remove_avoptions(AVDictionary **a, AVDictionary *b);
823void assert_avoptions(AVDictionary *m);
824
825void assert_file_overwrite(const char *filename);
826char *file_read(const char *filename);
827AVDictionary *strip_specifiers(const AVDictionary *dict);
828const AVCodec *find_codec_or_die(void *logctx, const char *name,
829 enum AVMediaType type, int encoder);
830int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global);
831
833void check_filter_outputs(void);
837
838void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub);
839
840int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);
841
842int ffmpeg_parse_options(int argc, char **argv);
843
845 const AVFrame *frame, const AVPacket *pkt,
846 uint64_t frame_num);
847
848HWDevice *hw_device_get_by_name(const char *name);
849int hw_device_init_from_string(const char *arg, HWDevice **dev);
850void hw_device_free_all(void);
851
855
856int hwaccel_decode_init(AVCodecContext *avctx);
857
858/*
859 * Initialize muxing state for the given stream, should be called
860 * after the codec/streamcopy setup has been done.
861 *
862 * Open the muxer once all the streams have been initialized.
863 */
866int of_open(const OptionsContext *o, const char *filename);
867void of_close(OutputFile **pof);
868
869void of_enc_stats_close(void);
870
871/*
872 * Send a single packet to the output, applying any bitstream filters
873 * associated with the output stream. This may result in any number
874 * of packets actually being written, depending on what bitstream
875 * filters are applied. The supplied packet is consumed and will be
876 * blank (as if newly-allocated) when this function returns.
877 *
878 * If eof is set, instead indicate EOF to all bitstream filters and
879 * therefore flush any delayed packets to the output. A blank packet
880 * must be supplied in this case.
881 */
882void of_output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof);
883int64_t of_filesize(OutputFile *of);
884
885int ifile_open(const OptionsContext *o, const char *filename);
886void ifile_close(InputFile **f);
887
898int ifile_get_packet(InputFile *f, AVPacket **pkt);
899
900/* iterate over all input streams in all input files;
901 * pass NULL to start iteration */
903
904extern const char * const opt_name_codec_names[];
905extern const char * const opt_name_codec_tags[];
906extern const char * const opt_name_frame_rates[];
907extern const char * const opt_name_top_field_first[];
908
909void set_report_callback(void (*callback)(int, float, float, int64_t, double, double, double));
910void cancel_operation(long id);
911
912#endif /* FFTOOLS_FFMPEG_H */
__thread float dts_delta_threshold
int hw_device_setup_for_encode(OutputStream *ost)
struct InputFile InputFile
__thread int copy_tb
HWAccelID
@ HWACCEL_NONE
@ HWACCEL_GENERIC
@ HWACCEL_AUTO
int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
void of_close(OutputFile **pof)
int64_t of_filesize(OutputFile *of)
__thread const AVIOInterruptCB int_cb
__thread int64_t stats_period
void term_exit(void)
const char *const forced_keyframes_const_names[]
int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global)
__thread OutputFile ** output_files
__thread char * sdp_filename
__thread enum VideoSyncMethod video_sync_method
const char *const opt_name_top_field_first[]
int of_open(const OptionsContext *o, const char *filename)
void ifile_close(InputFile **f)
__thread int print_stats
__thread int filter_complex_nbthreads
__thread int abort_on_flags
const char *const opt_name_codec_tags[]
__thread int nb_input_files
__thread float max_error_rate
__thread int recast_media
__thread int nb_output_files
__thread int copy_ts
__thread int stdin_interaction
void set_report_callback(void(*callback)(int, float, float, int64_t, double, double, double))
__thread float dts_error_threshold
int hwaccel_decode_init(AVCodecContext *avctx)
const char *const opt_name_frame_rates[]
HWDevice * hw_device_get_by_name(const char *name)
OSTFinished
@ ENCODER_FINISHED
@ MUXER_FINISHED
void show_usage(void)
__thread int copy_unknown_streams
void of_output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof)
int ifile_get_packet(InputFile *f, AVPacket **pkt)
__thread char * filter_nbthreads
AVDictionary * strip_specifiers(const AVDictionary *dict)
__thread int do_benchmark
__thread float frame_drop_threshold
__thread int vstats_version
__thread char * vstats_filename
int hw_device_setup_for_decode(InputStream *ist)
void hw_device_free_all(void)
int hw_device_setup_for_filter(FilterGraph *fg)
int init_simple_filtergraph(InputStream *ist, OutputStream *ost)
__thread float audio_drift_threshold
void cancel_operation(long id)
__thread AVIOContext * progress_avio
__thread InputFile ** input_files
void of_enc_stats_close(void)
void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
int of_write_trailer(OutputFile *of)
__thread int do_benchmark_all
__thread FilterGraph ** filtergraphs
__thread int start_at_zero
@ KF_FORCE_SOURCE
@ KF_FORCE_SOURCE_NO_DROP
__thread unsigned nb_output_dumped
void assert_file_overwrite(const char *filename)
__thread int main_ffmpeg_return_code
forced_keyframes_const
@ FKF_NB
@ FKF_PREV_FORCED_N
@ FKF_T
@ FKF_PREV_FORCED_T
@ FKF_N_FORCED
@ FKF_N
int of_stream_init(OutputFile *of, OutputStream *ost)
__thread int exit_on_error
void remove_avoptions(AVDictionary **a, AVDictionary *b)
int ifile_open(const OptionsContext *o, const char *filename)
int ffmpeg_parse_options(int argc, char **argv)
VideoSyncMethod
@ VSYNC_VFR
@ VSYNC_AUTO
@ VSYNC_PASSTHROUGH
@ VSYNC_CFR
@ VSYNC_DROP
@ VSYNC_VSCFR
__thread HWDevice * filter_hw_device
const AVCodec * find_codec_or_die(void *logctx, const char *name, enum AVMediaType type, int encoder)
__thread int nb_filtergraphs
void term_init(void)
__thread int qp_hist
int filtergraph_is_simple(FilterGraph *fg)
int hw_device_init_from_string(const char *arg, HWDevice **dev)
void check_filter_outputs(void)
const char *const opt_name_codec_names[]
int configure_filtergraph(FilterGraph *fg)
__thread int do_psnr
__thread int do_hex_dump
__thread int do_pkt_dump
__thread int debug_ts
InputStream * ist_iter(InputStream *prev)
__thread int auto_conversion_filters
char * file_read(const char *filename)
void assert_avoptions(AVDictionary *m)
struct InputStream InputStream
__thread int ignore_unknown_streams
EncStatsType
@ ENC_STATS_STREAM_IDX
@ ENC_STATS_PTS_TIME
@ ENC_STATS_SAMPLE_NUM
@ ENC_STATS_AVG_BITRATE
@ ENC_STATS_LITERAL
@ ENC_STATS_TIMEBASE
@ ENC_STATS_DTS_TIME
@ ENC_STATS_PKT_SIZE
@ ENC_STATS_FRAME_NUM_IN
@ ENC_STATS_PTS
@ ENC_STATS_FRAME_NUM
@ ENC_STATS_FILE_IDX
@ ENC_STATS_DTS
@ ENC_STATS_BITRATE
@ ENC_STATS_PTS_IN
@ ENC_STATS_TIMEBASE_IN
@ ENC_STATS_PTS_TIME_IN
@ ENC_STATS_NB_SAMPLES
void enc_stats_write(OutputStream *ost, EncStats *es, const AVFrame *frame, const AVPacket *pkt, uint64_t frame_num)
int init_complex_filtergraph(FilterGraph *fg)
enum EncStatsType type
AVIOContext * io
EncStatsComponent * components
OutputFilter ** outputs
const char * graph_desc
AVFilterGraph * graph
InputFilter ** inputs
AVBufferRef * device_ref
enum AVHWDeviceType type
const char * name
int64_t ts_offset
int64_t ts_offset_discont
AVFormatContext * ctx
int64_t input_ts_offset
AVThreadMessageQueue * audio_duration_queue
int64_t recording_time
int64_t last_ts
int64_t start_time_effective
int audio_duration_queue_size
InputStream ** streams
int64_t start_time
AVBufferRef * hw_frames_ctx
uint8_t * name
struct InputStream * ist
int32_t * displaymatrix
AVFifo * frame_queue
AVFilterContext * filter
AVChannelLayout ch_layout
enum AVMediaType type
struct FilterGraph * graph
AVRational sample_aspect_ratio
unsigned int initialize
marks if sub2video_update should force an initialization
AVFifo * sub_queue
queue of AVSubtitle* before filter init
enum AVPixelFormat hwaccel_pix_fmt
AVFrame * decoded_frame
int64_t * dts_buffer
int64_t dts
dts of the last packet read for this stream (in AV_TIME_BASE units)
enum AVPixelFormat hwaccel_output_format
int64_t cfr_next_pts
AVCodecContext * dec_ctx
int64_t pts
current pts of the decoded frame (in AV_TIME_BASE units)
enum HWAccelID hwaccel_id
uint64_t data_size
int64_t filter_in_rescale_delta_last
AVCodecParameters * par
AVPacket * pkt
int64_t first_dts
dts of the first packet read for this stream (in AV_TIME_BASE units)
uint64_t samples_decoded
int64_t next_pts
synthetic pts for the next decode frame (in AV_TIME_BASE units)
struct InputStream::@3 prev_sub
uint64_t frames_decoded
AVStream * st
InputFilter ** filters
int(* hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame)
uint64_t nb_packets
AVSubtitle subtitle
char * hwaccel_device
AVRational framerate_guessed
int64_t prev_pkt_pts
AVDictionary * decoder_opts
const AVCodec * dec
enum AVHWDeviceType hwaccel_device_type
int64_t nb_samples
AVRational framerate
double expr_const_values[FKF_NB]
SpecifierOpt * fps_mode
SpecifierOpt * metadata_map
int nb_copy_initial_nonkeyframes
SpecifierOpt * frame_pix_fmts
SpecifierOpt * dump_attachment
SpecifierOpt * autoscale
int nb_muxing_queue_data_threshold
SpecifierOpt * frame_aspect_ratios
SpecifierOpt * pass
SpecifierOpt * filter_scripts
SpecifierOpt * copy_initial_nonkeyframes
SpecifierOpt * guess_layout_max
const char * format
SpecifierOpt * enc_time_bases
SpecifierOpt * max_frame_rates
int64_t input_ts_offset
SpecifierOpt * audio_sample_rate
SpecifierOpt * max_frames
StreamMap * stream_maps
SpecifierOpt * frame_sizes
SpecifierOpt * muxing_queue_data_threshold
SpecifierOpt * display_hflips
SpecifierOpt * discard
SpecifierOpt * forced_key_frames
SpecifierOpt * hwaccel_devices
SpecifierOpt * filters
SpecifierOpt * metadata
SpecifierOpt * enc_stats_pre
SpecifierOpt * autorotate
SpecifierOpt * disposition
SpecifierOpt * enc_stats_post
SpecifierOpt * fix_sub_duration_heartbeat
float shortest_buf_duration
SpecifierOpt * sample_fmts
SpecifierOpt * audio_channels
SpecifierOpt * codec_names
SpecifierOpt * canvas_sizes
SpecifierOpt * reinit_filters
SpecifierOpt * display_vflips
SpecifierOpt * passlogfiles
SpecifierOpt * frame_rates
SpecifierOpt * bits_per_raw_sample
SpecifierOpt * enc_stats_pre_fmt
SpecifierOpt * mux_stats_fmt
SpecifierOpt * intra_matrices
SpecifierOpt * apad
SpecifierOpt * chroma_intra_matrices
SpecifierOpt * top_field_first
SpecifierOpt * audio_ch_layouts
SpecifierOpt * display_rotations
SpecifierOpt * force_fps
SpecifierOpt * qscale
SpecifierOpt * copy_prior_start
SpecifierOpt * max_muxing_queue_size
int nb_fix_sub_duration_heartbeat
SpecifierOpt * rc_overrides
const char ** attachments
SpecifierOpt * hwaccels
SpecifierOpt * program
SpecifierOpt * codec_tags
SpecifierOpt * time_bases
SpecifierOpt * presets
SpecifierOpt * ts_scale
SpecifierOpt * fix_sub_duration
SpecifierOpt * inter_matrices
SpecifierOpt * hwaccel_output_formats
SpecifierOpt * mux_stats
SpecifierOpt * enc_stats_post_fmt
SpecifierOpt * bitstream_filters
AudioChannelMap * audio_channel_maps
OptionGroup * g
const AVOutputFormat * format
SyncQueue * sq_encode
const char * url
OutputStream ** streams
int64_t start_time
start time in microseconds == AV_TIME_BASE units
const AVClass * clazz
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
AVFilterInOut * out_tmp
struct OutputStream * ost
AVFilterContext * filter
const int * formats
const AVChannelLayout * ch_layouts
struct FilterGraph * graph
AVChannelLayout ch_layout
const int * sample_rates
AVRational frame_rate
enum AVMediaType type
uint64_t data_size_mux
AVDictionary * swr_opts
unsigned int fix_sub_duration_heartbeat
int copy_initial_nonkeyframes
int64_t last_mux_dts
AVRational mux_timebase
int64_t vsync_frame_number
OSTFinished finished
int * audio_channels_map
AVPacket * pkt
AVRational frame_aspect_ratio
double rotate_override_value
int64_t last_filter_pts
uint64_t data_size_enc
int64_t ts_copy_start
AVFrame * last_frame
EncStats enc_stats_pre
int64_t error[4]
uint64_t frames_encoded
enum VideoSyncMethod vsync_method
InputStream * ist
KeyframeForceCtx kf
AVRational max_frame_rate
AVRational enc_timebase
AVFrame * filtered_frame
const char * attachment_filename
const AVClass * clazz
AVFrame * sq_frame
AVRational frame_rate
int64_t last_nb0_frames[3]
AVCodecContext * enc_ctx
AVDictionary * encoder_opts
AVStream * st
char * filters
filtergraph associated to the -filter option
atomic_uint_least64_t packets_written
EncStats enc_stats_post
uint64_t samples_encoded
char * filters_script
filtergraph script associated to the -filter_script option
AVDictionary * sws_dict
OutputFilter * filter
uint64_t packets_encoded
int64_t last_dropped
char * logfile_prefix
char * linklabel