45 #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
47 #define SPECIFIER_OPT_FMT_str "%s"
48 #define SPECIFIER_OPT_FMT_i "%i"
49 #define SPECIFIER_OPT_FMT_i64 "%"PRId64
50 #define SPECIFIER_OPT_FMT_ui64 "%"PRIu64
51 #define SPECIFIER_OPT_FMT_f "%f"
52 #define SPECIFIER_OPT_FMT_dbl "%lf"
99 #define WARN_MULTIPLE_OPT_USAGE(name, type, so, st)\
101 char namestr[128] = "";\
102 const char *spec = so->specifier && so->specifier[0] ? so->specifier : "";\
103 for (i = 0; opt_name_##name[i]; i++)\
104 av_strlcatf(namestr, sizeof(namestr), "-%s%s", opt_name_##name[i], opt_name_##name[i+1] ? (opt_name_##name[i+2] ? ", " : " or ") : "");\
105 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",\
106 namestr, st->index, opt_name_##name[0], spec[0] ? ":" : "", spec, so->u.type);\
109 #define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\
111 int i, ret, matches = 0;\
113 for (i = 0; i < o->nb_ ## name; i++) {\
114 char *spec = o->name[i].specifier;\
115 if ((ret = check_stream_specifier(fmtctx, st, spec)) > 0) {\
116 outvar = o->name[i].u.type;\
123 WARN_MULTIPLE_OPT_USAGE(name, type, so, st);\
126 #define MATCH_PER_TYPE_OPT(name, type, outvar, fmtctx, mediatype)\
129 for (i = 0; i < o->nb_ ## name; i++) {\
130 char *spec = o->name[i].specifier;\
131 if (!strcmp(spec, mediatype))\
132 outvar = o->name[i].u.type;\
137 #if CONFIG_VIDEOTOOLBOX
202 int i, *count = (
int*)(so + 1);
203 for (
i = 0;
i < *count;
i++) {
225 memset(o, 0,
sizeof(*o));
242 printf(
"Hardware acceleration methods:\n");
257 char *p = strchr(e->
key,
':');
282 const AVClass *pclass = &
class;
291 if (user_stats_period <= 0) {
305 "If you are looking for an option to preserve the quality (which is not "
306 "what -%s was for), use -qscale 0 or an equivalent quality factor option.\n",
347 static int opt_map(
void *optctx,
const char *opt,
const char *
arg)
351 int i, negative = 0, file_idx, disabled = 0;
352 int sync_file_idx = -1, sync_stream_idx = 0;
366 if (sync = strchr(
map,
',')) {
368 sync_file_idx = strtol(sync + 1, &sync, 0);
383 "match any streams.\n",
arg);
396 const char *
c =
map + 1;
405 if (allow_unused = strchr(
map,
'?'))
407 file_idx = strtol(
map, &p, 0);
419 *p ==
':' ? p + 1 : p) > 0)
425 *p ==
':' ? p + 1 : p) <= 0)
437 if (sync_file_idx >= 0) {
450 }
else if (disabled) {
452 "To ignore this, add a trailing '?' to the map.\n",
arg);
456 "To ignore this, add a trailing '?' to the map.\n",
arg);
499 n = sscanf(
arg,
"%d.%d.%d:%d.%d",
503 if (n != 3 && n != 5) {
505 "[file.stream.channel|-1][:syncfile:syncstream]\n");
531 if (allow_unused = strchr(mapchan,
'?'))
540 "To ignore this, add a trailing '?' to the map_channel.\n",
558 static int opt_vaapi_device(
void *optctx,
const char *opt,
const char *
arg)
560 const char *prefix =
"vaapi:";
574 if (!strcmp(
arg,
"list")) {
576 printf(
"Supported hardware device types:\n");
616 if (*(++
arg) && *
arg !=
':') {
620 *stream_spec = *
arg ==
':' ?
arg + 1 :
"";
640 char type_in, type_out;
641 const char *istream_spec =
NULL, *ostream_spec =
NULL;
642 int idx_in = 0, idx_out = 0;
648 if (type_out ==
'g' || !*outspec)
650 if (type_out ==
's' || !*outspec)
652 if (type_out ==
'c' || !*outspec)
657 if (type_in ==
'g' || type_out ==
'g')
659 if (type_in ==
's' || type_out ==
's')
661 if (type_in ==
'c' || type_out ==
'c')
668 #define METADATA_CHECK_INDEX(index, nb_elems, desc)\
669 if ((index) < 0 || (index) >= (nb_elems)) {\
670 av_log(NULL, AV_LOG_FATAL, "Invalid %s index %d while processing metadata maps.\n",\
675 #define SET_DICT(type, meta, context, index)\
678 meta = &context->metadata;\
681 METADATA_CHECK_INDEX(index, context->nb_chapters, "chapter")\
682 meta = &context->chapters[index]->metadata;\
685 METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
686 meta = &context->programs[index]->metadata;\
690 default: av_assert0(0);\
693 SET_DICT(type_in, meta_in, ic, idx_in);
694 SET_DICT(type_out, meta_out, oc, idx_out);
697 if (type_in ==
's') {
711 if (type_out ==
's') {
730 struct tm time = *gmtime((time_t*)&recording_timestamp);
731 if (!strftime(buf,
sizeof(buf),
"creation_time=%Y-%m-%dT%H:%M:%S%z", &time))
736 "tag instead.\n", opt);
743 const char *
codec_string = encoder ?
"encoder" :
"decoder";
771 char *codec_name =
NULL;
793 const char *hwaccel =
NULL;
794 char *hwaccel_output_format =
NULL;
795 char *codec_tag =
NULL;
797 char *discard_str =
NULL;
823 uint32_t
tag = strtol(codec_tag, &next, 0);
888 hwaccel_output_format, ic, st);
890 if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel,
"cuvid")) {
892 "WARNING: defaulting hwaccel_output_format to cuda for compatibility "
893 "with old commandlines. This behaviour is DEPRECATED and will be removed "
894 "in the future. Please explicitly set \"-hwaccel_output_format cuda\".\n");
896 }
else if (hwaccel_output_format) {
900 "format: %s", hwaccel_output_format);
908 if (!strcmp(hwaccel,
"nvdec") || !strcmp(hwaccel,
"cuvid"))
911 if (!strcmp(hwaccel,
"none"))
913 else if (!strcmp(hwaccel,
"auto"))
949 if (hwaccel_device) {
965 char *canvas_size =
NULL;
997 fprintf(stderr,
"Error, both -y and -n supplied. Exiting.\n");
1002 if (proto_name && !strcmp(proto_name,
"file") &&
avio_check(filename, 0) == 0) {
1004 fprintf(stderr,
"File '%s' already exists. Overwrite? [y/N] ", filename);
1007 signal(SIGINT, SIG_DFL);
1021 if (proto_name && !strcmp(proto_name,
"file")) {
1026 if (!strcmp(filename, file->
ctx->
url)) {
1047 filename = e->
value;
1079 char * data_codec_name =
NULL;
1080 int scan_all_pmts_set = 0;
1104 if (!strcmp(filename,
"-"))
1108 strcmp(filename,
"/dev/stdin");
1156 if (data_codec_name)
1171 scan_all_pmts_set = 1;
1181 if (scan_all_pmts_set)
1198 for (
i = 0;
i < orig_nb_streams;
i++)
1237 int64_t seek_timestamp = timestamp;
1240 int dts_heuristic = 0;
1248 if (dts_heuristic) {
1313 "input file #%d (%s) is not a decoding option.\n", e->
key,
1320 "input file #%d (%s) has not been used for any stream. The most "
1321 "likely reason is either wrong type (e.g. a video option with "
1322 "no video streams) or that it is a private option of some decoder "
1323 "which was not actually used for any stream.\n", e->
key,
1366 char filename[1000];
1367 const char *
base[3] = { getenv(
"AVCONV_DATADIR"),
1376 snprintf(filename,
sizeof(filename),
"%s%s/%s-%s.avpreset",
base[
i],
1377 i != 1 ?
"" :
"/.avconv", codec_name, preset_name);
1381 snprintf(filename,
sizeof(filename),
"%s%s/%s.avpreset",
base[
i],
1382 i != 1 ?
"" :
"/.avconv", preset_name);
1392 char *codec_name =
NULL;
1402 "output stream #%d:%d. Default encoder for format %s (codec %s) is "
1403 "probably disabled. Please choose an encoder manually.\n",
1408 }
else if (!strcmp(codec_name,
"copy"))
1409 ost->stream_copy = 1;
1414 ost->encoding_needed = !
ost->stream_copy;
1417 ost->stream_copy = 1;
1418 ost->encoding_needed = 0;
1429 const char *bsfs =
NULL, *time_base =
NULL;
1430 char *next, *codec_tag =
NULL;
1461 if (!
ost->enc_ctx) {
1465 ost->enc_ctx->codec_type =
type;
1468 if (!
ost->ref_par) {
1485 if (!buf[0] || buf[0] ==
'#') {
1489 if (!(
arg = strchr(buf,
'='))) {
1496 }
while (!
s->eof_reached);
1501 "Preset %s specified for stream %d:%d, but could not be opened.\n",
1517 q.
num <= 0 || q.
den <= 0) {
1532 ost->enc_timebase = q;
1535 ost->max_frames = INT64_MAX;
1545 ost->copy_prior_start = -1;
1549 if (bsfs && *bsfs) {
1559 uint32_t
tag = strtol(codec_tag, &next, 0);
1563 ost->enc_ctx->codec_tag =
tag;
1575 ost->max_muxing_queue_size = 128;
1577 ost->max_muxing_queue_size *=
sizeof(
ost->pkt);
1579 ost->muxing_queue_data_size = 0;
1581 ost->muxing_queue_data_threshold = 50*1024*1024;
1595 ost->source_index = source_index;
1596 if (source_index >= 0) {
1604 if (!
ost->muxing_queue)
1613 const char *p =
str;
1661 if (
ost->filters_script &&
ost->filters) {
1667 if (
ost->filters_script)
1669 else if (
ost->filters)
1679 if (
ost->filters_script ||
ost->filters) {
1681 "%s '%s' was defined for %s output stream %d:%d but codec copy was selected.\n"
1682 "Filtering and streamcopy cannot be used together.\n",
1683 ost->filters ?
"Filtergraph" :
"Filtergraph script",
1684 ost->filters ?
ost->filters :
ost->filters_script,
1695 char *frame_rate =
NULL, *max_frame_rate =
NULL, *frame_aspect_ratio =
NULL;
1699 video_enc =
ost->enc_ctx;
1713 if (frame_rate && max_frame_rate) {
1718 if ((frame_rate || max_frame_rate) &&
1723 if (frame_aspect_ratio) {
1726 q.
num <= 0 || q.
den <= 0) {
1730 ost->frame_aspect_ratio = q;
1736 if (!
ost->stream_copy) {
1737 const char *p =
NULL;
1739 char *frame_pix_fmt =
NULL;
1740 char *intra_matrix =
NULL, *inter_matrix =
NULL;
1741 char *chroma_intra_matrix =
NULL;
1753 if (frame_pix_fmt && *frame_pix_fmt ==
'+') {
1754 ost->keep_pix_fmt = 1;
1755 if (!*++frame_pix_fmt)
1756 frame_pix_fmt =
NULL;
1775 if (chroma_intra_matrix) {
1794 for (
i = 0; p;
i++) {
1796 int e = sscanf(p,
"%d,%d,%d", &start, &end, &q);
1840 if (
ost->logfile_prefix &&
1845 char logfilename[1024];
1848 snprintf(logfilename,
sizeof(logfilename),
"%s-%d.log",
1849 ost->logfile_prefix ?
ost->logfile_prefix :
1852 if (!strcmp(
ost->enc->name,
"libx264")) {
1856 char *logbuffer =
read_file(logfilename);
1869 "Cannot write log file '%s' for pass-1 encoding: %s\n",
1870 logfilename, strerror(errno));
1879 if (
ost->forced_keyframes)
1884 ost->top_field_first = -1;
1895 if (
ost->stream_copy)
1911 audio_enc =
ost->enc_ctx;
1917 if (!
ost->stream_copy) {
1918 char *sample_fmt =
NULL;
1941 if ((
map->ofile_idx == -1 ||
ost->file_index ==
map->ofile_idx) &&
1942 (
map->ostream_idx == -1 ||
ost->st->
index ==
map->ostream_idx)) {
1945 if (
map->channel_idx == -1) {
1947 }
else if (
ost->source_index < 0) {
1957 ost->audio_channels_mapped + 1,
1958 sizeof(*
ost->audio_channels_map)
1962 ost->audio_channels_map[
ost->audio_channels_mapped++] =
map->channel_idx;
1968 if (
ost->stream_copy)
1979 if (!
ost->stream_copy) {
1992 if (!
ost->stream_copy) {
2003 ost->stream_copy = 1;
2016 subtitle_enc =
ost->enc_ctx;
2022 if (!
ost->stream_copy) {
2044 p = strchr(idx_str,
':');
2047 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
2070 for (
i = 0;
i <
is->nb_chapters;
i++) {
2075 int64_t rt = (
ofile->recording_time == INT64_MAX) ? INT64_MAX :
2079 if (in_ch->
end < ts_off)
2081 if (rt != INT64_MAX && in_ch->
start > rt + ts_off)
2088 out_ch->id = in_ch->
id;
2090 out_ch->start =
FFMAX(0, in_ch->
start - ts_off);
2091 out_ch->end =
FFMIN(rt, in_ch->
end - ts_off);
2106 switch (ofilter->
type) {
2115 ost->source_index = -1;
2116 ost->filter = ofilter;
2121 if (
ost->stream_copy) {
2123 "which is fed from a complex filtergraph. Filtering and streamcopy "
2124 "cannot be used together.\n",
ost->file_index,
ost->
index);
2128 if (
ost->avfilter && (
ost->filters ||
ost->filters_script)) {
2129 const char *opt =
ost->filters ?
"-vf/-af/-filter" :
"-filter_script";
2131 "%s '%s' was specified through the %s option "
2132 "for output stream %d:%d, which is fed from a complex filtergraph.\n"
2133 "%s and -filter_complex cannot be used together for the same stream.\n",
2134 ost->filters ?
"Filtergraph" :
"Filtergraph script",
2135 ost->filters ?
ost->filters :
ost->filters_script,
2164 int format_flags = 0;
2194 if (!strcmp(filename,
"-"))
2228 switch (ofilter->
type) {
2243 int best_score = 0, idx = -1;
2256 score > best_score) {
2269 int best_score = 0, idx = -1;
2278 score > best_score) {
2297 int input_props = 0, output_props = 0;
2302 if (input_descriptor)
2304 if (output_descriptor)
2307 input_props & output_props ||
2309 input_descriptor && output_descriptor &&
2310 (!input_descriptor->
props ||
2311 !output_descriptor->
props)) {
2335 if (
map->linklabel) {
2344 if (
out && !strcmp(
out->name,
map->linklabel)) {
2353 "in any defined filter graph, or was already used elsewhere.\n",
map->linklabel);
2363 map->file_index,
map->stream_index);
2389 "Cannot map stream #%d:%d - unsupported type.\n",
2390 map->file_index,
map->stream_index);
2393 "If you want unsupported types ignored instead "
2394 "of failing, please use the -ignore_unknown option\n"
2395 "If you want them copied, please use -copy_unknown\n");
2401 +
map->sync_stream_index];
2433 ost->stream_copy = 0;
2443 #if FF_API_LAVF_AVCTX
2448 if ((
ost->stream_copy ||
ost->attachment_filename)
2485 "output file #%d (%s) is not an encoding option.\n", e->
key,
2492 if (!strcmp(e->
key,
"gop_timecode"))
2496 "output file #%d (%s) has not been used for any stream. The most "
2497 "likely reason is either wrong type (e.g. a video option with "
2498 "no video streams) or that it is a private option of some encoder "
2499 "which was not actually used for any stream.\n", e->
key,
2508 if (
ost->encoding_needed &&
ost->source_index >= 0) {
2517 "Error initializing a simple filtergraph between streams "
2529 switch (
ost->enc_ctx->codec_type) {
2531 f->frame_rate =
ost->frame_rate;
2532 f->width =
ost->enc_ctx->width;
2533 f->height =
ost->enc_ctx->height;
2535 f->format =
ost->enc_ctx->pix_fmt;
2536 }
else if (
ost->enc->pix_fmts) {
2543 memcpy(
f->formats,
ost->enc->pix_fmts, (count + 1) *
sizeof(*
f->formats));
2548 f->format =
ost->enc_ctx->sample_fmt;
2549 }
else if (
ost->enc->sample_fmts) {
2556 memcpy(
f->formats,
ost->enc->sample_fmts, (count + 1) *
sizeof(*
f->formats));
2558 if (
ost->enc_ctx->sample_rate) {
2559 f->sample_rate =
ost->enc_ctx->sample_rate;
2560 }
else if (
ost->enc->supported_samplerates) {
2562 while (
ost->enc->supported_samplerates[count])
2565 if (!
f->sample_rates)
2567 memcpy(
f->sample_rates,
ost->enc->supported_samplerates,
2568 (count + 1) *
sizeof(*
f->sample_rates));
2570 if (
ost->enc_ctx->channels) {
2572 }
else if (
ost->enc->channel_layouts) {
2574 while (
ost->enc->channel_layouts[count])
2577 if (!
f->channel_layouts)
2579 memcpy(
f->channel_layouts,
ost->enc->channel_layouts,
2580 (count + 1) *
sizeof(*
f->channel_layouts));
2597 "No input streams but output needs an input stream\n");
2626 av_log(
NULL,
AV_LOG_FATAL,
"Invalid input file index %d while processing metadata maps\n", in_file_index);
2630 in_file_index >= 0 ?
2685 const char *to_dealloc = p2;
2700 if (!strcmp(
key,
"program_num"))
2701 progid = strtol(p2,
NULL, 0);
2711 const char *to_dealloc = p2;
2720 "No '=' character in program string %s.\n",
2728 if (!strcmp(
key,
"title")) {
2730 }
else if (!strcmp(
key,
"program_num")) {
2731 }
else if (!strcmp(
key,
"st")) {
2732 int st_num = strtol(p2,
NULL, 0);
2747 const char *stream_spec;
2767 ost->rotate_overridden = 1;
2768 ost->rotate_override_value = theta;
2811 static const char *
const frame_rates[] = {
"25",
"30000/1001",
"24000/1001" };
2813 if (!strncmp(
arg,
"pal-", 4)) {
2816 }
else if (!strncmp(
arg,
"ntsc-", 5)) {
2819 }
else if (!strncmp(
arg,
"film-", 5)) {
2836 }
else if ((fr == 29970) || (fr == 23976)) {
2856 if (!strcmp(
arg,
"vcd")) {
2883 }
else if (!strcmp(
arg,
"svcd")) {
2905 }
else if (!strcmp(
arg,
"dvd")) {
2927 }
else if (!strncmp(
arg,
"dv", 2)) {
2933 norm ==
PAL ?
"yuv420p" :
"yuv411p",
options);
2960 time_t today2 = time(
NULL);
2961 struct tm *today = localtime(&today2);
2968 snprintf(filename,
sizeof(filename),
"vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
3015 char filename[1000],
line[1000], tmp_line[1000];
3016 const char *codec_name =
NULL;
3023 if(!strncmp(
arg,
"libx264-lossless", strlen(
"libx264-lossless"))){
3031 char *
key = tmp_line, *
value, *endptr;
3033 if (strcspn(
line,
"#\n\r") == 0)
3075 if(!strcmp(opt,
"ab")){
3078 }
else if(!strcmp(opt,
"b")){
3092 if(!strcmp(opt,
"qscale")){
3107 if(!strcmp(opt,
"profile")){
3157 char layout_str[32];
3176 stream_str = strchr(opt,
':');
3177 ac_str_size = 3 + (stream_str ? strlen(stream_str) : 0);
3232 int show_advanced = 0, show_avoptions = 0;
3235 if (!strcmp(opt,
"long"))
3237 else if (!strcmp(opt,
"full"))
3238 show_advanced = show_avoptions = 1;
3246 " -h -- print basic options\n"
3247 " -h long -- print more options\n"
3248 " -h full -- print all options (including all format and codec specific options, very long)\n"
3249 " -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol\n"
3250 " See man %s for detailed description of the options.\n"
3257 "instead of just one file):",
3285 if (show_avoptions) {
3292 #if CONFIG_SWRESAMPLE
3314 [GROUP_INFILE] = {
"input url",
"i",
OPT_INPUT },
3332 "%s.\n", inout,
g->arg);
3357 memset(&octx, 0,
sizeof(octx));
3409 static int opt_progress(
void *optctx,
const char *opt,
const char *
arg)
3414 if (!strcmp(
arg,
"-"))
3426 #define OFFSET(x) offsetof(OptionsContext, x)
3432 "force format",
"fmt" },
3434 "overwrite output files" },
3436 "never overwrite output files" },
3438 "Ignore unknown stream types" },
3440 "Copy unknown stream types" },
3443 "codec name",
"codec" },
3446 "codec name",
"codec" },
3449 "preset name",
"preset" },
3452 "set input stream mapping",
3453 "[-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]]" },
3455 "map an audio channel from one stream to another",
"file.stream.channel[:syncfile.syncstream]" },
3458 "set metadata information of outfile from infile",
3459 "outfile[,metadata]:infile[,metadata]" },
3462 "set chapters mapping",
"input_file_index" },
3465 "record or transcode \"duration\" seconds of audio/video",
3468 "record or transcode stop time",
"time_stop" },
3470 "set the limit file size in bytes",
"limit_size" },
3473 "set the start time offset",
"time_off" },
3476 "set the start time offset relative to EOF",
"time_off" },
3479 "enable/disable seeking by timestamp with -ss" },
3482 "enable/disable accurate seeking with -ss" },
3485 "set the input ts offset",
"time_off" },
3488 "set the input ts scale",
"scale" },
3490 "set the recording timestamp ('now' to set the current time)",
"time" },
3492 "add metadata",
"string=string" },
3494 "add program with specified streams",
"title=string:st=number..." },
3497 "set the number of data frames to output",
"number" },
3499 "add timings for benchmarking" },
3501 "add timings for each task" },
3503 "write program-readable progress information",
"url" },
3505 "enable or disable interaction on standard input" },
3507 "set max runtime in seconds in CPU user time",
"limit" },
3509 "dump each input packet" },
3511 "when dumping packets, also dump the payload" },
3514 "read input at native frame rate",
"" },
3516 "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\" "
3517 "with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")",
"type" },
3519 "video sync method",
"" },
3521 "frame drop threshold",
"" },
3523 "audio sync method",
"" },
3525 "audio drift threshold",
"threshold" },
3527 "copy timestamps" },
3529 "shift input timestamps to start at 0 when using copyts" },
3531 "copy input stream time base when stream copying",
"mode" },
3534 "finish encoding within shortest input" },
3542 "timestamp discontinuity delta threshold",
"threshold" },
3544 "timestamp error delta threshold",
"threshold" },
3546 "exit on error",
"error" },
3548 "abort on the specified condition flags",
"flags" },
3551 "copy initial non-keyframes" },
3553 "copy or discard frames before start time" },
3555 "set the number of frames to output",
"number" },
3558 "force codec tag/fourcc",
"fourcc/tag" },
3561 "use fixed quality scale (VBR)",
"q" },
3564 "use fixed quality scale (VBR)",
"q" },
3566 "set profile",
"profile" },
3568 "set stream filtergraph",
"filter_graph" },
3570 "number of non-complex filter threads" },
3572 "read stream filtergraph description from a file",
"filename" },
3574 "reinit filtergraph on input parameter changes",
"" },
3576 "create a complex filtergraph",
"graph_description" },
3578 "number of threads for -filter_complex" },
3580 "create a complex filtergraph",
"graph_description" },
3582 "read complex filtergraph description from a file",
"filename" },
3584 "enable automatic conversion filters globally" },
3586 "print progress report during encoding", },
3588 "set the period at which ffmpeg updates stats and -progress output",
"time" },
3591 "add an attachment to the output file",
"filename" },
3594 "extract an attachment into a file",
"filename" },
3596 OPT_OFFSET, { .off =
OFFSET(
loop) },
"set number of times input stream shall be looped",
"loop count" },
3598 "print timestamp debugging info" },
3600 "ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.",
"maximum error rate" },
3606 "disposition",
"" },
3608 { .off =
OFFSET(thread_queue_size) },
3609 "set the maximum number of queued packets from the demuxer" },
3611 "read and decode the streams to fill missing information with heuristics" },
3615 "set the number of video frames to output",
"number" },
3618 "set frame rate (Hz value, fraction or abbreviation)",
"rate" },
3621 "set max frame rate (Hz value, fraction or abbreviation)",
"rate" },
3624 "set frame size (WxH or abbreviation)",
"size" },
3627 "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)",
"aspect" },
3630 "set pixel format",
"format" },
3632 "set the number of bits per raw sample",
"number" },
3634 "deprecated use -g 1" },
3639 "rate control override for specific intervals",
"override" },
3642 "force video codec ('copy' to copy stream)",
"codec" },
3648 "set initial TimeCode value.",
"hh:mm:ss[:;.]ff" },
3650 "select the pass number (1 to 3)",
"n" },
3653 "select two pass log file name prefix",
"prefix" },
3655 "this option is deprecated, use the yadif filter instead" },
3657 "calculate PSNR of compressed frames" },
3659 "dump video coding statistics to file" },
3661 "dump video coding statistics to file",
"file" },
3663 "Version of the vstats format to use."},
3665 "set video filters",
"filter_graph" },
3668 "specify intra matrix coeffs",
"matrix" },
3671 "specify inter matrix coeffs",
"matrix" },
3674 "specify intra matrix coeffs",
"matrix" },
3677 "top=1/bottom=0/auto=-1 field first",
"" },
3680 "force video tag/fourcc",
"fourcc/tag" },
3682 "show QP histogram" },
3685 "force the selected framerate, disable the best supported framerate selection" },
3688 "set the value of an outfile streamid",
"streamIndex:value" },
3691 "force key frames at specified timestamps",
"timestamps" },
3693 "audio bitrate (please use -b:a)",
"bitrate" },
3695 "video bitrate (please use -b:v)",
"bitrate" },
3698 "use HW accelerated decoding",
"hwaccel name" },
3701 "select a device for HW acceleration",
"devicename" },
3704 "select output format used with HW accelerated decoding",
"format" },
3705 #if CONFIG_VIDEOTOOLBOX
3709 "show available HW acceleration methods" },
3712 "automatically insert correct rotate filters" },
3715 "automatically insert a scale filter at the end of the filter graph" },
3719 "set the number of audio frames to output",
"number" },
3721 "set audio quality (codec-specific)",
"quality", },
3724 "set audio sampling rate (in Hz)",
"rate" },
3727 "set number of audio channels",
"channels" },
3732 "force audio codec ('copy' to copy stream)",
"codec" },
3735 "force audio tag/fourcc",
"fourcc/tag" },
3737 "change audio volume (256=normal)" ,
"volume" },
3740 "set sample format",
"format" },
3743 "set channel layout",
"layout" },
3745 "set audio filters",
"filter_graph" },
3747 "set the maximum number of channels to try to guess the channel layout" },
3751 "disable subtitle" },
3753 "force subtitle codec ('copy' to copy stream)",
"codec" },
3755 ,
"force subtitle tag/fourcc",
"fourcc/tag" },
3757 "fix subtitles duration" },
3759 "set canvas size (WxH or abbreviation)",
"size" },
3763 "deprecated, use -channel",
"channel" },
3765 "deprecated, use -standard",
"standard" },
3770 "set the maximum demux-decode delay",
"seconds" },
3772 "set the initial demux-decode delay",
"seconds" },
3774 "specify a file in which to print sdp information",
"file" },
3777 "set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)",
"ratio" },
3779 "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). "
3780 "two special values are defined - "
3781 "0 = use frame rate (video) or sample rate (audio),"
3782 "-1 = match source time base",
"ratio" },
3785 "A comma-separated list of bitstream filters",
"bitstream_filters" },
3787 "deprecated",
"audio bitstream_filters" },
3789 "deprecated",
"video bitstream_filters" },
3792 "set the audio options to the indicated preset",
"preset" },
3794 "set the video options to the indicated preset",
"preset" },
3796 "set the subtitle options to the indicated preset",
"preset" },
3798 "set options from indicated preset file",
"filename" },
3801 "maximum number of packets that can be buffered while waiting for all streams to initialize",
"packets" },
3803 "set the threshold after which max_muxing_queue_size is taken into account",
"bytes" },
3807 "force data codec ('copy' to copy stream)",
"codec" },
3813 "set VAAPI hardware device (DRM path or X11 display name)",
"device" },
3818 "set QSV hardware device (DirectX adapter index, DRM path or X11 display name)",
"device"},
3822 "initialise hardware device",
"args" },
3824 "set hardware device used when filtering",
"device" },