FFmpeg
|
ffmpeg_opt.c
Go to the documentation of this file.
412 static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
781 av_dict_set(&o->g->format_opts, "pixel_format", o->frame_pix_fmts[o->nb_frame_pix_fmts - 1].u.str, 0);
966 static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type, int source_index)
1029 st->codec->codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy
1036 av_log(NULL, AV_LOG_WARNING, "Applying unspecific -frames to non video streams, maybe you meant -vframes ?\n");
1166 static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
1203 if (frame_size && av_parse_video_size(&video_enc->width, &video_enc->height, frame_size) < 0) {
1215 if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == AV_PIX_FMT_NONE) {
1309 static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
1344 if ((map->channel_idx == -1 || (ist->file_index == map->file_idx && ist->st->index == map->stream_idx)) &&
1372 static OutputStream *new_attachment_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
1380 static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
1398 if (frame_size && av_parse_video_size(&subtitle_enc->width, &subtitle_enc->height, frame_size) < 0) {
1425 o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1);
1631 av_log(NULL, AV_LOG_FATAL, "Missing %s stream which is required by this ffm\n", av_get_media_type_string(ost->st->codec->codec_type));
1678 if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) {
1774 av_dict_set(&ost->st->metadata, "filename", (p && *p) ? p + 1 : o->attachments[i], AV_DICT_DONT_OVERWRITE);
1778 for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) { //for all streams of this output file
1888 av_log(NULL, AV_LOG_FATAL, "Invalid input file index %d while processing metadata maps\n", in_file_index);
2094 av_dict_set(&o->g->format_opts, "packetsize", "2048", 0); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
2095 av_dict_set(&o->g->format_opts, "muxrate", "10080000", 0); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8
2436 show_help_children(avfilter_get_class(), AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM);
2443 av_log(NULL, AV_LOG_INFO, "usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name);
2577 { "map_channel", HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_map_channel },
2578 "map an audio channel from one stream to another", "file.stream.channel[:syncfile.syncstream]" },
2586 { "t", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(recording_time) },
2651 { "copypriorss", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(copy_prior_start) },
2668 { "filter_script", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(filter_scripts) },
2670 { "reinit_filter", HAS_ARG | OPT_INT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(reinit_filters) },
2708 { "vn", OPT_VIDEO | OPT_BOOL | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,{ .off = OFFSET(video_disable) },
2778 { "an", OPT_AUDIO | OPT_BOOL | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT,{ .off = OFFSET(audio_disable) },
2796 { "guess_layout_max", OPT_AUDIO | HAS_ARG | OPT_INT | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(guess_layout_max) },
2800 { "sn", OPT_SUBTITLE | OPT_BOOL | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(subtitle_disable) },
2802 { "scodec", OPT_SUBTITLE | HAS_ARG | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_subtitle_codec },
2804 { "stag", OPT_SUBTITLE | HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_old2new }
2806 { "fix_sub_duration", OPT_BOOL | OPT_EXPERT | OPT_SUBTITLE | OPT_SPEC | OPT_INPUT, { .off = OFFSET(fix_sub_duration) },
2808 { "canvas_size", OPT_SUBTITLE | HAS_ARG | OPT_STRING | OPT_SPEC | OPT_INPUT, { .off = OFFSET(canvas_sizes) },
2816 { "isync", OPT_BOOL | OPT_EXPERT, { &input_sync }, "this option is deprecated and does nothing", "" },
2819 { "muxdelay", OPT_FLOAT | HAS_ARG | OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(mux_max_delay) },
2821 { "muxpreload", OPT_FLOAT | HAS_ARG | OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(mux_preload) },
2824 { "bsf", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(bitstream_filters) },
2826 { "absf", HAS_ARG | OPT_AUDIO | OPT_EXPERT| OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_old2new },
2828 { "vbsf", OPT_VIDEO | HAS_ARG | OPT_EXPERT| OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_old2new },
2831 { "apre", HAS_ARG | OPT_AUDIO | OPT_EXPERT| OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_preset },
2833 { "vpre", OPT_VIDEO | HAS_ARG | OPT_EXPERT| OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_preset },
2835 { "spre", HAS_ARG | OPT_SUBTITLE | OPT_EXPERT| OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_preset },
2840 { "dcodec", HAS_ARG | OPT_DATA | OPT_PERFILE | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_data_codec },
2842 { "dn", OPT_BOOL | OPT_VIDEO | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(data_disable) },
int av_parse_ratio(AVRational *q, const char *str, int max, int log_offset, void *log_ctx)
Definition: parseutils.c:43
Definition: avio.h:68
Definition: libavcodec/avcodec.h:100
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
Definition: ffmpeg.h:371
static void choose_encoder(OptionsContext *o, AVFormatContext *s, OutputStream *ost)
Definition: ffmpeg_opt.c:949
int av_parse_video_rate(AVRational *rate, const char *arg)
Definition: parseutils.c:162
Definition: pixfmt.h:67
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Definition: libavcodec/utils.c:2378
Definition: dict.h:80
static int opt_data_frames(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2149
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Definition: aviobuf.c:988
int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str)
Definition: parseutils.c:131
static void init_output_filter(OutputFilter *ofilter, OptionsContext *o, AVFormatContext *oc)
Definition: ffmpeg_opt.c:1515
#define CODEC_FLAG_PASS2
Use internal 2pass ratecontrol in second pass mode.
Definition: libavcodec/avcodec.h:705
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)
Definition: libavformat/utils.c:614
static void assert_file_overwrite(const char *filename)
Definition: ffmpeg_opt.c:659
int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
Definition: libavformat/utils.c:4182
#define CODEC_FLAG_PASS1
Use internal 2pass ratecontrol in first pass mode.
Definition: libavcodec/avcodec.h:704
int split_commandline(OptionParseContext *octx, int argc, char *argv[], const OptionDef *options, const OptionGroupDef *groups, int nb_groups)
Definition: cmdutils.c:678
Definition: ffmpeg.h:190
Definition: rtspcodes.h:52
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Definition: cmdutils.c:1828
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
Definition: avfilter.c:842
static int opt_audio_filters(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2277
static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const char *filename)
Definition: ffmpeg_opt.c:1472
AVRational sample_aspect_ratio
Definition: libavcodec/avcodec.h:1505
Definition: cmdutils.h:144
static int opt_filter_complex(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2348
Definition: cmdutils.h:256
static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata)
Definition: ffmpeg_opt.c:1430
struct AVStream::@125 * info
Definition: cmdutils.h:133
static OutputStream * new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type, int source_index)
Definition: ffmpeg_opt.c:966
Definition: avformat.h:456
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Definition: dict.c:39
Definition: libavcodec/avcodec.h:2854
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Definition: libavcodec/options.c:182
AVDictionary * filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, AVFormatContext *s, AVStream *st, AVCodec *codec)
Definition: cmdutils.c:1836
static int opt_preset(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2175
Definition: ffmpeg.h:276
static int opt_data_codec(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:210
#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)
Definition: ffmpeg_opt.c:44
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
static int opt_audio_qscale(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2342
Definition: avformat.h:944
#define CODEC_FLAG_PSNR
error[?] variables will be set during encoding.
Definition: libavcodec/avcodec.h:708
Definition: cmdutils.h:241
#define AVFMT_FLAG_NONBLOCK
Do not block when reading packets from input.
Definition: avformat.h:1024
int opt_default(void *optctx, const char *opt, const char *arg)
Definition: cmdutils.c:483
Definition: samplefmt.h:50
static int open_input_file(OptionsContext *o, const char *filename)
Definition: ffmpeg_opt.c:716
#define CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
Definition: libavcodec/avcodec.h:714
static int opt_vsync(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2283
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Definition: libavformat/utils.c:3362
Definition: ffmpeg.h:213
static int opt_vstats(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2126
AVFormatContext * avformat_alloc_context(void)
Definition: libavformat/options.c:106
the mask is usually to keep the same permissions Filters should remove permissions on reference they give to output whenever necessary It can be automatically done by setting the rej_perms field on the output pad Here are a few guidelines corresponding to common then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:201
void show_help_options(const OptionDef *options, const char *msg, int req_flags, int rej_flags, int alt_flags)
Definition: cmdutils.c:147
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:173
Definition: ffmpeg.h:59
struct AVBitStreamFilterContext * next
Definition: libavcodec/avcodec.h:4531
int64_t filter_in_rescale_delta_last
Definition: ffmpeg.h:232
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
static int opt_video_codec(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:198
static int opt_qscale(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2244
AVDictionary ** setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts)
Definition: cmdutils.c:1892
AVCodec * avcodec_find_encoder_by_name(const char *name)
Definition: libavcodec/utils.c:2383
static OutputStream * new_subtitle_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
Definition: ffmpeg_opt.c:1380
int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat, const char *format_name, const char *filename)
Definition: mux.c:125
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Definition: mathematics.c:130
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Definition: libavformat/utils.c:3599
void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags)
Definition: dict.c:176
Definition: dict.c:28
static int opt_profile(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2259
static int open_files(OptionGroupList *l, const char *inout, int(*open_file)(OptionsContext *, const char *))
Definition: ffmpeg_opt.c:2457
static int opt_subtitle_codec(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:204
#define AV_OPT_FLAG_FILTERING_PARAM
a generic parameter which can be set by the user for filtering
Definition: opt.h:287
static int opt_video_channel(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:180
static int opt_recording_timestamp(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:502
Definition: cmdutils.h:281
Definition: ffmpeg.h:73
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Definition: channel_layout.c:191
static int opt_bitrate(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2232
int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options)
Definition: cmdutils.c:312
Definition: graph2dot.c:48
static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
Definition: ffmpeg_opt.c:385
Definition: avutil.h:144
static int opt_old2new(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2223
static int opt_sameq(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:171
static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
Definition: ffmpeg_opt.c:412
Definition: ffmpeg.h:68
static AVDictionary * strip_specifiers(AVDictionary *dict)
Definition: ffmpeg_opt.c:154
const AVOption * av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
Definition: opt.c:1223
AVInputFormat * av_find_input_format(const char *short_name)
Definition: libavformat/utils.c:248
static int opt_video_filters(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2271
static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
Definition: ffmpeg_opt.c:560
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
Definition: libavcodec/utils.c:2619
static int opt_progress(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2536
enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
Definition: libavformat/utils.c:223
AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
Definition: bitstream_filter.c:38
static int open_output_file(OptionsContext *o, const char *filename)
Definition: ffmpeg_opt.c:1560
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
Definition: cmdutils.h:274
static AVCodec * find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
Definition: ffmpeg_opt.c:516
int opt_timelimit(void *optctx, const char *opt, const char *arg)
Definition: cmdutils.c:949
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
Definition: codec_desc.c:2585
Definition: ffmpeg_opt.c:2449
Definition: avformat.h:643
Definition: avfilter.h:1123
int av_opt_get_int(void *obj, const char *name, int search_flags, int64_t *out_val)
Definition: opt.c:687
Close file fclose(fid)
#define SET_DICT(type, meta, context, index)
enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFormat target)
Definition: ffmpeg_filter.c:38
Definition: libavcodec/avcodec.h:1134
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Definition: libavcodec/utils.c:2397
int av_filename_number_test(const char *filename)
Definition: libavformat/utils.c:346
Definition: libavcodec/avcodec.h:674
int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
Definition: ffmpeg_filter.c:483
void show_help_default(const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2374
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Definition: dict.c:62
static int opt_map_channel(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:319
FILE * get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name)
Definition: cmdutils.c:1778
static int opt_filter_complex_script(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2360
static char * get_ost_filters(OptionsContext *o, AVFormatContext *oc, OutputStream *ost)
Definition: ffmpeg_opt.c:1142
Definition: rational.h:43
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:282
int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
Definition: cmdutils.c:135
void * grow_array(void *array, int elem_size, int *size, int new_size)
Definition: cmdutils.c:1912
static OutputStream * new_audio_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
Definition: ffmpeg_opt.c:1309
int avio_open2(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Definition: aviobuf.c:804
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
#define type
Definition: ffmpeg.h:367
static int opt_channel_layout(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2306
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Definition: libavformat/utils.c:2146
static int opt_audio_codec(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:192
Definition: libavcodec/avcodec.h:508
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
Definition: cmdutils.c:114
static int opt_vstats_file(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2119
static AVCodec * choose_decoder(OptionsContext *o, AVFormatContext *s, AVStream *st)
Definition: ffmpeg_opt.c:545
const char * av_get_media_type_string(enum AVMediaType media_type)
Definition: libavutil/utils.c:64
AVCodec * avcodec_find_decoder_by_name(const char *name)
Definition: libavcodec/utils.c:2402
static OutputStream * new_video_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
Definition: ffmpeg_opt.c:1166
static int opt_attach(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:311
static void parse_matrix_coeffs(uint16_t *dest, const char *str)
Definition: ffmpeg_opt.c:1096
static int opt_video_frames(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2137
int av_strstart(const char *str, const char *pfx, const char **ptr)
Definition: avstring.c:33
static int get_preset_file_2(const char *preset_name, const char *codec_name, AVIOContext **s)
Definition: ffmpeg_opt.c:923
static int opt_target(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:1980
Definition: avformat.h:918
static int opt_video_standard(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:186
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:345
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Definition: libavformat/utils.c:2748
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:920
Definition: avformat.h:377
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
Definition: libavcodec/options.c:97
void avformat_close_input(AVFormatContext **s)
Definition: libavformat/utils.c:3329
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
Definition: filter_design.txt:12
Definition: ffmpeg.h:309
static int opt_timecode(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2295
static void dump_attachment(AVStream *st, const char *filename)
Definition: ffmpeg_opt.c:684
printf("static const uint8_t my_array[100] = {\n")
About Git write you should know how to use GIT properly Luckily Git comes with excellent documentation git help man git shows you the available git< command > help man git< command > shows information about the subcommand< command > The most comprehensive manual is the website Git Reference visit they are quite exhaustive You do not need a special username or password All you need is to provide a ssh public key to the Git server admin What follows now is a basic introduction to Git and some FFmpeg specific guidelines Read it at least if you are granted commit privileges to the FFmpeg project you are expected to be familiar with these rules I if not You can get git from etc no matter how small Every one of them has been saved from looking like a fool by this many times It s very easy for stray debug output or cosmetic modifications to slip please avoid problems through this extra level of scrutiny For cosmetics only commits you should e g by running git config global user name My Name git config global user email my email which is either set in your personal configuration file through git config core editor or set by one of the following environment VISUAL or EDITOR Log messages should be concise but descriptive Explain why you made a what you did will be obvious from the changes themselves most of the time Saying just bug fix or is bad Remember that people of varying skill levels look at and educate themselves while reading through your code Don t include filenames in log Git provides that information Possibly make the commit message have a descriptive first line
Definition: git-howto.txt:153
uint64_t av_get_channel_layout(const char *name)
Definition: channel_layout.c:132
static int opt_streamid(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:1408
void show_help_children(const AVClass *class, int flags)
Definition: cmdutils.c:176
Definition: ffmpeg.h:200
union SpecifierOpt::@0 u
union OptionDef::@1 u
Definition: avutil.h:143
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31))))#define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac){}void ff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map){AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);return NULL;}return ac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;}int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){int use_generic=1;int len=in->nb_samples;int p;if(ac->dc){av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> out
Definition: audio_convert.c:194
#define MATCH_PER_TYPE_OPT(name, type, outvar, fmtctx, mediatype)
Definition: ffmpeg_opt.c:56
static int opt_default_new(OptionsContext *o, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2155
static int opt_map(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:216
static int opt_audio_frames(void *optctx, const char *opt, const char *arg)
Definition: ffmpeg_opt.c:2143
Definition: avutil.h:146
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
Definition: avformat.h:702
static OutputStream * new_attachment_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
Definition: ffmpeg_opt.c:1372
static void uninit_options(OptionsContext *o, int is_input)
Definition: ffmpeg_opt.c:99
Definition: ffmpeg_opt.c:2448
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
Definition: opt.c:252
static OutputStream * new_data_stream(OptionsContext *o, AVFormatContext *oc, int source_index)
Definition: ffmpeg_opt.c:1359
Generated on Wed Aug 6 2025 06:53:28 for FFmpeg by
