FFmpeg
|
#include <stdint.h>
#include "ffmpeg.h"
#include "cmdutils.h"
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/avutil.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/fifo.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "cmdutils_common_opts.h"
Go to the source code of this file.
Macros | |
#define | DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" |
#define | MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st) |
#define | MATCH_PER_TYPE_OPT(name, type, outvar, fmtctx, mediatype) |
#define | METADATA_CHECK_INDEX(index, nb_elems, desc) |
#define | SET_DICT(type, meta, context, index) |
#define | OFFSET(x) offsetof(OptionsContext, x) |
Enumerations | |
enum | OptGroup { GROUP_OUTFILE, GROUP_INFILE } |
Functions | |
static void | uninit_options (OptionsContext *o) |
static void | init_options (OptionsContext *o) |
static int | show_hwaccels (void *optctx, const char *opt, const char *arg) |
static AVDictionary * | strip_specifiers (AVDictionary *dict) |
static int | opt_abort_on (void *optctx, const char *opt, const char *arg) |
static int | opt_sameq (void *optctx, const char *opt, const char *arg) |
static int | opt_video_channel (void *optctx, const char *opt, const char *arg) |
static int | opt_video_standard (void *optctx, const char *opt, const char *arg) |
static int | opt_audio_codec (void *optctx, const char *opt, const char *arg) |
static int | opt_video_codec (void *optctx, const char *opt, const char *arg) |
static int | opt_subtitle_codec (void *optctx, const char *opt, const char *arg) |
static int | opt_data_codec (void *optctx, const char *opt, const char *arg) |
static int | opt_map (void *optctx, const char *opt, const char *arg) |
static int | opt_attach (void *optctx, const char *opt, const char *arg) |
static int | opt_map_channel (void *optctx, const char *opt, const char *arg) |
static int | opt_sdp_file (void *optctx, const char *opt, const char *arg) |
static void | parse_meta_type (char *arg, char *type, int *index, const char **stream_spec) |
Parse a metadata specifier passed as 'arg' parameter. More... | |
static int | copy_metadata (char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o) |
static int | opt_recording_timestamp (void *optctx, const char *opt, const char *arg) |
static AVCodec * | find_codec_or_die (const char *name, enum AVMediaType type, int encoder) |
static AVCodec * | choose_decoder (OptionsContext *o, AVFormatContext *s, AVStream *st) |
static void | add_input_streams (OptionsContext *o, AVFormatContext *ic) |
static void | assert_file_overwrite (const char *filename) |
static void | dump_attachment (AVStream *st, const char *filename) |
static int | open_input_file (OptionsContext *o, const char *filename) |
static uint8_t * | get_line (AVIOContext *s) |
static int | get_preset_file_2 (const char *preset_name, const char *codec_name, AVIOContext **s) |
static int | choose_encoder (OptionsContext *o, AVFormatContext *s, OutputStream *ost) |
static OutputStream * | new_output_stream (OptionsContext *o, AVFormatContext *oc, enum AVMediaType type, int source_index) |
static void | parse_matrix_coeffs (uint16_t *dest, const char *str) |
static uint8_t * | read_file (const char *filename) |
static char * | get_ost_filters (OptionsContext *o, AVFormatContext *oc, OutputStream *ost) |
static void | check_streamcopy_filters (OptionsContext *o, AVFormatContext *oc, const OutputStream *ost, enum AVMediaType type) |
static OutputStream * | new_video_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static OutputStream * | new_audio_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static OutputStream * | new_data_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static OutputStream * | new_unknown_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static OutputStream * | new_attachment_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static OutputStream * | new_subtitle_stream (OptionsContext *o, AVFormatContext *oc, int source_index) |
static int | opt_streamid (void *optctx, const char *opt, const char *arg) |
static int | copy_chapters (InputFile *ifile, OutputFile *ofile, int copy_metadata) |
static int | read_ffserver_streams (OptionsContext *o, AVFormatContext *s, const char *filename) |
static void | init_output_filter (OutputFilter *ofilter, OptionsContext *o, AVFormatContext *oc) |
static int | init_complex_filters (void) |
static int | open_output_file (OptionsContext *o, const char *filename) |
static int | opt_target (void *optctx, const char *opt, const char *arg) |
static int | opt_vstats_file (void *optctx, const char *opt, const char *arg) |
static int | opt_vstats (void *optctx, const char *opt, const char *arg) |
static int | opt_video_frames (void *optctx, const char *opt, const char *arg) |
static int | opt_audio_frames (void *optctx, const char *opt, const char *arg) |
static int | opt_data_frames (void *optctx, const char *opt, const char *arg) |
static int | opt_default_new (OptionsContext *o, const char *opt, const char *arg) |
static int | opt_preset (void *optctx, const char *opt, const char *arg) |
static int | opt_old2new (void *optctx, const char *opt, const char *arg) |
static int | opt_bitrate (void *optctx, const char *opt, const char *arg) |
static int | opt_qscale (void *optctx, const char *opt, const char *arg) |
static int | opt_profile (void *optctx, const char *opt, const char *arg) |
static int | opt_video_filters (void *optctx, const char *opt, const char *arg) |
static int | opt_audio_filters (void *optctx, const char *opt, const char *arg) |
static int | opt_vsync (void *optctx, const char *opt, const char *arg) |
static int | opt_timecode (void *optctx, const char *opt, const char *arg) |
static int | opt_channel_layout (void *optctx, const char *opt, const char *arg) |
static int | opt_audio_qscale (void *optctx, const char *opt, const char *arg) |
static int | opt_filter_complex (void *optctx, const char *opt, const char *arg) |
static int | opt_filter_complex_script (void *optctx, const char *opt, const char *arg) |
void | show_help_default (const char *opt, const char *arg) |
Per-fftool specific help handler. More... | |
void | show_usage (void) |
static int | open_files (OptionGroupList *l, const char *inout, int(*open_file)(OptionsContext *, const char *)) |
int | ffmpeg_parse_options (int argc, char **argv) |
static int | opt_progress (void *optctx, const char *opt, const char *arg) |
#define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" |
Definition at line 44 of file ffmpeg_opt.c.
Referenced by new_video_stream().
Definition at line 46 of file ffmpeg_opt.c.
Referenced by add_input_streams(), choose_decoder(), choose_encoder(), new_audio_stream(), new_output_stream(), new_subtitle_stream(), and new_video_stream().
Definition at line 58 of file ffmpeg_opt.c.
Referenced by open_input_file(), open_output_file(), and opt_preset().
Referenced by copy_metadata().
#define OFFSET | ( | x | ) | offsetof(OptionsContext, x) |
Definition at line 3291 of file ffmpeg_opt.c.
enum OptGroup |
Enumerator | |
---|---|
GROUP_OUTFILE | |
GROUP_INFILE |
Definition at line 3173 of file ffmpeg_opt.c.
|
static |
Definition at line 137 of file ffmpeg_opt.c.
Referenced by open_files().
|
static |
Definition at line 169 of file ffmpeg_opt.c.
Referenced by open_files().
Definition at line 183 of file ffmpeg_opt.c.
|
static |
Definition at line 196 of file ffmpeg_opt.c.
Referenced by open_input_file(), and open_output_file().
Definition at line 213 of file ffmpeg_opt.c.
Definition at line 231 of file ffmpeg_opt.c.
Definition at line 240 of file ffmpeg_opt.c.
Definition at line 246 of file ffmpeg_opt.c.
Definition at line 252 of file ffmpeg_opt.c.
Referenced by opt_preset(), opt_target(), and read_ffserver_streams().
Definition at line 258 of file ffmpeg_opt.c.
Referenced by opt_preset(), opt_target(), and read_ffserver_streams().
Definition at line 264 of file ffmpeg_opt.c.
Referenced by opt_preset().
Definition at line 270 of file ffmpeg_opt.c.
Referenced by opt_preset().
Definition at line 276 of file ffmpeg_opt.c.
Definition at line 381 of file ffmpeg_opt.c.
Definition at line 389 of file ffmpeg_opt.c.
Definition at line 448 of file ffmpeg_opt.c.
|
static |
Parse a metadata specifier passed as 'arg' parameter.
arg | metadata string to parse |
type | metadata type is written here – g(lobal)/s(tream)/c(hapter)/p(rogram) |
index | for type c/p, chapter/program index is written here |
stream_spec | for type s, the stream specifier is written here |
Definition at line 473 of file ffmpeg_opt.c.
Referenced by copy_metadata(), and open_output_file().
|
static |
Definition at line 500 of file ffmpeg_opt.c.
Referenced by open_output_file().
Definition at line 590 of file ffmpeg_opt.c.
|
static |
Definition at line 605 of file ffmpeg_opt.c.
Referenced by choose_decoder(), choose_encoder(), and open_input_file().
|
static |
Definition at line 634 of file ffmpeg_opt.c.
Referenced by add_input_streams(), and open_input_file().
|
static |
Definition at line 649 of file ffmpeg_opt.c.
Referenced by open_input_file().
|
static |
Definition at line 833 of file ffmpeg_opt.c.
Referenced by dump_attachment(), and open_output_file().
Definition at line 862 of file ffmpeg_opt.c.
Referenced by open_input_file().
|
static |
Definition at line 894 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
|
static |
Definition at line 1141 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 1160 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 1186 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 1221 of file ffmpeg_opt.c.
Referenced by new_attachment_stream(), new_audio_stream(), new_data_stream(), new_subtitle_stream(), new_unknown_stream(), new_video_stream(), and read_ffserver_streams().
|
static |
Definition at line 1433 of file ffmpeg_opt.c.
Referenced by new_video_stream().
|
static |
Definition at line 1451 of file ffmpeg_opt.c.
Referenced by get_ost_filters(), new_video_stream(), and opt_filter_complex_script().
|
static |
Definition at line 1479 of file ffmpeg_opt.c.
Referenced by new_audio_stream(), and new_video_stream().
|
static |
Definition at line 1499 of file ffmpeg_opt.c.
Referenced by new_audio_stream(), and new_video_stream().
|
static |
Definition at line 1513 of file ffmpeg_opt.c.
Referenced by init_output_filter(), and open_output_file().
|
static |
Definition at line 1711 of file ffmpeg_opt.c.
Referenced by init_output_filter(), and open_output_file().
|
static |
Definition at line 1784 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1797 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1810 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1818 of file ffmpeg_opt.c.
Referenced by open_output_file().
Definition at line 1846 of file ffmpeg_opt.c.
|
static |
Definition at line 1868 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1911 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1962 of file ffmpeg_opt.c.
Referenced by open_output_file().
Definition at line 2004 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
|
static |
Definition at line 2016 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
Definition at line 2685 of file ffmpeg_opt.c.
Definition at line 2827 of file ffmpeg_opt.c.
Referenced by opt_vstats().
Definition at line 2834 of file ffmpeg_opt.c.
Definition at line 2850 of file ffmpeg_opt.c.
Definition at line 2856 of file ffmpeg_opt.c.
Definition at line 2862 of file ffmpeg_opt.c.
|
static |
Definition at line 2868 of file ffmpeg_opt.c.
Referenced by opt_channel_layout(), and opt_preset().
Definition at line 2888 of file ffmpeg_opt.c.
Definition at line 2936 of file ffmpeg_opt.c.
Definition at line 2945 of file ffmpeg_opt.c.
Definition at line 2961 of file ffmpeg_opt.c.
Definition at line 2976 of file ffmpeg_opt.c.
Definition at line 2988 of file ffmpeg_opt.c.
Definition at line 2994 of file ffmpeg_opt.c.
Definition at line 3000 of file ffmpeg_opt.c.
Definition at line 3012 of file ffmpeg_opt.c.
Definition at line 3023 of file ffmpeg_opt.c.
Definition at line 3059 of file ffmpeg_opt.c.
Definition at line 3065 of file ffmpeg_opt.c.
Definition at line 3080 of file ffmpeg_opt.c.
void show_help_default | ( | const char * | opt, |
const char * | arg | ||
) |
Per-fftool specific help handler.
Implemented in each fftool, called by show_help().
Definition at line 3097 of file ffmpeg_opt.c.
Definition at line 3166 of file ffmpeg_opt.c.
Referenced by main(), and show_help_default().
|
static |
Definition at line 3183 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
Definition at line 3216 of file ffmpeg_opt.c.
Referenced by main().
Definition at line 3274 of file ffmpeg_opt.c.
const HWAccel hwaccels[] |
int hwaccel_lax_profile_check = 0 |
Definition at line 92 of file ffmpeg_opt.c.
AVBufferRef* hw_device_ctx |
Definition at line 93 of file ffmpeg_opt.c.
Referenced by configure_filtergraph(), cuvid_init(), qsv_device_init(), qsv_init(), transcode(), vaapi_decode_init(), and vaapi_device_init().
char* vstats_filename |
Definition at line 95 of file ffmpeg_opt.c.
Referenced by do_video_out(), do_video_stats(), ffmpeg_cleanup(), flush_encoders(), and opt_vstats_file().
char* sdp_filename |
Definition at line 96 of file ffmpeg_opt.c.
Referenced by check_init_output_file(), opt_sdp_file(), and print_sdp().
float audio_drift_threshold = 0.1 |
Definition at line 98 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter().
float dts_delta_threshold = 10 |
Definition at line 99 of file ffmpeg_opt.c.
Referenced by process_input().
float dts_error_threshold = 3600*30 |
Definition at line 100 of file ffmpeg_opt.c.
Referenced by do_video_out(), and process_input().
int audio_volume = 256 |
Definition at line 102 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), and configure_output_audio_filter().
int audio_sync_method = 0 |
Definition at line 103 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), do_audio_out(), and write_packet().
int video_sync_method = VSYNC_AUTO |
Definition at line 104 of file ffmpeg_opt.c.
Referenced by do_video_out(), init_output_stream_encode(), new_video_stream(), opt_vsync(), and write_packet().
float frame_drop_threshold = 0 |
Definition at line 105 of file ffmpeg_opt.c.
Referenced by do_video_out().
int do_deinterlace = 0 |
Definition at line 106 of file ffmpeg_opt.c.
Referenced by configure_input_video_filter().
int do_benchmark = 0 |
Definition at line 107 of file ffmpeg_opt.c.
Referenced by ffmpeg_cleanup(), and main().
int do_benchmark_all = 0 |
Definition at line 108 of file ffmpeg_opt.c.
Referenced by update_benchmark().
int do_hex_dump = 0 |
Definition at line 109 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int do_pkt_dump = 0 |
Definition at line 110 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int copy_ts = 0 |
Definition at line 111 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), configure_input_video_filter(), do_streamcopy(), do_video_out(), open_input_file(), and process_input().
int start_at_zero = 0 |
Definition at line 112 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), configure_input_video_filter(), and open_input_file().
int copy_tb = -1 |
Definition at line 113 of file ffmpeg_opt.c.
Referenced by init_output_stream_streamcopy().
int debug_ts = 0 |
Definition at line 114 of file ffmpeg_opt.c.
Referenced by decode_video(), do_audio_out(), do_video_out(), process_input(), reap_filters(), and write_packet().
int exit_on_error = 0 |
Definition at line 115 of file ffmpeg_opt.c.
Referenced by check_decode_result(), do_subtitle_out(), output_packet(), process_input(), process_input_packet(), transcode(), and write_packet().
int abort_on_flags = 0 |
Definition at line 116 of file ffmpeg_opt.c.
Referenced by opt_abort_on(), and transcode().
int print_stats = -1 |
Definition at line 117 of file ffmpeg_opt.c.
Referenced by print_report().
int qp_hist = 0 |
Definition at line 118 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and print_report().
int stdin_interaction = 1 |
Definition at line 119 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite(), open_input_file(), term_init(), and transcode().
int frame_bits_per_raw_sample = 0 |
Definition at line 120 of file ffmpeg_opt.c.
Referenced by init_output_stream_encode(), and new_video_stream().
float max_error_rate = 2.0/3 |
Definition at line 121 of file ffmpeg_opt.c.
Referenced by main().
int filter_nbthreads = 0 |
Definition at line 122 of file ffmpeg_opt.c.
Referenced by configure_filtergraph().
int filter_complex_nbthreads = 0 |
Definition at line 123 of file ffmpeg_opt.c.
Referenced by configure_filtergraph().
int vstats_version = 2 |
Definition at line 124 of file ffmpeg_opt.c.
Referenced by do_video_stats().
|
static |
Definition at line 127 of file ffmpeg_opt.c.
Referenced by build_frame_code(), and new_video_stream().
|
static |
Definition at line 128 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite().
|
static |
Definition at line 129 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite().
|
static |
Definition at line 130 of file ffmpeg_opt.c.
Referenced by new_video_stream().
|
static |
Definition at line 131 of file ffmpeg_opt.c.
|
static |
Definition at line 132 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 133 of file ffmpeg_opt.c.
Referenced by open_input_file(), open_output_file(), opt_filter_complex(), and opt_filter_complex_script().
|
static |
Definition at line 134 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 135 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 3178 of file ffmpeg_opt.c.
Referenced by decode_delta_j().
const OptionDef options[] |
Definition at line 3292 of file ffmpeg_opt.c.
Referenced by avfilter_init_str(), ffmpeg_parse_options(), init(), main(), open_output_file(), opt_audio_codec(), opt_audio_filters(), opt_audio_frames(), opt_audio_qscale(), opt_channel_layout(), opt_data_codec(), opt_data_frames(), opt_old2new(), opt_qscale(), opt_recording_timestamp(), opt_subtitle_codec(), opt_target(), opt_timecode(), opt_video_codec(), opt_video_filters(), opt_video_frames(), pcm_read_header(), pp_get_mode_by_name_and_quality(), show_help_default(), tee_open(), and uninit_options().