FFmpeg
|
#include <stdint.h>
#include "ffmpeg.h"
#include "cmdutils.h"
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/avfiltergraph.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 | 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, int is_input) |
static void | init_options (OptionsContext *o, int is_input) |
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 void | parse_meta_type (char *arg, char *type, int *index, const char **stream_spec) |
Parse a metadata specifier passed as 'arg' parameter. | |
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 void | 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 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_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 | configure_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) |
void | show_help_default (const char *opt, const char *arg) |
Per-fftool specific help handler. | |
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) |
Variables | |
char * | vstats_filename |
float | audio_drift_threshold = 0.1 |
float | dts_delta_threshold = 10 |
float | dts_error_threshold = 3600*30 |
int | audio_volume = 256 |
int | audio_sync_method = 0 |
int | video_sync_method = VSYNC_AUTO |
int | do_deinterlace = 0 |
int | do_benchmark = 0 |
int | do_benchmark_all = 0 |
int | do_hex_dump = 0 |
int | do_pkt_dump = 0 |
int | copy_ts = 0 |
int | copy_tb = -1 |
int | debug_ts = 0 |
int | exit_on_error = 0 |
int | print_stats = -1 |
int | qp_hist = 0 |
int | stdin_interaction = 1 |
int | frame_bits_per_raw_sample = 0 |
static int | intra_only = 0 |
static int | file_overwrite = 0 |
static int | no_file_overwrite = 0 |
static int | video_discard = 0 |
static int | intra_dc_precision = 8 |
static int | do_psnr = 0 |
static int | input_sync |
static int64_t | recording_time = INT64_MAX |
static const OptionGroupDef | groups [] |
const OptionDef | options [] |
#define MATCH_PER_STREAM_OPT | ( | name, | |
type, | |||
outvar, | |||
fmtctx, | |||
st | |||
) |
Definition at line 45 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().
#define MATCH_PER_TYPE_OPT | ( | name, | |
type, | |||
outvar, | |||
fmtctx, | |||
mediatype | |||
) |
Definition at line 57 of file ffmpeg_opt.c.
Referenced by open_input_file(), open_output_file(), and opt_preset().
#define SET_DICT | ( | type, | |
meta, | |||
context, | |||
index | |||
) |
Referenced by copy_metadata().
#define OFFSET | ( | x | ) | offsetof(OptionsContext, x) |
Definition at line 2383 of file ffmpeg_opt.c.
enum OptGroup |
Definition at line 2277 of file ffmpeg_opt.c.
|
static |
Definition at line 100 of file ffmpeg_opt.c.
Referenced by open_files().
|
static |
Definition at line 137 of file ffmpeg_opt.c.
Referenced by open_files().
|
static |
Definition at line 154 of file ffmpeg_opt.c.
|
static |
Definition at line 163 of file ffmpeg_opt.c.
|
static |
Definition at line 169 of file ffmpeg_opt.c.
|
static |
Definition at line 175 of file ffmpeg_opt.c.
Referenced by opt_preset(), and opt_target().
|
static |
Definition at line 181 of file ffmpeg_opt.c.
Referenced by opt_preset(), and opt_target().
|
static |
Definition at line 187 of file ffmpeg_opt.c.
Referenced by opt_preset().
|
static |
Definition at line 193 of file ffmpeg_opt.c.
Referenced by opt_preset().
|
static |
Definition at line 199 of file ffmpeg_opt.c.
|
static |
Definition at line 294 of file ffmpeg_opt.c.
|
static |
Definition at line 302 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 368 of file ffmpeg_opt.c.
Referenced by copy_metadata(), and open_output_file().
|
static |
Definition at line 395 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 485 of file ffmpeg_opt.c.
|
static |
Definition at line 499 of file ffmpeg_opt.c.
Referenced by choose_decoder(), choose_encoder(), and open_input_file().
|
static |
Definition at line 528 of file ffmpeg_opt.c.
Referenced by add_input_streams(), and open_input_file().
|
static |
Definition at line 543 of file ffmpeg_opt.c.
Referenced by open_input_file().
|
static |
Definition at line 634 of file ffmpeg_opt.c.
Referenced by dump_attachment(), and open_output_file().
Definition at line 659 of file ffmpeg_opt.c.
Referenced by open_input_file().
|
static |
Definition at line 691 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
|
static |
Definition at line 841 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 860 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 886 of file ffmpeg_opt.c.
Referenced by new_output_stream().
|
static |
Definition at line 903 of file ffmpeg_opt.c.
Referenced by new_attachment_stream(), new_audio_stream(), new_data_stream(), new_subtitle_stream(), new_video_stream(), and read_ffserver_streams().
|
static |
Definition at line 1025 of file ffmpeg_opt.c.
Referenced by new_video_stream().
|
static |
Definition at line 1042 of file ffmpeg_opt.c.
Referenced by init_output_filter(), and open_output_file().
|
static |
Definition at line 1184 of file ffmpeg_opt.c.
Referenced by init_output_filter(), and open_output_file().
|
static |
Definition at line 1236 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1249 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1256 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1284 of file ffmpeg_opt.c.
|
static |
Definition at line 1306 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1348 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1391 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1425 of file ffmpeg_opt.c.
Referenced by open_output_file().
|
static |
Definition at line 1436 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
|
static |
Definition at line 1817 of file ffmpeg_opt.c.
|
static |
Definition at line 1956 of file ffmpeg_opt.c.
Referenced by opt_vstats().
|
static |
Definition at line 1963 of file ffmpeg_opt.c.
|
static |
Definition at line 1974 of file ffmpeg_opt.c.
|
static |
Definition at line 1980 of file ffmpeg_opt.c.
|
static |
Definition at line 1986 of file ffmpeg_opt.c.
|
static |
Definition at line 1992 of file ffmpeg_opt.c.
Referenced by opt_channel_layout(), and opt_preset().
|
static |
Definition at line 2012 of file ffmpeg_opt.c.
|
static |
Definition at line 2060 of file ffmpeg_opt.c.
|
static |
Definition at line 2069 of file ffmpeg_opt.c.
|
static |
Definition at line 2081 of file ffmpeg_opt.c.
|
static |
Definition at line 2096 of file ffmpeg_opt.c.
|
static |
Definition at line 2108 of file ffmpeg_opt.c.
|
static |
Definition at line 2114 of file ffmpeg_opt.c.
|
static |
Definition at line 2120 of file ffmpeg_opt.c.
|
static |
Definition at line 2141 of file ffmpeg_opt.c.
|
static |
Definition at line 2152 of file ffmpeg_opt.c.
|
static |
Definition at line 2188 of file ffmpeg_opt.c.
|
static |
Definition at line 2194 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 2204 of file ffmpeg_opt.c.
Definition at line 2270 of file ffmpeg_opt.c.
Referenced by main(), and show_help_default().
|
static |
Definition at line 2287 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options().
int ffmpeg_parse_options | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 2320 of file ffmpeg_opt.c.
Referenced by main().
|
static |
Definition at line 2366 of file ffmpeg_opt.c.
char* vstats_filename |
Definition at line 66 of file ffmpeg_opt.c.
Referenced by do_video_out(), do_video_stats(), exit_program(), flush_encoders(), and opt_vstats_file().
float audio_drift_threshold = 0.1 |
Definition at line 68 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter().
float dts_delta_threshold = 10 |
Definition at line 69 of file ffmpeg_opt.c.
Referenced by process_input().
float dts_error_threshold = 3600*30 |
Definition at line 70 of file ffmpeg_opt.c.
Referenced by do_video_out(), and process_input().
int audio_volume = 256 |
Definition at line 72 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), configure_output_audio_filter(), and transcode_init().
int audio_sync_method = 0 |
Definition at line 73 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), do_audio_out(), and write_frame().
int video_sync_method = VSYNC_AUTO |
Definition at line 74 of file ffmpeg_opt.c.
Referenced by do_video_out(), opt_vsync(), transcode_init(), and write_frame().
int do_deinterlace = 0 |
Definition at line 75 of file ffmpeg_opt.c.
Referenced by init_input_stream().
int do_benchmark = 0 |
Definition at line 76 of file ffmpeg_opt.c.
Referenced by exit_program(), and main().
int do_benchmark_all = 0 |
Definition at line 77 of file ffmpeg_opt.c.
Referenced by update_benchmark().
int do_hex_dump = 0 |
Definition at line 78 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int do_pkt_dump = 0 |
Definition at line 79 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int copy_ts = 0 |
Definition at line 80 of file ffmpeg_opt.c.
Referenced by open_input_file(), and process_input().
int copy_tb = -1 |
Definition at line 81 of file ffmpeg_opt.c.
Referenced by transcode_init().
int debug_ts = 0 |
Definition at line 82 of file ffmpeg_opt.c.
Referenced by decode_video(), do_audio_out(), do_video_out(), process_input(), and write_frame().
int exit_on_error = 0 |
Definition at line 83 of file ffmpeg_opt.c.
Referenced by do_subtitle_out(), process_input(), and write_frame().
int print_stats = -1 |
Definition at line 84 of file ffmpeg_opt.c.
Referenced by print_report(), and uninit().
int qp_hist = 0 |
Definition at line 85 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and print_report().
int stdin_interaction = 1 |
Definition at line 86 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite(), open_input_file(), and transcode().
int frame_bits_per_raw_sample = 0 |
Definition at line 87 of file ffmpeg_opt.c.
Referenced by new_video_stream(), and transcode_init().
|
static |
Definition at line 90 of file ffmpeg_opt.c.
Referenced by build_frame_code(), and new_video_stream().
|
static |
Definition at line 91 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite().
|
static |
Definition at line 92 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite().
|
static |
Definition at line 93 of file ffmpeg_opt.c.
|
static |
Definition at line 94 of file ffmpeg_opt.c.
Referenced by new_video_stream().
|
static |
Definition at line 95 of file ffmpeg_opt.c.
Referenced by new_video_stream().
|
static |
Definition at line 96 of file ffmpeg_opt.c.
|
static |
Definition at line 98 of file ffmpeg_opt.c.
Referenced by init_options(), and uninit_options().
|
static |
Definition at line 2282 of file ffmpeg_opt.c.
const OptionDef options[] |
Definition at line 2384 of file ffmpeg_opt.c.
Referenced by ffmpeg_parse_options(), main(), open_slave(), 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(), pp_get_mode_by_name_and_quality(), read_ffserver_streams(), show_help_default(), and uninit_options().