FFmpeg
ffmpeg.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef FFTOOLS_FFMPEG_H
20 #define FFTOOLS_FFMPEG_H
21 
22 #include "config.h"
23 
24 #include <stdatomic.h>
25 #include <stdint.h>
26 #include <stdio.h>
27 #include <signal.h>
28 
29 #include "cmdutils.h"
30 #include "ffmpeg_sched.h"
31 #include "sync_queue.h"
32 
33 #include "libavformat/avformat.h"
34 #include "libavformat/avio.h"
35 
36 #include "libavcodec/avcodec.h"
37 #include "libavcodec/bsf.h"
38 
39 #include "libavfilter/avfilter.h"
40 
41 #include "libavutil/avutil.h"
42 #include "libavutil/dict.h"
43 #include "libavutil/eval.h"
44 #include "libavutil/fifo.h"
45 #include "libavutil/hwcontext.h"
46 #include "libavutil/pixfmt.h"
47 #include "libavutil/rational.h"
48 #include "libavutil/thread.h"
50 
52 
53 // deprecated features
54 #define FFMPEG_OPT_QPHIST 1
55 #define FFMPEG_OPT_ADRIFT_THRESHOLD 1
56 #define FFMPEG_OPT_ENC_TIME_BASE_NUM 1
57 #define FFMPEG_OPT_TOP 1
58 #define FFMPEG_OPT_FORCE_KF_SOURCE_NO_DROP 1
59 #define FFMPEG_OPT_VSYNC_DROP 1
60 #define FFMPEG_OPT_VSYNC 1
61 #define FFMPEG_OPT_FILTER_SCRIPT 1
62 
63 #define FFMPEG_ERROR_RATE_EXCEEDED FFERRTAG('E', 'R', 'E', 'D')
64 
66  VSYNC_AUTO = -1,
71 #if FFMPEG_OPT_VSYNC_DROP
73 #endif
74 };
75 
79 };
80 
81 enum HWAccelID {
85 };
86 
91 };
92 
96 };
97 
107 };
108 
109 typedef struct HWDevice {
110  const char *name;
113 } HWDevice;
114 
115 /* select an input stream for an output stream */
116 typedef struct StreamMap {
117  int disabled; /* 1 is this mapping is disabled by a negative map */
120  char *linklabel; /* name of an output link, for mapping lavfi outputs */
121 } StreamMap;
122 
123 typedef struct OptionsContext {
125 
126  /* input/output options */
130  const char *format;
131 
140 
141  /* input options */
143  int loop;
144  int rate_emu;
145  float readrate;
151 
158 
159  /* output options */
162  const char **attachments;
164 
166 
170  float mux_preload;
173  int shortest;
174  int bitexact;
175 
180 
181  // keys are stream indices
183 
201 #if FFMPEG_OPT_TOP
203 #endif
209 #if FFMPEG_OPT_FILTER_SCRIPT
211 #endif
237 
241  IFILTER_FLAG_CFR = (1 << 2),
242 };
243 
244 typedef struct InputFilterOptions {
247 
248  uint8_t *name;
249 
250  /* When IFILTER_FLAG_CFR is set, the stream is guaranteed to be CFR with
251  * this framerate.
252  *
253  * Otherwise, this is an estimate that should not be relied upon to be
254  * accurate */
256 
259 
260  // a combination of IFILTER_FLAG_*
261  unsigned flags;
262 
265 
266 typedef struct InputFilter {
268  uint8_t *name;
269 } InputFilter;
270 
271 typedef struct OutputFilter {
272  struct OutputStream *ost;
274  uint8_t *name;
275 
276  /* for filters that are not yet bound to an output stream,
277  * this stores the output linklabel, if any */
278  uint8_t *linklabel;
279 
281 
284 } OutputFilter;
285 
286 typedef struct FilterGraph {
287  const AVClass *class;
288  int index;
289 
294 } FilterGraph;
295 
298  // input timestamps are unreliable (guessed by demuxer)
300  // decoder should override timestamps by fixed framerate
301  // from DecoderOpts.framerate
303 #if FFMPEG_OPT_TOP
305 #endif
307 };
308 
309 typedef struct DecoderOpts {
310  int flags;
311 
312  char *name;
313  void *log_parent;
314 
315  const AVCodec *codec;
317 
318  /* hwaccel options */
323 
325 
326  // Either forced (when DECODER_FLAG_FRAMERATE_FORCED is set) or
327  // estimated (otherwise) video framerate.
329 } DecoderOpts;
330 
331 typedef struct Decoder {
332  const AVClass *class;
333 
335 
336  const uint8_t *subtitle_header;
338 
339  // number of frames/samples retrieved from the decoder
340  uint64_t frames_decoded;
341  uint64_t samples_decoded;
342  uint64_t decode_errors;
343 } Decoder;
344 
345 typedef struct InputStream {
346  const AVClass *class;
347 
348  /* parent source */
349  struct InputFile *file;
350 
351  int index;
352 
355 
356  /**
357  * Codec parameters - to be used by the decoding/streamcopy code.
358  * st->codecpar should not be accessed, because it may be modified
359  * concurrently by the demuxing thread.
360  */
363  const AVCodec *dec;
364 
365  /* framerate forced with -r */
367 #if FFMPEG_OPT_TOP
369 #endif
370 
372 
374 
375  /* decoded data from this stream goes into all those filters
376  * currently video and audio only */
379 
380  /*
381  * Output targets that do not go through lavfi, i.e. subtitles or
382  * streamcopy. Those two cases are distinguished by the OutputStream
383  * having an encoder or not.
384  */
387 } InputStream;
388 
389 typedef struct InputFile {
390  const AVClass *class;
391 
392  int index;
393 
397  /**
398  * Effective format start time based on enabled streams.
399  */
402  /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
404 
405  /* streams that ffmpeg is aware of;
406  * there may be extra streams in ctx that are not mapped to an InputStream
407  * if new streams appear dynamically during demuxing */
410 } InputFile;
411 
419 };
420 
421 #define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0)
422 #define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1)
423 
444 };
445 
446 typedef struct EncStatsComponent {
448 
449  uint8_t *str;
450  size_t str_len;
452 
453 typedef struct EncStats {
456 
458 
461 } EncStats;
462 
463 extern const char *const forced_keyframes_const_names[];
464 
465 typedef enum {
468 } OSTFinished ;
469 
470 enum {
472 #if FFMPEG_OPT_FORCE_KF_SOURCE_NO_DROP
474 #endif
475 };
476 
477 typedef struct KeyframeForceCtx {
478  int type;
479 
481 
482  // timestamps of the forced keyframes, in AV_TIME_BASE_Q
484  int nb_pts;
485  int index;
486 
489 
492 
493 typedef struct Encoder Encoder;
494 
495 typedef struct OutputStream {
496  const AVClass *class;
497 
499 
500  /* parent muxer */
501  struct OutputFile *file;
502 
503  int index; /* stream index in the output file */
504 
505  /**
506  * Codec parameters for packets submitted to the muxer (i.e. before
507  * bitstream filtering, if any).
508  */
510 
511  /* input stream that is the source for this output stream;
512  * may be NULL for streams with no well-defined source, e.g.
513  * attachments or outputs from complex filtergraphs */
515 
516  AVStream *st; /* stream in the output file */
517 
519 
522 
523  /* video only */
527  int is_cfr;
529 #if FFMPEG_OPT_TOP
531 #endif
533  int bitexact;
535 
537 
539 
541  FILE *logfile;
542 
544 
548  char *apad;
549 
551 
553 
554  /* stats */
555  // number of packets send to the muxer
557  // number of frames/samples sent to the encoder
558  uint64_t frames_encoded;
559  uint64_t samples_encoded;
560 
561  /* packet quality factor */
563 
566 
567  /*
568  * bool on whether this stream should be utilized for splitting
569  * subtitles utilizing fix_sub_duration at random access points.
570  */
572 } OutputStream;
573 
574 typedef struct OutputFile {
575  const AVClass *class;
576 
577  int index;
578 
580  const char *url;
581 
584 
585  int64_t recording_time; ///< desired length of the resulting file in microseconds == AV_TIME_BASE units
586  int64_t start_time; ///< start time in microseconds == AV_TIME_BASE units
587 
588  int shortest;
589  int bitexact;
590 } OutputFile;
591 
592 // optionally attached as opaque_ref to decoded AVFrames
593 typedef struct FrameData {
594  // demuxer-estimated dts in AV_TIME_BASE_Q,
595  // to be used when real dts is missing
597 
598  // properties that come from the decoder
599  struct {
600  uint64_t frame_num;
601 
604  } dec;
605 
607 
609 
611 
613 } FrameData;
614 
615 extern InputFile **input_files;
616 extern int nb_input_files;
617 
618 extern OutputFile **output_files;
619 extern int nb_output_files;
620 
621 extern FilterGraph **filtergraphs;
622 extern int nb_filtergraphs;
623 
624 // standalone decoders (not tied to demuxed streams)
625 extern Decoder **decoders;
626 extern int nb_decoders;
627 
628 extern char *vstats_filename;
629 
630 extern float dts_delta_threshold;
631 extern float dts_error_threshold;
632 
634 extern float frame_drop_threshold;
635 extern int do_benchmark;
636 extern int do_benchmark_all;
637 extern int do_hex_dump;
638 extern int do_pkt_dump;
639 extern int copy_ts;
640 extern int start_at_zero;
641 extern int copy_tb;
642 extern int debug_ts;
643 extern int exit_on_error;
644 extern int abort_on_flags;
645 extern int print_stats;
646 extern int64_t stats_period;
647 extern int stdin_interaction;
648 extern AVIOContext *progress_avio;
649 extern float max_error_rate;
650 
651 extern char *filter_nbthreads;
652 extern int filter_complex_nbthreads;
653 extern int vstats_version;
654 extern int auto_conversion_filters;
655 
656 extern const AVIOInterruptCB int_cb;
657 
658 extern const OptionDef options[];
659 extern HWDevice *filter_hw_device;
660 
662 
663 extern int ignore_unknown_streams;
664 extern int copy_unknown_streams;
665 
666 extern int recast_media;
667 
668 extern FILE *vstats_file;
669 
670 void term_init(void);
671 void term_exit(void);
672 
673 void show_usage(void);
674 
677 
678 int assert_file_overwrite(const char *filename);
680 int find_codec(void *logctx, const char *name,
681  enum AVMediaType type, int encoder, const AVCodec **codec);
682 int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global);
683 
684 int filtergraph_is_simple(const FilterGraph *fg);
686  char *graph_desc,
687  Scheduler *sch, unsigned sch_idx_enc);
689 
690 /**
691  * Get our axiliary frame data attached to the frame, allocating it
692  * if needed.
693  */
695 
697 
700 
702  unsigned sched_idx_enc);
703 
704 /**
705  * Create a new filtergraph in the global filtergraph list.
706  *
707  * @param graph_desc Graph description; an av_malloc()ed string, filtergraph
708  * takes ownership of it.
709  */
710 int fg_create(FilterGraph **pfg, char *graph_desc, Scheduler *sch);
711 
712 void fg_free(FilterGraph **pfg);
713 
714 void fg_send_command(FilterGraph *fg, double time, const char *target,
715  const char *command, const char *arg, int all_filters);
716 
717 int ffmpeg_parse_options(int argc, char **argv, Scheduler *sch);
718 
720  const AVFrame *frame, const AVPacket *pkt,
721  uint64_t frame_num);
722 
723 HWDevice *hw_device_get_by_name(const char *name);
725 int hw_device_init_from_string(const char *arg, HWDevice **dev);
727  const char *device,
728  HWDevice **dev_out);
729 void hw_device_free_all(void);
730 
731 /**
732  * Get a hardware device to be used with this filtergraph.
733  * The returned reference is owned by the callee, the caller
734  * must ref it explicitly for long-term use.
735  */
737 
738 /**
739  * Create a standalone decoder.
740  */
741 int dec_create(const OptionsContext *o, const char *arg, Scheduler *sch);
742 
743 /**
744  * @param dec_opts Dictionary filled with decoder options. Its ownership
745  * is transferred to the decoder.
746  * @param param_out If non-NULL, media properties after opening the decoder
747  * are written here.
748  *
749  * @retval ">=0" non-negative scheduler index on success
750  * @retval "<0" an error code on failure
751  */
752 int dec_init(Decoder **pdec, Scheduler *sch,
753  AVDictionary **dec_opts, const DecoderOpts *o,
754  AVFrame *param_out);
755 void dec_free(Decoder **pdec);
756 
757 /*
758  * Called by filters to connect decoder's output to given filtergraph input.
759  *
760  * @param opts filtergraph input options, to be filled by this function
761  */
763 
764 int enc_alloc(Encoder **penc, const AVCodec *codec,
765  Scheduler *sch, unsigned sch_idx);
766 void enc_free(Encoder **penc);
767 
768 int enc_open(void *opaque, const AVFrame *frame);
769 
770 int enc_loopback(Encoder *enc);
771 
772 /*
773  * Initialize muxing state for the given stream, should be called
774  * after the codec/streamcopy setup has been done.
775  *
776  * Open the muxer once all the streams have been initialized.
777  */
780 int of_open(const OptionsContext *o, const char *filename, Scheduler *sch);
781 void of_free(OutputFile **pof);
782 
783 void of_enc_stats_close(void);
784 
786 
787 int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch);
788 void ifile_close(InputFile **f);
789 
791 int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple,
793 
794 /**
795  * Find an unused input stream of given type.
796  */
798 
799 /* iterate over all input streams in all input files;
800  * pass NULL to start iteration */
802 
803 /* iterate over all output streams in all output files;
804  * pass NULL to start iteration */
806 
807 void update_benchmark(const char *fmt, ...);
808 
809 #define SPECIFIER_OPT_FMT_str "%s"
810 #define SPECIFIER_OPT_FMT_i "%i"
811 #define SPECIFIER_OPT_FMT_i64 "%"PRId64
812 #define SPECIFIER_OPT_FMT_ui64 "%"PRIu64
813 #define SPECIFIER_OPT_FMT_f "%f"
814 #define SPECIFIER_OPT_FMT_dbl "%lf"
815 
816 #define WARN_MULTIPLE_OPT_USAGE(optname, type, idx, st)\
817 {\
818  char namestr[128] = "";\
819  const SpecifierOpt *so = &o->optname.opt[idx];\
820  const char *spec = so->specifier && so->specifier[0] ? so->specifier : "";\
821  snprintf(namestr, sizeof(namestr), "-%s", o->optname.opt_canon->name);\
822  if (o->optname.opt_canon->flags & OPT_HAS_ALT) {\
823  const char * const *names_alt = o->optname.opt_canon->u1.names_alt;\
824  for (int _i = 0; names_alt[_i]; _i++)\
825  av_strlcatf(namestr, sizeof(namestr), "/-%s", names_alt[_i]);\
826  }\
827  av_log(NULL, AV_LOG_WARNING, "Multiple %s options specified for stream %d, only the last option '-%s%s%s "SPECIFIER_OPT_FMT_##type"' will be used.\n",\
828  namestr, st->index, o->optname.opt_canon->name, spec[0] ? ":" : "", spec, so->u.type);\
829 }
830 
831 #define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\
832 {\
833  int _ret, _matches = 0, _match_idx;\
834  for (int _i = 0; _i < o->name.nb_opt; _i++) {\
835  char *spec = o->name.opt[_i].specifier;\
836  if ((_ret = check_stream_specifier(fmtctx, st, spec)) > 0) {\
837  outvar = o->name.opt[_i].u.type;\
838  _match_idx = _i;\
839  _matches++;\
840  } else if (_ret < 0)\
841  return _ret;\
842  }\
843  if (_matches > 1 && o->name.opt_canon)\
844  WARN_MULTIPLE_OPT_USAGE(name, type, _match_idx, st);\
845 }
846 
847 const char *opt_match_per_type_str(const SpecifierOptList *sol,
848  char mediatype);
849 
850 int muxer_thread(void *arg);
851 int encoder_thread(void *arg);
852 
853 #endif /* FFTOOLS_FFMPEG_H */
OptionsContext::readrate
float readrate
Definition: ffmpeg.h:145
KeyframeForceCtx::pts
int64_t * pts
Definition: ffmpeg.h:483
Decoder::subtitle_header
const uint8_t * subtitle_header
Definition: ffmpeg.h:336
pthread_mutex_t
_fmutex pthread_mutex_t
Definition: os2threads.h:53
FrameData::par_enc
AVCodecParameters * par_enc
Definition: ffmpeg.h:612
AVCodec
AVCodec.
Definition: codec.h:187
OptionsContext::input_ts_offset
int64_t input_ts_offset
Definition: ffmpeg.h:142
InputFile::start_time
int64_t start_time
Definition: ffmpeg.h:403
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
name
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 default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
OptionsContext::stop_time
int64_t stop_time
Definition: ffmpeg.h:168
StreamMap::file_index
int file_index
Definition: ffmpeg.h:118
KeyframeForceCtx::dropped_keyframe
int dropped_keyframe
Definition: ffmpeg.h:490
OutputFilter::graph
struct FilterGraph * graph
Definition: ffmpeg.h:273
FKF_PREV_FORCED_T
@ FKF_PREV_FORCED_T
Definition: ffmpeg.h:416
OptionsContext::force_fps
SpecifierOptList force_fps
Definition: ffmpeg.h:192
OptionsContext::forced_key_frames
SpecifierOptList forced_key_frames
Definition: ffmpeg.h:190
VSYNC_VFR
@ VSYNC_VFR
Definition: ffmpeg.h:69
EncStatsComponent::type
enum EncStatsType type
Definition: ffmpeg.h:447
nb_filtergraphs
int nb_filtergraphs
Definition: ffmpeg.c:132
ofilter_bind_ost
int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, unsigned sched_idx_enc)
Definition: ffmpeg_filter.c:765
FrameData
Definition: ffmpeg.h:593
ENC_STATS_PTS
@ ENC_STATS_PTS
Definition: ffmpeg.h:432
ENC_STATS_FRAME_NUM_IN
@ ENC_STATS_FRAME_NUM_IN
Definition: ffmpeg.h:429
FKF_PREV_FORCED_N
@ FKF_PREV_FORCED_N
Definition: ffmpeg.h:415
DecoderOpts
Definition: ffmpeg.h:309
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:47
OutputStream::enc_ctx
AVCodecContext * enc_ctx
Definition: ffmpeg.h:521
DECODER_FLAG_SEND_END_TS
@ DECODER_FLAG_SEND_END_TS
Definition: ffmpeg.h:306
thread.h
enc_open
int enc_open(void *opaque, const AVFrame *frame)
Definition: ffmpeg_enc.c:168
FilterGraph::inputs
InputFilter ** inputs
Definition: ffmpeg.h:290
ENC_STATS_DTS
@ ENC_STATS_DTS
Definition: ffmpeg.h:436
fg_free
void fg_free(FilterGraph **pfg)
Definition: ffmpeg_filter.c:892
FrameData::dts_est
int64_t dts_est
Definition: ffmpeg.h:596
LATENCY_PROBE_DEC_POST
@ LATENCY_PROBE_DEC_POST
Definition: ffmpeg.h:101
vstats_file
FILE * vstats_file
Definition: ffmpeg.c:109
OutputStream::par_in
AVCodecParameters * par_in
Codec parameters for packets submitted to the muxer (i.e.
Definition: ffmpeg.h:509
InputStream::outputs
struct OutputStream ** outputs
Definition: ffmpeg.h:385
KeyframeForceCtx::nb_pts
int nb_pts
Definition: ffmpeg.h:484
frame_drop_threshold
float frame_drop_threshold
Definition: ffmpeg_opt.c:68
rational.h
int64_t
long long int64_t
Definition: coverity.c:34
InputStream::user_set_discard
int user_set_discard
Definition: ffmpeg.h:354
OutputStream::packets_written
atomic_uint_least64_t packets_written
Definition: ffmpeg.h:556
OptionsContext::bits_per_raw_sample
SpecifierOptList bits_per_raw_sample
Definition: ffmpeg.h:229
ENC_STATS_AVG_BITRATE
@ ENC_STATS_AVG_BITRATE
Definition: ffmpeg.h:442
OutputStream::keep_pix_fmt
int keep_pix_fmt
Definition: ffmpeg.h:552
OptionsContext::audio_ch_layouts
SpecifierOptList audio_ch_layouts
Definition: ffmpeg.h:133
OptionsContext::qscale
SpecifierOptList qscale
Definition: ffmpeg.h:189
parse_and_set_vsync
int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global)
Definition: ffmpeg_opt.c:192
OptionsContext::nb_attachments
int nb_attachments
Definition: ffmpeg.h:163
OutputFile::start_time
int64_t start_time
start time in microseconds == AV_TIME_BASE units
Definition: ffmpeg.h:586
progress_avio
AVIOContext * progress_avio
Definition: ffmpeg.c:123
InputFile::index
int index
Definition: ffmpeg.h:392
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:344
OptionsContext::presets
SpecifierOptList presets
Definition: ffmpeg.h:205
DECODER_FLAG_FRAMERATE_FORCED
@ DECODER_FLAG_FRAMERATE_FORCED
Definition: ffmpeg.h:302
of_filesize
int64_t of_filesize(OutputFile *of)
Definition: ffmpeg_mux.c:876
OptionsContext::mux_max_delay
float mux_max_delay
Definition: ffmpeg.h:171
OptionsContext::display_hflips
SpecifierOptList display_hflips
Definition: ffmpeg.h:195
DecoderOpts::par
const AVCodecParameters * par
Definition: ffmpeg.h:316
FKF_T
@ FKF_T
Definition: ffmpeg.h:417
sync_queue.h
ENC_STATS_LITERAL
@ ENC_STATS_LITERAL
Definition: ffmpeg.h:425
OptionsContext::subtitle_disable
int subtitle_disable
Definition: ffmpeg.h:178
OptionsContext::passlogfiles
SpecifierOptList passlogfiles
Definition: ffmpeg.h:217
OutputStream::index
int index
Definition: ffmpeg.h:503
b
#define b
Definition: input.c:41
FilterGraph::index
int index
Definition: ffmpeg.h:288
KeyframeForceCtx::type
int type
Definition: ffmpeg.h:478
DecoderOpts::hwaccel_id
enum HWAccelID hwaccel_id
Definition: ffmpeg.h:319
InputStream::nb_filters
int nb_filters
Definition: ffmpeg.h:378
int_cb
const AVIOInterruptCB int_cb
Definition: ffmpeg.c:328
atomic_int
intptr_t atomic_int
Definition: stdatomic.h:55
OutputStream::sws_dict
AVDictionary * sws_dict
Definition: ffmpeg.h:546
nb_output_files
int nb_output_files
Definition: ffmpeg.c:129
show_usage
void show_usage(void)
Definition: ffmpeg_opt.c:1172
fg_create
int fg_create(FilterGraph **pfg, char *graph_desc, Scheduler *sch)
Create a new filtergraph in the global filtergraph list.
Definition: ffmpeg_filter.c:957
FilterGraph::nb_inputs
int nb_inputs
Definition: ffmpeg.h:291
OptionsContext::bitexact
int bitexact
Definition: ffmpeg.h:174
AVDictionary
Definition: dict.c:34
HWDevice
Definition: ffmpeg.h:109
hw_device_init_from_string
int hw_device_init_from_string(const char *arg, HWDevice **dev)
Definition: ffmpeg_hw.c:94
nb_input_files
int nb_input_files
Definition: ffmpeg.c:126
enc_stats_write
void enc_stats_write(OutputStream *ost, EncStats *es, const AVFrame *frame, const AVPacket *pkt, uint64_t frame_num)
Definition: ffmpeg_enc.c:495
IFILTER_FLAG_AUTOROTATE
@ IFILTER_FLAG_AUTOROTATE
Definition: ffmpeg.h:239
LATENCY_PROBE_ENC_POST
@ LATENCY_PROBE_ENC_POST
Definition: ffmpeg.h:105
OptionsContext::format
const char * format
Definition: ffmpeg.h:130
InputFile::input_sync_ref
int input_sync_ref
Definition: ffmpeg.h:396
init_simple_filtergraph
int init_simple_filtergraph(InputStream *ist, OutputStream *ost, char *graph_desc, Scheduler *sch, unsigned sch_idx_enc)
Definition: ffmpeg_filter.c:1080
ost
static AVStream * ost
Definition: vaapi_transcode.c:42
OutputStream::fix_sub_duration_heartbeat
unsigned int fix_sub_duration_heartbeat
Definition: ffmpeg.h:571
enc_loopback
int enc_loopback(Encoder *enc)
Definition: ffmpeg_enc.c:962
OutputStream::ist
InputStream * ist
Definition: ffmpeg.h:514
OptionsContext::frame_pix_fmts
SpecifierOptList frame_pix_fmts
Definition: ffmpeg.h:139
OutputStream::file
struct OutputFile * file
Definition: ffmpeg.h:501
OptionsContext::canvas_sizes
SpecifierOptList canvas_sizes
Definition: ffmpeg.h:215
ENC_STATS_TIMEBASE_IN
@ ENC_STATS_TIMEBASE_IN
Definition: ffmpeg.h:431
AVIOInterruptCB
Callback for checking whether to abort blocking functions.
Definition: avio.h:59
OptionDef
Definition: cmdutils.h:126
InputStream::nb_outputs
int nb_outputs
Definition: ffmpeg.h:386
FrameData::frame_num
uint64_t frame_num
Definition: ffmpeg.h:600
OutputFile::nb_streams
int nb_streams
Definition: ffmpeg.h:583
InputStream
Definition: ffmpeg.h:345
filter_nbthreads
char * filter_nbthreads
Definition: ffmpeg_opt.c:82
OptionsContext::chapters_input_file
int chapters_input_file
Definition: ffmpeg.h:165
DecoderOpts::hwaccel_output_format
enum AVPixelFormat hwaccel_output_format
Definition: ffmpeg.h:322
debug_ts
int debug_ts
Definition: ffmpeg_opt.c:76
stats_period
int64_t stats_period
Definition: ffmpeg_opt.c:86
InputFilterOptions::trim_start_us
int64_t trim_start_us
Definition: ffmpeg.h:245
OptionsContext::rate_emu
int rate_emu
Definition: ffmpeg.h:144
InputFilterOptions::flags
unsigned flags
Definition: ffmpeg.h:261
OptionsContext::max_frame_rates
SpecifierOptList max_frame_rates
Definition: ffmpeg.h:137
OutputStream::vsync_method
enum VideoSyncMethod vsync_method
Definition: ffmpeg.h:526
dts_delta_threshold
float dts_delta_threshold
Definition: ffmpeg_opt.c:62
fifo.h
bsf.h
vstats_version
int vstats_version
Definition: ffmpeg_opt.c:84
FRAME_OPAQUE_SUB_HEARTBEAT
@ FRAME_OPAQUE_SUB_HEARTBEAT
Definition: ffmpeg.h:88
OptionsContext::g
OptionGroup * g
Definition: ffmpeg.h:124
Decoder::frames_decoded
uint64_t frames_decoded
Definition: ffmpeg.h:340
OptionsContext::enc_stats_pre_fmt
SpecifierOptList enc_stats_pre_fmt
Definition: ffmpeg.h:233
StreamMap::disabled
int disabled
Definition: ffmpeg.h:117
fg_finalise_bindings
int fg_finalise_bindings(FilterGraph *fg)
Definition: ffmpeg_filter.c:1205
OutputStream::logfile_prefix
char * logfile_prefix
Definition: ffmpeg.h:540
OptionsContext::mux_stats_fmt
SpecifierOptList mux_stats_fmt
Definition: ffmpeg.h:235
EncStatsComponent::str_len
size_t str_len
Definition: ffmpeg.h:450
ifile_open
int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch)
Definition: ffmpeg_demux.c:1523
DecoderOpts::log_parent
void * log_parent
Definition: ffmpeg.h:313
LatencyProbe
LatencyProbe
Definition: ffmpeg.h:98
KeyframeForceCtx::ref_pts
int64_t ref_pts
Definition: ffmpeg.h:480
type
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
Definition: writing_filters.txt:86
OptionsContext
Definition: ffmpeg.h:123
FrameData::tb
AVRational tb
Definition: ffmpeg.h:603
do_pkt_dump
int do_pkt_dump
Definition: ffmpeg_opt.c:72
fg_send_command
void fg_send_command(FilterGraph *fg, double time, const char *target, const char *command, const char *arg, int all_filters)
Definition: ffmpeg_filter.c:2878
LATENCY_PROBE_FILTER_PRE
@ LATENCY_PROBE_FILTER_PRE
Definition: ffmpeg.h:102
Decoder::samples_decoded
uint64_t samples_decoded
Definition: ffmpeg.h:341
InputFilterOptions::trim_end_us
int64_t trim_end_us
Definition: ffmpeg.h:246
InputFile
Definition: ffmpeg.h:389
OptionsContext::recording_time
int64_t recording_time
Definition: ffmpeg.h:167
input_files
InputFile ** input_files
Definition: ffmpeg.c:125
LATENCY_PROBE_DEMUX
@ LATENCY_PROBE_DEMUX
Definition: ffmpeg.h:99
OptionsContext::nb_stream_maps
int nb_stream_maps
Definition: ffmpeg.h:161
OptionsContext::audio_disable
int audio_disable
Definition: ffmpeg.h:177
OutputFile::shortest
int shortest
Definition: ffmpeg.h:588
FrameData::frame_rate_filter
AVRational frame_rate_filter
Definition: ffmpeg.h:606
pkt
AVPacket * pkt
Definition: movenc.c:59
OutputStream::enc
Encoder * enc
Definition: ffmpeg.h:520
OptionsContext::hwaccel_output_formats
SpecifierOptList hwaccel_output_formats
Definition: ffmpeg.h:156
ENC_STATS_PTS_IN
@ ENC_STATS_PTS_IN
Definition: ffmpeg.h:434
OptionsContext::metadata
SpecifierOptList metadata
Definition: ffmpeg.h:184
OptionsContext::filters
SpecifierOptList filters
Definition: ffmpeg.h:208
nb_output_dumped
atomic_uint nb_output_dumped
Definition: ffmpeg.c:120
term_init
void term_init(void)
Definition: ffmpeg.c:222
StreamMap::linklabel
char * linklabel
Definition: ffmpeg.h:120
of_free
void of_free(OutputFile **pof)
Definition: ffmpeg_mux.c:850
HWACCEL_GENERIC
@ HWACCEL_GENERIC
Definition: ffmpeg.h:84
VSYNC_VSCFR
@ VSYNC_VSCFR
Definition: ffmpeg.h:70
EncStats::components
EncStatsComponent * components
Definition: ffmpeg.h:454
assert_file_overwrite
int assert_file_overwrite(const char *filename)
Definition: ffmpeg_opt.c:614
OptionsContext::intra_matrices
SpecifierOptList intra_matrices
Definition: ffmpeg.h:198
OptionsContext::stream_groups
SpecifierOptList stream_groups
Definition: ffmpeg.h:225
FilterGraph::outputs
OutputFilter ** outputs
Definition: ffmpeg.h:292
vstats_filename
char * vstats_filename
Definition: ffmpeg_opt.c:59
OutputStream::frame_aspect_ratio
AVRational frame_aspect_ratio
Definition: ffmpeg.h:536
InputStream::framerate
AVRational framerate
Definition: ffmpeg.h:366
OutputStream::quality
atomic_int quality
Definition: ffmpeg.h:562
KF_FORCE_SOURCE_NO_DROP
@ KF_FORCE_SOURCE_NO_DROP
Definition: ffmpeg.h:473
dec_init
int dec_init(Decoder **pdec, Scheduler *sch, AVDictionary **dec_opts, const DecoderOpts *o, AVFrame *param_out)
Definition: ffmpeg_dec.c:1253
ENC_STATS_FILE_IDX
@ ENC_STATS_FILE_IDX
Definition: ffmpeg.h:426
ENCODER_FINISHED
@ ENCODER_FINISHED
Definition: ffmpeg.h:466
OptionsContext::limit_filesize
int64_t limit_filesize
Definition: ffmpeg.h:169
OptionsContext::hwaccel_devices
SpecifierOptList hwaccel_devices
Definition: ffmpeg.h:155
OptionsContext::autoscale
SpecifierOptList autoscale
Definition: ffmpeg.h:228
OutputFilter::linklabel
uint8_t * linklabel
Definition: ffmpeg.h:278
InputFilter
Definition: ffmpeg.h:266
ENC_STATS_BITRATE
@ ENC_STATS_BITRATE
Definition: ffmpeg.h:441
AVHWDeviceType
AVHWDeviceType
Definition: hwcontext.h:27
OutputFilter::ost
struct OutputStream * ost
Definition: ffmpeg.h:272
ist_filter_add
int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple, InputFilterOptions *opts)
Definition: ffmpeg_demux.c:981
OptionsContext::sample_fmts
SpecifierOptList sample_fmts
Definition: ffmpeg.h:188
LATENCY_PROBE_ENC_PRE
@ LATENCY_PROBE_ENC_PRE
Definition: ffmpeg.h:104
forced_keyframes_const
forced_keyframes_const
Definition: ffmpeg.h:412
ignore_unknown_streams
int ignore_unknown_streams
Definition: ffmpeg_opt.c:91
MUXER_FINISHED
@ MUXER_FINISHED
Definition: ffmpeg.h:467
FrameData::dec
struct FrameData::@4 dec
InputStream::filters
InputFilter ** filters
Definition: ffmpeg.h:377
max_error_rate
float max_error_rate
Definition: ffmpeg_opt.c:81
KF_FORCE_SOURCE
@ KF_FORCE_SOURCE
Definition: ffmpeg.h:471
AVExpr
Definition: eval.c:159
encoder_thread
int encoder_thread(void *arg)
Definition: ffmpeg_enc.c:881
OptionsContext::fix_sub_duration
SpecifierOptList fix_sub_duration
Definition: ffmpeg.h:213
DecoderOpts::hwaccel_device
char * hwaccel_device
Definition: ffmpeg.h:321
InputFilterOptions::name
uint8_t * name
Definition: ffmpeg.h:248
OptionsContext::shortest
int shortest
Definition: ffmpeg.h:173
InputFilter::graph
struct FilterGraph * graph
Definition: ffmpeg.h:267
OptionsContext::accurate_seek
int accurate_seek
Definition: ffmpeg.h:147
OutputStream::enc_stats_pre
EncStats enc_stats_pre
Definition: ffmpeg.h:564
command
static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Definition: vf_drawtext.c:1185
frame
static AVFrame * frame
Definition: demux_decode.c:54
OutputStream::bitexact
int bitexact
Definition: ffmpeg.h:533
arg
const char * arg
Definition: jacosubdec.c:67
KeyframeForceCtx::expr_const_values
double expr_const_values[FKF_NB]
Definition: ffmpeg.h:488
of_enc_stats_close
void of_enc_stats_close(void)
Definition: ffmpeg_mux_init.c:196
OutputStream::encoder_opts
AVDictionary * encoder_opts
Definition: ffmpeg.h:545
OptionsContext::start_time
int64_t start_time
Definition: ffmpeg.h:127
AVFormatContext
Format I/O context.
Definition: avformat.h:1255
ENC_STATS_KEYFRAME
@ ENC_STATS_KEYFRAME
Definition: ffmpeg.h:443
opts
AVDictionary * opts
Definition: movenc.c:50
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
dec_create
int dec_create(const OptionsContext *o, const char *arg, Scheduler *sch)
Create a standalone decoder.
Definition: ffmpeg_dec.c:1278
OutputFilter::name
uint8_t * name
Definition: ffmpeg.h:274
Decoder::decode_errors
uint64_t decode_errors
Definition: ffmpeg.h:342
InputStream::top_field_first
int top_field_first
Definition: ffmpeg.h:368
InputStream::st
AVStream * st
Definition: ffmpeg.h:353
dec_filter_add
int dec_filter_add(Decoder *dec, InputFilter *ifilter, InputFilterOptions *opts)
Definition: ffmpeg_dec.c:1350
forced_keyframes_const_names
const char *const forced_keyframes_const_names[]
Definition: ffmpeg_mux_init.c:2730
OptionsContext::audio_channels
SpecifierOptList audio_channels
Definition: ffmpeg.h:134
InputFile::start_time_effective
int64_t start_time_effective
Effective format start time based on enabled streams.
Definition: ffmpeg.h:400
Decoder
Definition: ffmpeg.h:331
ENC_STATS_PTS_TIME
@ ENC_STATS_PTS_TIME
Definition: ffmpeg.h:433
OptionsContext::fix_sub_duration_heartbeat
SpecifierOptList fix_sub_duration_heartbeat
Definition: ffmpeg.h:214
hw_device_init_from_type
int hw_device_init_from_type(enum AVHWDeviceType type, const char *device, HWDevice **dev_out)
Definition: ffmpeg_hw.c:245
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
EncStats::lock
pthread_mutex_t lock
Definition: ffmpeg.h:459
OptionsContext::copy_prior_start
SpecifierOptList copy_prior_start
Definition: ffmpeg.h:207
EncStats
Definition: ffmpeg.h:453
OptionsContext::program
SpecifierOptList program
Definition: ffmpeg.h:224
OutputStream::frame_rate
AVRational frame_rate
Definition: ffmpeg.h:524
copy_unknown_streams
int copy_unknown_streams
Definition: ffmpeg_opt.c:92
OptionsContext::frame_aspect_ratios
SpecifierOptList frame_aspect_ratios
Definition: ffmpeg.h:193
OptionsContext::reinit_filters
SpecifierOptList reinit_filters
Definition: ffmpeg.h:212
OptionsContext::dump_attachment
SpecifierOptList dump_attachment
Definition: ffmpeg.h:153
InputStream::fix_sub_duration
int fix_sub_duration
Definition: ffmpeg.h:373
OutputStream::top_field_first
int top_field_first
Definition: ffmpeg.h:530
FrameData::wallclock
int64_t wallclock[LATENCY_PROBE_NB]
Definition: ffmpeg.h:610
packet_data_c
const FrameData * packet_data_c(AVPacket *pkt)
Definition: ffmpeg.c:492
update_benchmark
void update_benchmark(const char *fmt,...)
Definition: ffmpeg.c:518
OptionsContext::display_vflips
SpecifierOptList display_vflips
Definition: ffmpeg.h:196
OptionsContext::max_frames
SpecifierOptList max_frames
Definition: ffmpeg.h:185
do_benchmark_all
int do_benchmark_all
Definition: ffmpeg_opt.c:70
filtergraphs
FilterGraph ** filtergraphs
Definition: ffmpeg.c:131
InputFilterOptions
Definition: ffmpeg.h:244
OptionsContext::input_sync_ref
int input_sync_ref
Definition: ffmpeg.h:149
OutputFile::index
int index
Definition: ffmpeg.h:577
OptionGroup
Definition: cmdutils.h:271
DECODER_FLAG_FIX_SUB_DURATION
@ DECODER_FLAG_FIX_SUB_DURATION
Definition: ffmpeg.h:297
ENC_STATS_PTS_TIME_IN
@ ENC_STATS_PTS_TIME_IN
Definition: ffmpeg.h:435
FilterGraph::nb_outputs
int nb_outputs
Definition: ffmpeg.h:293
OutputStream::logfile
FILE * logfile
Definition: ffmpeg.h:541
swresample.h
find_codec
int find_codec(void *logctx, const char *name, enum AVMediaType type, int encoder, const AVCodec **codec)
Definition: ffmpeg_opt.c:581
InputStream::par
AVCodecParameters * par
Codec parameters - to be used by the decoding/streamcopy code.
Definition: ffmpeg.h:361
OutputFile::streams
OutputStream ** streams
Definition: ffmpeg.h:582
Scheduler
Definition: ffmpeg_sched.c:269
recast_media
int recast_media
Definition: ffmpeg_opt.c:93
FilterGraph
Definition: ffmpeg.h:286
print_stats
int print_stats
Definition: ffmpeg_opt.c:79
ENC_TIME_BASE_DEMUX
@ ENC_TIME_BASE_DEMUX
Definition: ffmpeg.h:77
InputFilterOptions::sub2video_width
int sub2video_width
Definition: ffmpeg.h:257
options
const OptionDef options[]
VideoSyncMethod
VideoSyncMethod
Definition: ffmpeg.h:65
eval.h
OutputStream::force_fps
int force_fps
Definition: ffmpeg.h:528
OptionsContext::discard
SpecifierOptList discard
Definition: ffmpeg.h:222
OptionsContext::apad
SpecifierOptList apad
Definition: ffmpeg.h:221
OptionsContext::enc_stats_post_fmt
SpecifierOptList enc_stats_post_fmt
Definition: ffmpeg.h:234
OutputStream::filter
OutputFilter * filter
Definition: ffmpeg.h:543
IFILTER_FLAG_REINIT
@ IFILTER_FLAG_REINIT
Definition: ffmpeg.h:240
f
f
Definition: af_crystalizer.c:121
AVIOContext
Bytestream IO Context.
Definition: avio.h:160
OptionsContext::thread_queue_size
int thread_queue_size
Definition: ffmpeg.h:148
AVMediaType
AVMediaType
Definition: avutil.h:199
FRAME_OPAQUE_SEND_COMMAND
@ FRAME_OPAQUE_SEND_COMMAND
Definition: ffmpeg.h:90
SpecifierOptList
Definition: cmdutils.h:117
threadmessage.h
OptionsContext::enc_stats_pre
SpecifierOptList enc_stats_pre
Definition: ffmpeg.h:230
FFMPEG_OPT_TOP
#define FFMPEG_OPT_TOP
Definition: ffmpeg.h:57
filtergraph_is_simple
int filtergraph_is_simple(const FilterGraph *fg)
Definition: ffmpeg_filter.c:1873
EncStatsType
EncStatsType
Definition: ffmpeg.h:424
StreamMap
Definition: ffmpeg.h:116
ENC_STATS_NB_SAMPLES
@ ENC_STATS_NB_SAMPLES
Definition: ffmpeg.h:439
copy_ts
int copy_ts
Definition: ffmpeg_opt.c:73
avio.h
copy_tb
int copy_tb
Definition: ffmpeg_opt.c:75
OptionsContext::seek_timestamp
int seek_timestamp
Definition: ffmpeg.h:129
LATENCY_PROBE_NB
@ LATENCY_PROBE_NB
Definition: ffmpeg.h:106
OptionsContext::streamid
AVDictionary * streamid
Definition: ffmpeg.h:182
nb_decoders
int nb_decoders
Definition: ffmpeg.c:135
OptionsContext::pass
SpecifierOptList pass
Definition: ffmpeg.h:216
HWDevice::device_ref
AVBufferRef * device_ref
Definition: ffmpeg.h:112
OutputStream::type
enum AVMediaType type
Definition: ffmpeg.h:498
OutputFile::url
const char * url
Definition: ffmpeg.h:580
hw_device_get_by_type
HWDevice * hw_device_get_by_type(enum AVHWDeviceType type)
Definition: ffmpeg_hw.c:30
IFilterFlags
IFilterFlags
Definition: ffmpeg.h:238
OptionsContext::disposition
SpecifierOptList disposition
Definition: ffmpeg.h:223
LATENCY_PROBE_DEC_PRE
@ LATENCY_PROBE_DEC_PRE
Definition: ffmpeg.h:100
OptionsContext::readrate_initial_burst
double readrate_initial_burst
Definition: ffmpeg.h:146
OSTFinished
OSTFinished
Definition: ffmpeg.h:465
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
FrameData::pts
int64_t pts
Definition: ffmpeg.h:602
OptionsContext::find_stream_info
int find_stream_info
Definition: ffmpeg.h:150
OptionsContext::display_rotations
SpecifierOptList display_rotations
Definition: ffmpeg.h:194
strip_specifiers
AVDictionary * strip_specifiers(const AVDictionary *dict)
Definition: ffmpeg_opt.c:162
OutputStream::kf
KeyframeForceCtx kf
Definition: ffmpeg.h:538
do_benchmark
int do_benchmark
Definition: ffmpeg_opt.c:69
InputFilterOptions::sub2video_height
int sub2video_height
Definition: ffmpeg.h:258
Encoder
Definition: ffmpeg_enc.c:44
OptionsContext::ts_scale
SpecifierOptList ts_scale
Definition: ffmpeg.h:152
ENC_STATS_FRAME_NUM
@ ENC_STATS_FRAME_NUM
Definition: ffmpeg.h:428
KeyframeForceCtx
Definition: ffmpeg.h:477
OutputFilter::type
enum AVMediaType type
Definition: ffmpeg.h:280
OptionsContext::chroma_intra_matrices
SpecifierOptList chroma_intra_matrices
Definition: ffmpeg.h:200
HWACCEL_AUTO
@ HWACCEL_AUTO
Definition: ffmpeg.h:83
OutputStream::max_frame_rate
AVRational max_frame_rate
Definition: ffmpeg.h:525
PacketOpaque
PacketOpaque
Definition: ffmpeg.h:93
OutputStream::apad
char * apad
Definition: ffmpeg.h:548
AVOutputFormat
Definition: avformat.h:509
FrameData::bits_per_raw_sample
int bits_per_raw_sample
Definition: ffmpeg.h:608
OptionsContext::frame_rates
SpecifierOptList frame_rates
Definition: ffmpeg.h:136
StreamMap::stream_index
int stream_index
Definition: ffmpeg.h:119
decoders
Decoder ** decoders
Definition: ffmpeg.c:134
OptionsContext::codec_names
SpecifierOptList codec_names
Definition: ffmpeg.h:132
OptionsContext::stream_maps
StreamMap * stream_maps
Definition: ffmpeg.h:160
OptionsContext::autorotate
SpecifierOptList autorotate
Definition: ffmpeg.h:157
OptionsContext::fps_mode
SpecifierOptList fps_mode
Definition: ffmpeg.h:191
DecoderOpts::time_base
AVRational time_base
Definition: ffmpeg.h:324
InputFilterOptions::fallback
AVFrame * fallback
Definition: ffmpeg.h:263
OptionsContext::start_time_eof
int64_t start_time_eof
Definition: ffmpeg.h:128
VSYNC_CFR
@ VSYNC_CFR
Definition: ffmpeg.h:68
OptionsContext::shortest_buf_duration
float shortest_buf_duration
Definition: ffmpeg.h:172
OutputFile::bitexact
int bitexact
Definition: ffmpeg.h:589
exit_on_error
int exit_on_error
Definition: ffmpeg_opt.c:77
OptionsContext::mux_stats
SpecifierOptList mux_stats
Definition: ffmpeg.h:232
output_files
OutputFile ** output_files
Definition: ffmpeg.c:128
OptionsContext::muxing_queue_data_threshold
SpecifierOptList muxing_queue_data_threshold
Definition: ffmpeg.h:219
FRAME_OPAQUE_EOF
@ FRAME_OPAQUE_EOF
Definition: ffmpeg.h:89
InputFile::ctx
AVFormatContext * ctx
Definition: ffmpeg.h:394
OptionsContext::hwaccels
SpecifierOptList hwaccels
Definition: ffmpeg.h:154
ost_iter
OutputStream * ost_iter(OutputStream *prev)
Definition: ffmpeg.c:381
OptionsContext::enc_stats_post
SpecifierOptList enc_stats_post
Definition: ffmpeg.h:231
OutputStream::attachment_filename
char * attachment_filename
Definition: ffmpeg.h:550
ENC_STATS_STREAM_IDX
@ ENC_STATS_STREAM_IDX
Definition: ffmpeg.h:427
ENC_STATS_SAMPLE_NUM
@ ENC_STATS_SAMPLE_NUM
Definition: ffmpeg.h:438
avcodec.h
InputStream::decoder
Decoder * decoder
Definition: ffmpeg.h:362
OptionsContext::metadata_map
SpecifierOptList metadata_map
Definition: ffmpeg.h:204
AVStream
Stream structure.
Definition: avformat.h:743
dec_free
void dec_free(Decoder **pdec)
Definition: ffmpeg_dec.c:98
enc_free
void enc_free(Encoder **penc)
Definition: ffmpeg_enc.c:64
pixfmt.h
abort_on_flags
int abort_on_flags
Definition: ffmpeg_opt.c:78
InputFilter::name
uint8_t * name
Definition: ffmpeg.h:268
VSYNC_DROP
@ VSYNC_DROP
Definition: ffmpeg.h:72
packet_data
FrameData * packet_data(AVPacket *pkt)
Definition: ffmpeg.c:486
InputFile::streams
InputStream ** streams
Definition: ffmpeg.h:408
DECODER_FLAG_TOP_FIELD_FIRST
@ DECODER_FLAG_TOP_FIELD_FIRST
Definition: ffmpeg.h:304
hw_device_free_all
void hw_device_free_all(void)
Definition: ffmpeg_hw.c:288
avformat.h
HWAccelID
HWAccelID
Definition: ffmpeg.h:81
dict.h
ifile_close
void ifile_close(InputFile **f)
Definition: ffmpeg_demux.c:851
OptionsContext::max_muxing_queue_size
SpecifierOptList max_muxing_queue_size
Definition: ffmpeg.h:218
FrameOpaque
FrameOpaque
Definition: ffmpeg.h:87
filter_hw_device
HWDevice * filter_hw_device
Definition: ffmpeg_opt.c:57
AVCodecContext
main external API structure.
Definition: avcodec.h:445
OptionsContext::inter_matrices
SpecifierOptList inter_matrices
Definition: ffmpeg.h:199
OptionsContext::audio_sample_rate
SpecifierOptList audio_sample_rate
Definition: ffmpeg.h:135
OptionsContext::mux_preload
float mux_preload
Definition: ffmpeg.h:170
PKT_OPAQUE_SUB_HEARTBEAT
@ PKT_OPAQUE_SUB_HEARTBEAT
Definition: ffmpeg.h:94
HWDevice::name
const char * name
Definition: ffmpeg.h:110
ist_output_add
int ist_output_add(InputStream *ist, OutputStream *ost)
Definition: ffmpeg_demux.c:963
KeyframeForceCtx::index
int index
Definition: ffmpeg.h:485
frame_data_c
const FrameData * frame_data_c(AVFrame *frame)
Definition: ffmpeg.c:480
InputStream::file
struct InputFile * file
Definition: ffmpeg.h:349
check_avoptions
int check_avoptions(AVDictionary *m)
Definition: ffmpeg.c:507
avfilter.h
IFILTER_FLAG_CFR
@ IFILTER_FLAG_CFR
Definition: ffmpeg.h:241
OptionsContext::frame_sizes
SpecifierOptList frame_sizes
Definition: ffmpeg.h:138
OptionsContext::video_disable
int video_disable
Definition: ffmpeg.h:176
atomic_uint
intptr_t atomic_uint
Definition: stdatomic.h:56
OutputStream::bits_per_raw_sample
int bits_per_raw_sample
Definition: ffmpeg.h:534
OutputStream::enc_stats_post
EncStats enc_stats_post
Definition: ffmpeg.h:565
Decoder::subtitle_header_size
int subtitle_header_size
Definition: ffmpeg.h:337
frame_data
FrameData * frame_data(AVFrame *frame)
Get our axiliary frame data attached to the frame, allocating it if needed.
Definition: ffmpeg.c:474
ffmpeg_parse_options
int ffmpeg_parse_options(int argc, char **argv, Scheduler *sch)
EncStats::lock_initialized
int lock_initialized
Definition: ffmpeg.h:460
video_sync_method
enum VideoSyncMethod video_sync_method
Definition: ffmpeg_opt.c:66
OutputStream::frames_encoded
uint64_t frames_encoded
Definition: ffmpeg.h:558
HWACCEL_NONE
@ HWACCEL_NONE
Definition: ffmpeg.h:82
InputFile::ts_offset
int64_t ts_offset
Definition: ffmpeg.h:401
remove_avoptions
void remove_avoptions(AVDictionary **a, AVDictionary *b)
Definition: ffmpeg.c:498
VSYNC_AUTO
@ VSYNC_AUTO
Definition: ffmpeg.h:66
OutputFilter
Definition: ffmpeg.h:271
OptionsContext::codec_tags
SpecifierOptList codec_tags
Definition: ffmpeg.h:187
OptionsContext::filter_scripts
SpecifierOptList filter_scripts
Definition: ffmpeg.h:210
DecoderOpts::flags
int flags
Definition: ffmpeg.h:310
OptionsContext::time_bases
SpecifierOptList time_bases
Definition: ffmpeg.h:226
avutil.h
start_at_zero
int start_at_zero
Definition: ffmpeg_opt.c:74
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
EncTimeBase
EncTimeBase
Definition: ffmpeg.h:76
ist_iter
InputStream * ist_iter(InputStream *prev)
Definition: ffmpeg.c:397
DECODER_FLAG_TS_UNRELIABLE
@ DECODER_FLAG_TS_UNRELIABLE
Definition: ffmpeg.h:299
OutputFilter::nb_frames_drop
atomic_uint_least64_t nb_frames_drop
Definition: ffmpeg.h:283
auto_conversion_filters
int auto_conversion_filters
Definition: ffmpeg_opt.c:85
OptionsContext::rc_overrides
SpecifierOptList rc_overrides
Definition: ffmpeg.h:197
of_open
int of_open(const OptionsContext *o, const char *filename, Scheduler *sch)
Definition: ffmpeg_mux_init.c:2938
DecoderOpts::codec
const AVCodec * codec
Definition: ffmpeg.h:315
KeyframeForceCtx::pexpr
AVExpr * pexpr
Definition: ffmpeg.h:487
OutputStream::is_cfr
int is_cfr
Definition: ffmpeg.h:527
OutputStream::autoscale
int autoscale
Definition: ffmpeg.h:532
InputStream::index
int index
Definition: ffmpeg.h:351
ffmpeg_sched.h
OptionsContext::copy_initial_nonkeyframes
SpecifierOptList copy_initial_nonkeyframes
Definition: ffmpeg.h:206
FKF_N_FORCED
@ FKF_N_FORCED
Definition: ffmpeg.h:414
OptionsContext::attachments
const char ** attachments
Definition: ffmpeg.h:162
ENC_TIME_BASE_FILTER
@ ENC_TIME_BASE_FILTER
Definition: ffmpeg.h:78
stdin_interaction
int stdin_interaction
Definition: ffmpeg_opt.c:80
do_hex_dump
int do_hex_dump
Definition: ffmpeg_opt.c:71
AVPacket
This structure stores compressed data.
Definition: packet.h:499
EncStatsComponent
Definition: ffmpeg.h:446
HWDevice::type
enum AVHWDeviceType type
Definition: ffmpeg.h:111
Decoder::type
enum AVMediaType type
Definition: ffmpeg.h:334
cmdutils.h
InputFile::input_ts_offset
int64_t input_ts_offset
Definition: ffmpeg.h:395
EncStats::nb_components
int nb_components
Definition: ffmpeg.h:455
OptionsContext::data_disable
int data_disable
Definition: ffmpeg.h:179
muxer_thread
int muxer_thread(void *arg)
Definition: ffmpeg_mux.c:407
enc_alloc
int enc_alloc(Encoder **penc, const AVCodec *codec, Scheduler *sch, unsigned sch_idx)
Definition: ffmpeg_enc.c:74
FKF_NB
@ FKF_NB
Definition: ffmpeg.h:418
ENC_STATS_PKT_SIZE
@ ENC_STATS_PKT_SIZE
Definition: ffmpeg.h:440
OutputStream
Definition: mux.c:53
hwcontext.h
OutputStream::st
AVStream * st
Definition: mux.c:54
DecoderOpts::framerate
AVRational framerate
Definition: ffmpeg.h:328
EncStatsComponent::str
uint8_t * str
Definition: ffmpeg.h:449
dts_error_threshold
float dts_error_threshold
Definition: ffmpeg_opt.c:63
OutputFile::format
const AVOutputFormat * format
Definition: ffmpeg.h:579
hw_device_for_filter
AVBufferRef * hw_device_for_filter(void)
Get a hardware device to be used with this filtergraph.
Definition: ffmpeg_hw.c:300
OutputStream::swr_opts
AVDictionary * swr_opts
Definition: ffmpeg.h:547
opt_match_per_type_str
const char * opt_match_per_type_str(const SpecifierOptList *sol, char mediatype)
Definition: ffmpeg_opt.c:179
InputFile::nb_streams
int nb_streams
Definition: ffmpeg.h:409
FKF_N
@ FKF_N
Definition: ffmpeg.h:413
OptionsContext::guess_layout_max
SpecifierOptList guess_layout_max
Definition: ffmpeg.h:220
ENC_STATS_DTS_TIME
@ ENC_STATS_DTS_TIME
Definition: ffmpeg.h:437
OutputFile::recording_time
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
Definition: ffmpeg.h:585
OutputStream::samples_encoded
uint64_t samples_encoded
Definition: ffmpeg.h:559
of_stream_init
int of_stream_init(OutputFile *of, OutputStream *ost)
Definition: ffmpeg_mux.c:609
hw_device_get_by_name
HWDevice * hw_device_get_by_name(const char *name)
Definition: ffmpeg_hw.c:44
VSYNC_PASSTHROUGH
@ VSYNC_PASSTHROUGH
Definition: ffmpeg.h:67
InputStream::dec
const AVCodec * dec
Definition: ffmpeg.h:363
PKT_OPAQUE_FIX_SUB_DURATION
@ PKT_OPAQUE_FIX_SUB_DURATION
Definition: ffmpeg.h:95
EncStats::io
AVIOContext * io
Definition: ffmpeg.h:457
DecoderOpts::hwaccel_device_type
enum AVHWDeviceType hwaccel_device_type
Definition: ffmpeg.h:320
of_write_trailer
int of_write_trailer(OutputFile *of)
Definition: ffmpeg_mux.c:738
ist_find_unused
InputStream * ist_find_unused(enum AVMediaType type)
Find an unused input stream of given type.
Definition: ffmpeg_demux.c:153
OptionsContext::bitstream_filters
SpecifierOptList bitstream_filters
Definition: ffmpeg.h:186
atomic_uint_least64_t
intptr_t atomic_uint_least64_t
Definition: stdatomic.h:69
OptionsContext::enc_time_bases
SpecifierOptList enc_time_bases
Definition: ffmpeg.h:227
ENC_STATS_TIMEBASE
@ ENC_STATS_TIMEBASE
Definition: ffmpeg.h:430
DecoderFlags
DecoderFlags
Definition: ffmpeg.h:296
OptionsContext::top_field_first
SpecifierOptList top_field_first
Definition: ffmpeg.h:202
term_exit
void term_exit(void)
Definition: ffmpeg.c:152
OutputFilter::nb_frames_dup
atomic_uint_least64_t nb_frames_dup
Definition: ffmpeg.h:282
filter_complex_nbthreads
int filter_complex_nbthreads
Definition: ffmpeg_opt.c:83
OutputFile
Definition: ffmpeg.h:574
InputFilterOptions::framerate
AVRational framerate
Definition: ffmpeg.h:255
OptionsContext::loop
int loop
Definition: ffmpeg.h:143
InputStream::autorotate
int autorotate
Definition: ffmpeg.h:371
LATENCY_PROBE_FILTER_POST
@ LATENCY_PROBE_FILTER_POST
Definition: ffmpeg.h:103
OutputStream::enc_timebase
AVRational enc_timebase
Definition: ffmpeg.h:518
DecoderOpts::name
char * name
Definition: ffmpeg.h:312