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"
96 #define WARN_MULTIPLE_OPT_USAGE(name, type, so, st)\
98 char namestr[128] = "";\
99 const char *spec = so->specifier && so->specifier[0] ? so->specifier : "";\
100 for (i = 0; opt_name_##name[i]; i++)\
101 av_strlcatf(namestr, sizeof(namestr), "-%s%s", opt_name_##name[i], opt_name_##name[i+1] ? (opt_name_##name[i+2] ? ", " : " or ") : "");\
102 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",\
103 namestr, st->index, opt_name_##name[0], spec[0] ? ":" : "", spec, so->u.type);\
106 #define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\
108 int i, ret, matches = 0;\
110 for (i = 0; i < o->nb_ ## name; i++) {\
111 char *spec = o->name[i].specifier;\
112 if ((ret = check_stream_specifier(fmtctx, st, spec)) > 0) {\
113 outvar = o->name[i].u.type;\
120 WARN_MULTIPLE_OPT_USAGE(name, type, so, st);\
123 #define MATCH_PER_TYPE_OPT(name, type, outvar, fmtctx, mediatype)\
126 for (i = 0; i < o->nb_ ## name; i++) {\
127 char *spec = o->name[i].specifier;\
128 if (!strcmp(spec, mediatype))\
129 outvar = o->name[i].u.type;\
134 #if CONFIG_VIDEOTOOLBOX
197 int i, *count = (
int*)(so + 1);
198 for (
i = 0;
i < *count;
i++) {
220 memset(o, 0,
sizeof(*o));
236 printf(
"Hardware acceleration methods:\n");
251 char *p = strchr(e->
key,
':');
276 const AVClass *pclass = &
class;
284 "If you are looking for an option to preserve the quality (which is not "
285 "what -%s was for), use -qscale 0 or an equivalent quality factor option.\n",
326 static int opt_map(
void *optctx,
const char *opt,
const char *
arg)
330 int i, negative = 0, file_idx, disabled = 0;
331 int sync_file_idx = -1, sync_stream_idx = 0;
345 if (sync = strchr(
map,
',')) {
347 sync_file_idx = strtol(sync + 1, &sync, 0);
362 "match any streams.\n",
arg);
375 const char *
c =
map + 1;
384 if (allow_unused = strchr(
map,
'?'))
386 file_idx = strtol(
map, &p, 0);
398 *p ==
':' ? p + 1 : p) > 0)
404 *p ==
':' ? p + 1 : p) <= 0)
416 if (sync_file_idx >= 0) {
429 }
else if (disabled) {
431 "To ignore this, add a trailing '?' to the map.\n",
arg);
435 "To ignore this, add a trailing '?' to the map.\n",
arg);
478 n = sscanf(
arg,
"%d.%d.%d:%d.%d",
482 if (n != 3 && n != 5) {
484 "[file.stream.channel|-1][:syncfile:syncstream]\n");
510 if (allow_unused = strchr(mapchan,
'?'))
519 "To ignore this, add a trailing '?' to the map_channel.\n",
537 static int opt_vaapi_device(
void *optctx,
const char *opt,
const char *
arg)
539 const char *prefix =
"vaapi:";
553 if (!strcmp(
arg,
"list")) {
555 printf(
"Supported hardware device types:\n");
595 if (*(++
arg) && *
arg !=
':') {
599 *stream_spec = *
arg ==
':' ?
arg + 1 :
"";
619 char type_in, type_out;
620 const char *istream_spec =
NULL, *ostream_spec =
NULL;
621 int idx_in = 0, idx_out = 0;
627 if (type_out ==
'g' || !*outspec)
629 if (type_out ==
's' || !*outspec)
631 if (type_out ==
'c' || !*outspec)
636 if (type_in ==
'g' || type_out ==
'g')
638 if (type_in ==
's' || type_out ==
's')
640 if (type_in ==
'c' || type_out ==
'c')
647 #define METADATA_CHECK_INDEX(index, nb_elems, desc)\
648 if ((index) < 0 || (index) >= (nb_elems)) {\
649 av_log(NULL, AV_LOG_FATAL, "Invalid %s index %d while processing metadata maps.\n",\
654 #define SET_DICT(type, meta, context, index)\
657 meta = &context->metadata;\
660 METADATA_CHECK_INDEX(index, context->nb_chapters, "chapter")\
661 meta = &context->chapters[index]->metadata;\
664 METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
665 meta = &context->programs[index]->metadata;\
669 default: av_assert0(0);\
672 SET_DICT(type_in, meta_in, ic, idx_in);
673 SET_DICT(type_out, meta_out, oc, idx_out);
676 if (type_in ==
's') {
690 if (type_out ==
's') {
709 struct tm time = *gmtime((time_t*)&recording_timestamp);
710 if (!strftime(buf,
sizeof(buf),
"creation_time=%Y-%m-%dT%H:%M:%S%z", &time))
715 "tag instead.\n", opt);
722 const char *
codec_string = encoder ?
"encoder" :
"decoder";
750 char *codec_name =
NULL;
772 const char *hwaccel =
NULL;
773 char *hwaccel_output_format =
NULL;
774 char *codec_tag =
NULL;
776 char *discard_str =
NULL;
802 uint32_t
tag = strtol(codec_tag, &next, 0);
851 if (st->codec->lowres) {
876 hwaccel_output_format, ic, st);
878 if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel,
"cuvid")) {
880 "WARNING: defaulting hwaccel_output_format to cuda for compatibility "
881 "with old commandlines. This behaviour is DEPRECATED and will be removed "
882 "in the future. Please explicitly set \"-hwaccel_output_format cuda\".\n");
884 }
else if (hwaccel_output_format) {
888 "format: %s", hwaccel_output_format);
896 if (!strcmp(hwaccel,
"nvdec") || !strcmp(hwaccel,
"cuvid"))
899 if (!strcmp(hwaccel,
"none"))
901 else if (!strcmp(hwaccel,
"auto"))
937 if (hwaccel_device) {
953 char *canvas_size =
NULL;
985 fprintf(stderr,
"Error, both -y and -n supplied. Exiting.\n");
990 if (proto_name && !strcmp(proto_name,
"file") &&
avio_check(filename, 0) == 0) {
992 fprintf(stderr,
"File '%s' already exists. Overwrite? [y/N] ", filename);
995 signal(SIGINT, SIG_DFL);
1009 if (proto_name && !strcmp(proto_name,
"file")) {
1014 if (!strcmp(filename, file->
ctx->
url)) {
1035 filename = e->
value;
1067 char * data_codec_name =
NULL;
1068 int scan_all_pmts_set = 0;
1092 if (!strcmp(filename,
"-"))
1096 strcmp(filename,
"/dev/stdin");
1144 if (data_codec_name)
1159 scan_all_pmts_set = 1;
1169 if (scan_all_pmts_set)
1186 for (
i = 0;
i < orig_nb_streams;
i++)
1225 int64_t seek_timestamp = timestamp;
1228 int dts_heuristic = 0;
1236 if (dts_heuristic) {
1298 "input file #%d (%s) is not a decoding option.\n", e->
key,
1305 "input file #%d (%s) has not been used for any stream. The most "
1306 "likely reason is either wrong type (e.g. a video option with "
1307 "no video streams) or that it is a private option of some decoder "
1308 "which was not actually used for any stream.\n", e->
key,
1351 char filename[1000];
1352 const char *
base[3] = { getenv(
"AVCONV_DATADIR"),
1361 snprintf(filename,
sizeof(filename),
"%s%s/%s-%s.avpreset",
base[
i],
1362 i != 1 ?
"" :
"/.avconv", codec_name, preset_name);
1366 snprintf(filename,
sizeof(filename),
"%s%s/%s.avpreset",
base[
i],
1367 i != 1 ?
"" :
"/.avconv", preset_name);
1377 char *codec_name =
NULL;
1387 "output stream #%d:%d. Default encoder for format %s (codec %s) is "
1388 "probably disabled. Please choose an encoder manually.\n",
1393 }
else if (!strcmp(codec_name,
"copy"))
1394 ost->stream_copy = 1;
1399 ost->encoding_needed = !
ost->stream_copy;
1402 ost->stream_copy = 1;
1403 ost->encoding_needed = 0;
1414 const char *bsfs =
NULL, *time_base =
NULL;
1415 char *next, *codec_tag =
NULL;
1446 if (!
ost->enc_ctx) {
1450 ost->enc_ctx->codec_type =
type;
1453 if (!
ost->ref_par) {
1468 if (!buf[0] || buf[0] ==
'#') {
1472 if (!(
arg = strchr(buf,
'='))) {
1479 }
while (!
s->eof_reached);
1484 "Preset %s specified for stream %d:%d, but could not be opened.\n",
1500 q.
num <= 0 || q.
den <= 0) {
1515 ost->enc_timebase = q;
1518 ost->max_frames = INT64_MAX;
1528 ost->copy_prior_start = -1;
1532 if (bsfs && *bsfs) {
1542 uint32_t
tag = strtol(codec_tag, &next, 0);
1546 ost->enc_ctx->codec_tag =
tag;
1558 ost->max_muxing_queue_size = 128;
1573 ost->source_index = source_index;
1574 if (source_index >= 0) {
1582 if (!
ost->muxing_queue)
1591 const char *p =
str;
1639 if (
ost->filters_script &&
ost->filters) {
1645 if (
ost->filters_script)
1647 else if (
ost->filters)
1657 if (
ost->filters_script ||
ost->filters) {
1659 "%s '%s' was defined for %s output stream %d:%d but codec copy was selected.\n"
1660 "Filtering and streamcopy cannot be used together.\n",
1661 ost->filters ?
"Filtergraph" :
"Filtergraph script",
1662 ost->filters ?
ost->filters :
ost->filters_script,
1673 char *frame_rate =
NULL, *frame_aspect_ratio =
NULL;
1677 video_enc =
ost->enc_ctx;
1688 if (frame_aspect_ratio) {
1691 q.
num <= 0 || q.
den <= 0) {
1695 ost->frame_aspect_ratio = q;
1701 if (!
ost->stream_copy) {
1702 const char *p =
NULL;
1704 char *frame_pix_fmt =
NULL;
1705 char *intra_matrix =
NULL, *inter_matrix =
NULL;
1706 char *chroma_intra_matrix =
NULL;
1718 if (frame_pix_fmt && *frame_pix_fmt ==
'+') {
1719 ost->keep_pix_fmt = 1;
1720 if (!*++frame_pix_fmt)
1721 frame_pix_fmt =
NULL;
1740 if (chroma_intra_matrix) {
1759 for (
i = 0; p;
i++) {
1761 int e = sscanf(p,
"%d,%d,%d", &start, &
end, &q);
1805 if (
ost->logfile_prefix &&
1810 char logfilename[1024];
1813 snprintf(logfilename,
sizeof(logfilename),
"%s-%d.log",
1814 ost->logfile_prefix ?
ost->logfile_prefix :
1817 if (!strcmp(
ost->enc->name,
"libx264")) {
1821 char *logbuffer =
read_file(logfilename);
1834 "Cannot write log file '%s' for pass-1 encoding: %s\n",
1835 logfilename, strerror(errno));
1844 if (
ost->forced_keyframes)
1849 ost->top_field_first = -1;
1860 if (
ost->stream_copy)
1876 audio_enc =
ost->enc_ctx;
1882 if (!
ost->stream_copy) {
1883 char *sample_fmt =
NULL;
1906 if ((
map->ofile_idx == -1 ||
ost->file_index ==
map->ofile_idx) &&
1907 (
map->ostream_idx == -1 ||
ost->st->
index ==
map->ostream_idx)) {
1910 if (
map->channel_idx == -1) {
1912 }
else if (
ost->source_index < 0) {
1922 ost->audio_channels_mapped + 1,
1923 sizeof(*
ost->audio_channels_map)
1927 ost->audio_channels_map[
ost->audio_channels_mapped++] =
map->channel_idx;
1933 if (
ost->stream_copy)
1944 if (!
ost->stream_copy) {
1957 if (!
ost->stream_copy) {
1968 ost->stream_copy = 1;
1981 subtitle_enc =
ost->enc_ctx;
1987 if (!
ost->stream_copy) {
2009 p = strchr(idx_str,
':');
2012 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
2035 for (
i = 0;
i <
is->nb_chapters;
i++) {
2040 int64_t rt = (
ofile->recording_time == INT64_MAX) ? INT64_MAX :
2044 if (in_ch->
end < ts_off)
2046 if (rt != INT64_MAX && in_ch->
start > rt + ts_off)
2053 out_ch->id = in_ch->
id;
2055 out_ch->start =
FFMAX(0, in_ch->
start - ts_off);
2056 out_ch->end =
FFMIN(rt, in_ch->
end - ts_off);
2071 switch (ofilter->
type) {
2080 ost->source_index = -1;
2081 ost->filter = ofilter;
2086 if (
ost->stream_copy) {
2088 "which is fed from a complex filtergraph. Filtering and streamcopy "
2089 "cannot be used together.\n",
ost->file_index,
ost->
index);
2093 if (
ost->avfilter && (
ost->filters ||
ost->filters_script)) {
2094 const char *opt =
ost->filters ?
"-vf/-af/-filter" :
"-filter_script";
2096 "%s '%s' was specified through the %s option "
2097 "for output stream %d:%d, which is fed from a complex filtergraph.\n"
2098 "%s and -filter_complex cannot be used together for the same stream.\n",
2099 ost->filters ?
"Filtergraph" :
"Filtergraph script",
2100 ost->filters ?
ost->filters :
ost->filters_script,
2129 int format_flags = 0;
2159 if (!strcmp(filename,
"-"))
2193 switch (ofilter->
type) {
2208 int area = 0, idx = -1;
2233 int best_score = 0, idx = -1;
2242 score > best_score) {
2261 int input_props = 0, output_props = 0;
2266 if (input_descriptor)
2268 if (output_descriptor)
2271 input_props & output_props ||
2273 input_descriptor && output_descriptor &&
2274 (!input_descriptor->
props ||
2275 !output_descriptor->
props)) {
2299 if (
map->linklabel) {
2308 if (
out && !strcmp(
out->name,
map->linklabel)) {
2317 "in any defined filter graph, or was already used elsewhere.\n",
map->linklabel);
2327 map->file_index,
map->stream_index);
2353 "Cannot map stream #%d:%d - unsupported type.\n",
2354 map->file_index,
map->stream_index);
2357 "If you want unsupported types ignored instead "
2358 "of failing, please use the -ignore_unknown option\n"
2359 "If you want them copied, please use -copy_unknown\n");
2365 +
map->sync_stream_index];
2397 ost->stream_copy = 0;
2407 #if FF_API_LAVF_AVCTX
2412 if ((
ost->stream_copy ||
ost->attachment_filename)
2449 "output file #%d (%s) is not an encoding option.\n", e->
key,
2456 if (!strcmp(e->
key,
"gop_timecode"))
2460 "output file #%d (%s) has not been used for any stream. The most "
2461 "likely reason is either wrong type (e.g. a video option with "
2462 "no video streams) or that it is a private option of some encoder "
2463 "which was not actually used for any stream.\n", e->
key,
2472 if (
ost->encoding_needed &&
ost->source_index >= 0) {
2481 "Error initializing a simple filtergraph between streams "
2493 switch (
ost->enc_ctx->codec_type) {
2495 f->frame_rate =
ost->frame_rate;
2496 f->width =
ost->enc_ctx->width;
2497 f->height =
ost->enc_ctx->height;
2499 f->format =
ost->enc_ctx->pix_fmt;
2500 }
else if (
ost->enc->pix_fmts) {
2507 memcpy(
f->formats,
ost->enc->pix_fmts, (count + 1) *
sizeof(*
f->formats));
2512 f->format =
ost->enc_ctx->sample_fmt;
2513 }
else if (
ost->enc->sample_fmts) {
2520 memcpy(
f->formats,
ost->enc->sample_fmts, (count + 1) *
sizeof(*
f->formats));
2522 if (
ost->enc_ctx->sample_rate) {
2523 f->sample_rate =
ost->enc_ctx->sample_rate;
2524 }
else if (
ost->enc->supported_samplerates) {
2526 while (
ost->enc->supported_samplerates[count])
2529 if (!
f->sample_rates)
2531 memcpy(
f->sample_rates,
ost->enc->supported_samplerates,
2532 (count + 1) *
sizeof(*
f->sample_rates));
2534 if (
ost->enc_ctx->channels) {
2536 }
else if (
ost->enc->channel_layouts) {
2538 while (
ost->enc->channel_layouts[count])
2541 if (!
f->channel_layouts)
2543 memcpy(
f->channel_layouts,
ost->enc->channel_layouts,
2544 (count + 1) *
sizeof(*
f->channel_layouts));
2561 "No input streams but output needs an input stream\n");
2590 av_log(
NULL,
AV_LOG_FATAL,
"Invalid input file index %d while processing metadata maps\n", in_file_index);
2594 in_file_index >= 0 ?
2646 const char *to_dealloc = p2;
2661 if (!strcmp(
key,
"program_num"))
2662 progid = strtol(p2,
NULL, 0);
2672 const char *to_dealloc = p2;
2681 "No '=' character in program string %s.\n",
2689 if (!strcmp(
key,
"title")) {
2691 }
else if (!strcmp(
key,
"program_num")) {
2692 }
else if (!strcmp(
key,
"st")) {
2693 int st_num = strtol(p2,
NULL, 0);
2708 const char *stream_spec;
2728 ost->rotate_overridden = 1;
2729 ost->rotate_override_value = theta;
2772 static const char *
const frame_rates[] = {
"25",
"30000/1001",
"24000/1001" };
2774 if (!strncmp(
arg,
"pal-", 4)) {
2777 }
else if (!strncmp(
arg,
"ntsc-", 5)) {
2780 }
else if (!strncmp(
arg,
"film-", 5)) {
2797 }
else if ((fr == 29970) || (fr == 23976)) {
2817 if (!strcmp(
arg,
"vcd")) {
2844 }
else if (!strcmp(
arg,
"svcd")) {
2866 }
else if (!strcmp(
arg,
"dvd")) {
2888 }
else if (!strncmp(
arg,
"dv", 2)) {
2894 norm ==
PAL ?
"yuv420p" :
"yuv411p",
options);
2921 time_t today2 = time(
NULL);
2922 struct tm *today = localtime(&today2);
2929 snprintf(filename,
sizeof(filename),
"vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
2976 char filename[1000],
line[1000], tmp_line[1000];
2977 const char *codec_name =
NULL;
2984 if(!strncmp(
arg,
"libx264-lossless", strlen(
"libx264-lossless"))){
2992 char *
key = tmp_line, *
value, *endptr;
2994 if (strcspn(
line,
"#\n\r") == 0)
3036 if(!strcmp(opt,
"ab")){
3039 }
else if(!strcmp(opt,
"b")){
3053 if(!strcmp(opt,
"qscale")){
3068 if(!strcmp(opt,
"profile")){
3118 char layout_str[32];
3137 stream_str = strchr(opt,
':');
3138 ac_str_size = 3 + (stream_str ? strlen(stream_str) : 0);
3193 int show_advanced = 0, show_avoptions = 0;
3196 if (!strcmp(opt,
"long"))
3198 else if (!strcmp(opt,
"full"))
3199 show_advanced = show_avoptions = 1;
3207 " -h -- print basic options\n"
3208 " -h long -- print more options\n"
3209 " -h full -- print all options (including all format and codec specific options, very long)\n"
3210 " -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol\n"
3211 " See man %s for detailed description of the options.\n"
3218 "instead of just one file):",
3246 if (show_avoptions) {
3253 #if CONFIG_SWRESAMPLE
3275 [GROUP_INFILE] = {
"input url",
"i",
OPT_INPUT },
3293 "%s.\n", inout,
g->arg);
3318 memset(&octx, 0,
sizeof(octx));
3370 static int opt_progress(
void *optctx,
const char *opt,
const char *
arg)
3375 if (!strcmp(
arg,
"-"))
3387 #define OFFSET(x) offsetof(OptionsContext, x)
3393 "force format",
"fmt" },
3395 "overwrite output files" },
3397 "never overwrite output files" },
3399 "Ignore unknown stream types" },
3401 "Copy unknown stream types" },
3404 "codec name",
"codec" },
3407 "codec name",
"codec" },
3410 "preset name",
"preset" },
3413 "set input stream mapping",
3414 "[-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]]" },
3416 "map an audio channel from one stream to another",
"file.stream.channel[:syncfile.syncstream]" },
3419 "set metadata information of outfile from infile",
3420 "outfile[,metadata]:infile[,metadata]" },
3423 "set chapters mapping",
"input_file_index" },
3426 "record or transcode \"duration\" seconds of audio/video",
3429 "record or transcode stop time",
"time_stop" },
3431 "set the limit file size in bytes",
"limit_size" },
3434 "set the start time offset",
"time_off" },
3437 "set the start time offset relative to EOF",
"time_off" },
3440 "enable/disable seeking by timestamp with -ss" },
3443 "enable/disable accurate seeking with -ss" },
3446 "set the input ts offset",
"time_off" },
3449 "set the input ts scale",
"scale" },
3451 "set the recording timestamp ('now' to set the current time)",
"time" },
3453 "add metadata",
"string=string" },
3455 "add program with specified streams",
"title=string:st=number..." },
3458 "set the number of data frames to output",
"number" },
3460 "add timings for benchmarking" },
3462 "add timings for each task" },
3464 "write program-readable progress information",
"url" },
3466 "enable or disable interaction on standard input" },
3468 "set max runtime in seconds in CPU user time",
"limit" },
3470 "dump each input packet" },
3472 "when dumping packets, also dump the payload" },
3475 "read input at native frame rate",
"" },
3477 "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\" "
3478 "with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")",
"type" },
3480 "video sync method",
"" },
3482 "frame drop threshold",
"" },
3484 "audio sync method",
"" },
3486 "audio drift threshold",
"threshold" },
3488 "copy timestamps" },
3490 "shift input timestamps to start at 0 when using copyts" },
3492 "copy input stream time base when stream copying",
"mode" },
3495 "finish encoding within shortest input" },
3503 "timestamp discontinuity delta threshold",
"threshold" },
3505 "timestamp error delta threshold",
"threshold" },
3507 "exit on error",
"error" },
3509 "abort on the specified condition flags",
"flags" },
3512 "copy initial non-keyframes" },
3514 "copy or discard frames before start time" },
3516 "set the number of frames to output",
"number" },
3519 "force codec tag/fourcc",
"fourcc/tag" },
3522 "use fixed quality scale (VBR)",
"q" },
3525 "use fixed quality scale (VBR)",
"q" },
3527 "set profile",
"profile" },
3529 "set stream filtergraph",
"filter_graph" },
3531 "number of non-complex filter threads" },
3533 "read stream filtergraph description from a file",
"filename" },
3535 "reinit filtergraph on input parameter changes",
"" },
3537 "create a complex filtergraph",
"graph_description" },
3539 "number of threads for -filter_complex" },
3541 "create a complex filtergraph",
"graph_description" },
3543 "read complex filtergraph description from a file",
"filename" },
3545 "print progress report during encoding", },
3548 "add an attachment to the output file",
"filename" },
3551 "extract an attachment into a file",
"filename" },
3553 OPT_OFFSET, { .off =
OFFSET(
loop) },
"set number of times input stream shall be looped",
"loop count" },
3555 "print timestamp debugging info" },
3557 "ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.",
"maximum error rate" },
3563 "disposition",
"" },
3565 { .off =
OFFSET(thread_queue_size) },
3566 "set the maximum number of queued packets from the demuxer" },
3568 "read and decode the streams to fill missing information with heuristics" },
3572 "set the number of video frames to output",
"number" },
3575 "set frame rate (Hz value, fraction or abbreviation)",
"rate" },
3578 "set frame size (WxH or abbreviation)",
"size" },
3581 "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)",
"aspect" },
3584 "set pixel format",
"format" },
3586 "set the number of bits per raw sample",
"number" },
3588 "deprecated use -g 1" },
3593 "rate control override for specific intervals",
"override" },
3596 "force video codec ('copy' to copy stream)",
"codec" },
3602 "set initial TimeCode value.",
"hh:mm:ss[:;.]ff" },
3604 "select the pass number (1 to 3)",
"n" },
3607 "select two pass log file name prefix",
"prefix" },
3609 "this option is deprecated, use the yadif filter instead" },
3611 "calculate PSNR of compressed frames" },
3613 "dump video coding statistics to file" },
3615 "dump video coding statistics to file",
"file" },
3617 "Version of the vstats format to use."},
3619 "set video filters",
"filter_graph" },
3622 "specify intra matrix coeffs",
"matrix" },
3625 "specify inter matrix coeffs",
"matrix" },
3628 "specify intra matrix coeffs",
"matrix" },
3631 "top=1/bottom=0/auto=-1 field first",
"" },
3634 "force video tag/fourcc",
"fourcc/tag" },
3636 "show QP histogram" },
3639 "force the selected framerate, disable the best supported framerate selection" },
3642 "set the value of an outfile streamid",
"streamIndex:value" },
3645 "force key frames at specified timestamps",
"timestamps" },
3647 "audio bitrate (please use -b:a)",
"bitrate" },
3649 "video bitrate (please use -b:v)",
"bitrate" },
3652 "use HW accelerated decoding",
"hwaccel name" },
3655 "select a device for HW acceleration",
"devicename" },
3658 "select output format used with HW accelerated decoding",
"format" },
3659 #if CONFIG_VIDEOTOOLBOX
3663 "show available HW acceleration methods" },
3666 "automatically insert correct rotate filters" },
3670 "set the number of audio frames to output",
"number" },
3672 "set audio quality (codec-specific)",
"quality", },
3675 "set audio sampling rate (in Hz)",
"rate" },
3678 "set number of audio channels",
"channels" },
3683 "force audio codec ('copy' to copy stream)",
"codec" },
3686 "force audio tag/fourcc",
"fourcc/tag" },
3688 "change audio volume (256=normal)" ,
"volume" },
3691 "set sample format",
"format" },
3694 "set channel layout",
"layout" },
3696 "set audio filters",
"filter_graph" },
3698 "set the maximum number of channels to try to guess the channel layout" },
3702 "disable subtitle" },
3704 "force subtitle codec ('copy' to copy stream)",
"codec" },
3706 ,
"force subtitle tag/fourcc",
"fourcc/tag" },
3708 "fix subtitles duration" },
3710 "set canvas size (WxH or abbreviation)",
"size" },
3714 "deprecated, use -channel",
"channel" },
3716 "deprecated, use -standard",
"standard" },
3721 "set the maximum demux-decode delay",
"seconds" },
3723 "set the initial demux-decode delay",
"seconds" },
3725 "specify a file in which to print sdp information",
"file" },
3728 "set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)",
"ratio" },
3730 "set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). "
3731 "two special values are defined - "
3732 "0 = use frame rate (video) or sample rate (audio),"
3733 "-1 = match source time base",
"ratio" },
3736 "A comma-separated list of bitstream filters",
"bitstream_filters" },
3738 "deprecated",
"audio bitstream_filters" },
3740 "deprecated",
"video bitstream_filters" },
3743 "set the audio options to the indicated preset",
"preset" },
3745 "set the video options to the indicated preset",
"preset" },
3747 "set the subtitle options to the indicated preset",
"preset" },
3749 "set options from indicated preset file",
"filename" },
3752 "maximum number of packets that can be buffered while waiting for all streams to initialize",
"packets" },
3756 "force data codec ('copy' to copy stream)",
"codec" },
3762 "set VAAPI hardware device (DRM path or X11 display name)",
"device" },
3767 "set QSV hardware device (DirectX adapter index, DRM path or X11 display name)",
"device"},
3771 "initialise hardware device",
"args" },
3773 "set hardware device used when filtering",
"device" },