72 #if HAVE_SYS_RESOURCE_H
74 #include <sys/types.h>
75 #include <sys/resource.h>
76 #elif HAVE_GETPROCESSTIMES
79 #if HAVE_GETPROCESSMEMORYINFO
85 #include <sys/select.h>
90 #include <sys/ioctl.h>
136 #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
154 static struct termios oldtty;
155 static int restore_tty;
184 uint32_t *pal, *dst2;
192 if (r->
x < 0 || r->
x + r->
w > w || r->
y < 0 || r->
y + r->
h > h) {
197 dst += r->
y * dst_linesize + r->
x * 4;
200 for (y = 0; y < r->
h; y++) {
201 dst2 = (uint32_t *)dst;
203 for (x = 0; x < r->
w; x++)
204 *(dst2++) = pal[*(src2++)];
230 int64_t pts, end_pts;
247 "Impossible to get a blank canvas.\n");
250 dst = frame->
data [0];
252 for (i = 0; i < num_rects; i++)
276 if (pts2 <= ist2->sub2video.last_pts)
280 for (j = 0, nb_reqs = 0; j < ist2->
nb_filters; j++)
303 tcsetattr (0, TCSANOW, &oldtty);
335 istty = isatty(0) && isatty(2);
337 if (istty && tcgetattr (0, &tty) == 0) {
341 tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
342 |INLCR|IGNCR|ICRNL|IXON);
343 tty.c_oflag |= OPOST;
344 tty.c_lflag &= ~(
ECHO|ECHONL|ICANON|IEXTEN);
345 tty.c_cflag &= ~(CSIZE|PARENB);
350 tcsetattr (0, TCSANOW, &tty);
377 n = select(1, &rfds, NULL, NULL, &tv);
386 # if HAVE_PEEKNAMEDPIPE
388 static HANDLE input_handle;
391 input_handle = GetStdHandle(STD_INPUT_HANDLE);
392 is_pipe = !GetConsoleMode(input_handle, &dw);
395 if (stdin->_cnt > 0) {
401 if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) {
433 printf(
"bench: maxrss=%ikB\n", maxrss);
560 printf(
"bench: %8"PRIu64
" %s \n", t -
current_time, buf);
571 ost2->
finished |= ost == ost2 ? this_stream : others;
612 memcpy(t, new_pkt.
data, new_pkt.
size);
627 av_log(NULL,
AV_LOG_ERROR,
"Failed to open bitstream filter %s for stream %d with codec %s",
645 if (pkt->
dts < max) {
647 av_log(s, loglevel,
"Non-monotonous DTS in output stream "
648 "%d:%d; previous: %"PRId64
", current: %"PRId64
"; ",
654 av_log(s, loglevel,
"changing to %"PRId64
". This may result "
655 "in incorrect timestamps in the output file.\n",
681 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s size:%d\n",
746 "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n",
762 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
776 int subtitle_out_max_size = 1024 * 1024;
777 int subtitle_out_size, nb, i;
807 for (i = 0; i < nb; i++) {
808 unsigned save_num_rects = sub->
num_rects;
825 subtitle_out_max_size, sub);
828 if (subtitle_out_size < 0) {
835 pkt.
size = subtitle_out_size;
842 pkt.
pts += 90 * sub->start_display_time;
844 pkt.
pts += 90 * sub->end_display_time;
855 int ret, format_video_sync;
860 double sync_ipts,
delta;
871 sync_ipts = in_picture->
pts;
894 switch (format_video_sync) {
896 if (ost->
frame_number == 0 && delta - duration >= 0.5) {
905 else if (delta > 1.1)
906 nb_frames =
lrintf(delta);
911 else if (delta > 0.6)
923 if (nb_frames == 0) {
926 "*** dropping frame %d from stream %d at ts %"PRId64
"\n",
929 }
else if (nb_frames > 1) {
931 av_log(NULL,
AV_LOG_ERROR,
"%d frame duplication too large, skipping\n", nb_frames - 1);
940 for (i = 0; i < nb_frames; i++) {
972 int got_packet, forced_keyframe = 0;
1002 av_dlog(NULL,
"force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n",
1010 forced_keyframe = 1;
1021 if (forced_keyframe) {
1029 "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n",
1046 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
1058 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
1063 frame_size = pkt.
size;
1087 return -10.0 * log(d) / log(10.0);
1094 double ti1, bitrate, avg_bitrate;
1119 avg_bitrate = (double)(ost->
data_size * 8) / ti1 / 1000.0;
1120 fprintf(
vstats_file,
"s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
1121 (
double)ost->
data_size / 1024, ti1, bitrate, avg_bitrate);
1147 AVFrame *filtered_frame = NULL;
1174 "Error in av_buffersink_get_frame_flags(): %s\n",
av_err2str(ret));
1185 filtered_frame->
pts = frame_pts =
1194 filtered_frame->
pts = frame_pts;
1207 filtered_frame->
pts = frame_pts;
1211 "Audio filter graph output is not normalized and encoder does not support parameter changes\n");
1230 uint64_t video_size = 0, audio_size = 0, extra_size = 0, other_size = 0;
1231 uint64_t subtitle_size = 0;
1232 uint64_t data_size = 0;
1233 float percent = -1.0;
1242 default: other_size += ost->
data_size;
break;
1248 if (data_size && total_size>0 && total_size >= data_size)
1249 percent = 100.0 * (total_size - data_size) / data_size;
1252 av_log(NULL,
AV_LOG_INFO,
"video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB global headers:%1.0fkB muxing overhead: ",
1253 video_size / 1024.0,
1254 audio_size / 1024.0,
1255 subtitle_size / 1024.0,
1256 other_size / 1024.0,
1257 extra_size / 1024.0);
1267 uint64_t total_packets = 0, total_size = 0;
1296 total_packets, total_size);
1301 uint64_t total_packets = 0, total_size = 0;
1330 total_packets, total_size);
1332 if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){
1333 av_log(NULL,
AV_LOG_WARNING,
"Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n");
1345 int frame_number, vid, i;
1347 int64_t pts = INT64_MIN;
1348 static int64_t last_time = -1;
1349 static int qp_histogram[52];
1350 int hours, mins, secs, us;
1352 if (!
print_stats && !is_last_report && !progress_avio)
1355 if (!is_last_report) {
1356 if (last_time == -1) {
1360 if ((cur_time - last_time) < 500000)
1366 oc = output_files[0]->
ctx;
1369 if (total_size <= 0)
1377 ost = output_streams[i];
1382 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"q=%2.1f ", q);
1383 av_bprintf(&buf_script,
"stream_%d_%d_q=%.1f\n",
1387 float fps, t = (cur_time-timer_start) / 1000000.0;
1390 fps = t > 1 ? frame_number / t : 0;
1391 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"frame=%5d fps=%3.*f q=%3.1f ",
1392 frame_number, fps < 9.95, fps, q);
1393 av_bprintf(&buf_script,
"frame=%d\n", frame_number);
1395 av_bprintf(&buf_script,
"stream_%d_%d_q=%.1f\n",
1398 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"L");
1404 for (j = 0; j < 32; j++)
1405 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"%X", (
int)
lrintf(
log2(qp_histogram[j] + 1)));
1409 double error, error_sum = 0;
1410 double scale, scale_sum = 0;
1412 char type[3] = {
'Y',
'U',
'V' };
1413 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"PSNR=");
1414 for (j = 0; j < 3; j++) {
1415 if (is_last_report) {
1416 error = enc->
error[j];
1417 scale = enc->
width * enc->
height * 255.0 * 255.0 * frame_number;
1426 p =
psnr(error / scale);
1427 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"%c:%2.2f ", type[j], p);
1428 av_bprintf(&buf_script,
"stream_%d_%d_psnr_%c=%2.2f\n",
1431 p =
psnr(error_sum / scale_sum);
1432 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
"*:%2.2f ",
psnr(error_sum / scale_sum));
1433 av_bprintf(&buf_script,
"stream_%d_%d_psnr_all=%2.2f\n",
1451 bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1;
1453 if (total_size < 0)
snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1455 else snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1456 "size=%8.0fkB time=", total_size / 1024.0);
1457 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1458 "%02d:%02d:%02d.%02d ", hours, mins, secs,
1460 if (bitrate < 0)
snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1462 else snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
1463 "bitrate=%6.1fkbits/s", bitrate);
1464 if (total_size < 0)
av_bprintf(&buf_script,
"total_size=N/A\n");
1465 else av_bprintf(&buf_script,
"total_size=%"PRId64
"\n", total_size);
1466 av_bprintf(&buf_script,
"out_time_ms=%"PRId64
"\n", pts);
1467 av_bprintf(&buf_script,
"out_time=%02d:%02d:%02d.%06d\n",
1468 hours, mins, secs, us);
1471 snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
" dup=%d drop=%d",
1478 fprintf(stderr,
"%s \r", buf);
1485 if (progress_avio) {
1487 is_last_report ?
"end" :
"continue");
1489 FFMIN(buf_script.len, buf_script.size - 1));
1492 if (is_last_report) {
1494 progress_avio = NULL;
1510 int stop_encoding = 0;
1546 ret = encode(enc, &pkt, NULL, &got_packet);
1564 pkt_size = pkt.
size;
1652 opkt.
dts -= ost_tb_start_time;
1673 &opkt.data, &opkt.size,
1688 avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
1702 char layout_name[256];
1721 int i,
ret, err = 0, resample_changed;
1739 if (*got_output || ret<0 || pkt->
size)
1742 if (!*got_output || ret < 0) {
1770 if (resample_changed) {
1771 char layout1[64], layout2[64];
1775 "layout for Input Stream #%d.%d\n", ist->
file_index,
1787 "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d chl:%s to rate:%d fmt:%s ch:%d chl:%s\n",
1826 decoded_frame->
pts = pkt->
pts;
1829 decoded_frame->
pts = ist->
dts;
1837 for (i = 0; i < ist->nb_filters; i++) {
1838 if (i < ist->nb_filters - 1) {
1839 f = ist->filter_frame;
1856 return err < 0 ? err :
ret;
1862 int i,
ret = 0, err = 0, resample_changed;
1863 int64_t best_effort_timestamp;
1875 decoded_frame, got_output, pkt);
1886 "has_b_frames is larger in decoder than demuxer %d > %d ",
1892 if (*got_output || ret<0 || pkt->
size)
1895 if (!*got_output || ret < 0) {
1925 "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64
" best_effort_ts_time:%s keyframe:%d frame_type:%d time_base:%d/%d\n",
1928 best_effort_timestamp,
1942 if (resample_changed) {
1944 "Input stream #%d:%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n",
1964 if (!frame_sample_aspect->
num)
1967 if (i < ist->nb_filters - 1) {
1977 }
else if (ret < 0) {
1979 "Failed to inject frame into filter network: %s\n",
av_err2str(ret));
1987 return err < 0 ? err :
ret;
1994 &subtitle, got_output, pkt);
1996 if (*got_output || ret<0 || pkt->
size)
1999 if (ret < 0 || !*got_output) {
2010 if (end < ist->prev_sub.subtitle.end_display_time) {
2012 "Subtitle duration reduced from %d to %d%s\n",
2014 end <= 0 ?
", dropping it" :
"");
2099 "Multiple frames in a packet from stream %d\n", pkt->
stream_index);
2150 if (got_output && !pkt)
2202 avc[i] = output_files[i]->ctx;
2205 printf(
"SDP:\n%s\n", sdp);
2214 if (
hwaccels[i].pix_fmt == pix_fmt)
2225 for (p = pix_fmts; *p != -1; p++) {
2238 ret = hwaccel->
init(s);
2242 "%s hwaccel requested for input stream #%d:%d, "
2243 "but cannot be initialized.\n", hwaccel->
name,
2275 snprintf(error, error_len,
"Decoder (codec %s) not found for input stream #%d:%d",
2296 "Error while opening decoder for input stream "
2319 int64_t va = *(int64_t *)a, vb = *(int64_t *)
b;
2320 return va < vb ? -1 : va > vb ? +1 : 0;
2330 for (p = kf; *p; p++)
2341 for (i = 0; i <
n; i++) {
2342 char *next = strchr(p,
',');
2347 if (!memcmp(p,
"chapters", 8)) {
2356 "Could not allocate forced key frames array.\n");
2388 InputFile *file = input_files[input_index];
2394 "New %s stream %d:%d at pos:%"PRId64
" and DTS:%ss\n",
2406 int encoder_string_len;
2407 int format_flags = 0;
2429 encoder_string =
av_mallocz(encoder_string_len);
2430 if (!encoder_string)
2436 av_strlcpy(encoder_string,
"Lavc ", encoder_string_len);
2444 int ret = 0, i, j, k;
2460 if (fg->
inputs[0]->
ist == input_streams[k])
2476 oc = output_files[i]->
ctx;
2493 ost = output_streams[i];
2521 uint64_t extra_size;
2527 if (extra_size > INT_MAX) {
2536 unsigned int codec_tag;
2583 if( copy_tb<0 && dec_ctx->time_base.den
2611 av_log(NULL,
AV_LOG_FATAL,
"-acodec copy and -vol are incompatible (frames are not decoded)\n");
2636 "with stream copy may produce invalid files\n");
2660 snprintf(error,
sizeof(error),
"Encoder (codec %s) not found for output stream #%d:%d",
2694 "about the input framerate is available. Falling "
2695 "back to a default value of 25fps for output stream #%d:%d. Use the -r option "
2696 "if you want a different framerate.\n",
2710 switch (enc_ctx->codec_type) {
2716 enc_ctx->time_base = (
AVRational){ 1, enc_ctx->sample_rate };
2720 if (ost->
filter && !(enc_ctx->time_base.num && enc_ctx->time_base.den))
2725 "Please consider specifying a lower framerate, a different muxer or -vsync 2\n");
2730 enc_ctx->time_base);
2738 if (!strncmp(ost->
enc->
name,
"libx264", 7) &&
2742 "No pixel format specified, %s for H.264 encoding chosen.\n"
2743 "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
2745 if (!strncmp(ost->
enc->
name,
"mpeg2video", 10) &&
2749 "No pixel format specified, %s for MPEG-2 encoding chosen.\n"
2750 "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
2783 if (!enc_ctx->width) {
2797 snprintf(logfilename,
sizeof(logfilename),
"%s-%d.log",
2801 if (!strcmp(ost->
enc->
name,
"libx264")) {
2806 size_t logbuffer_size;
2812 enc_ctx->stats_in = logbuffer;
2818 logfilename, strerror(errno));
2830 ost = output_streams[i];
2831 if (ost->encoding_needed) {
2840 if (!ost->enc_ctx->subtitle_header) {
2847 if (!
av_dict_get(ost->encoder_opts,
"threads", NULL, 0))
2848 av_dict_set(&ost->encoder_opts,
"threads",
"auto", 0);
2849 av_dict_set(&ost->encoder_opts,
"side_data_only_packets",
"1", 0);
2854 snprintf(error,
sizeof(error),
"Error while opening encoder for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, width or height",
2855 ost->file_index, ost->index);
2861 ost->enc_ctx->frame_size);
2863 if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000)
2865 " It takes bits/s as argument, not kbits/s\n");
2869 "Error setting up codec context options.\n");
2877 "Error initializing the output stream codec context.\n");
2880 ost->st->codec->codec= ost->enc_ctx->codec;
2890 ost = output_streams[i];
2914 oc = output_files[i]->
ctx;
2918 "Could not write header for output file #%d "
2919 "(incorrect codec parameters ?): %s",
2925 if (strcmp(oc->oformat->name,
"rtp")) {
2934 av_dump_format(output_files[i]->ctx, i, output_files[i]->ctx->filename, 1);
2940 ist = input_streams[i];
2942 for (j = 0; j < ist->nb_filters; j++) {
2943 if (ist->filters[j]->graph->graph_desc) {
2945 ist->file_index, ist->st->index, ist->dec ? ist->dec->name :
"?",
2946 ist->filters[j]->name);
2955 ost = output_streams[i];
2957 if (ost->attachment_filename) {
2960 ost->attachment_filename, ost->file_index, ost->index);
2964 if (ost->filter && ost->filter->graph->graph_desc) {
2971 ost->index, ost->enc ? ost->enc->name :
"?");
2976 input_streams[ost->source_index]->
file_index,
2977 input_streams[ost->source_index]->
st->
index,
2980 if (ost->sync_ist != input_streams[ost->source_index])
2982 ost->sync_ist->file_index,
2983 ost->sync_ist->st->index);
2984 if (ost->stream_copy)
2987 const AVCodec *in_codec = input_streams[ost->source_index]->
dec;
2988 const AVCodec *out_codec = ost->enc;
2989 const char *decoder_name =
"?";
2990 const char *in_codec_name =
"?";
2991 const char *encoder_name =
"?";
2992 const char *out_codec_name =
"?";
2995 decoder_name = in_codec->
name;
2997 if (!strcmp(decoder_name, in_codec_name))
2998 decoder_name =
"native";
3002 encoder_name = out_codec->
name;
3004 if (!strcmp(encoder_name, out_codec_name))
3005 encoder_name =
"native";
3009 in_codec_name, decoder_name,
3010 out_codec_name, encoder_name);
3063 int64_t opts_min = INT64_MAX;
3081 static int64_t last_time;
3104 if (key ==
'c' || key ==
'C'){
3108 fprintf(stderr,
"\nEnter command: <target>|all <time>|-1 <command>[ <argument>]\n");
3110 while ((k =
read_key()) !=
'\n' && k !=
'\r' && i <
sizeof(buf)-1)
3115 (n = sscanf(buf,
"%63[^ ] %lf %255[^ ] %255[^\n]", target, &time, command, arg)) >= 3) {
3117 target, time, command, arg);
3124 fprintf(stderr,
"Command reply for stream %d: ret:%d res:\n%s", i, ret, buf);
3125 }
else if (key ==
'c') {
3126 fprintf(stderr,
"Queing commands only on filters supporting the specific command is unsupported\n");
3135 "Parse error, at least 3 arguments were expected, "
3136 "only %d given in string '%s'\n", n, buf);
3139 if (key ==
'd' || key ==
'D'){
3143 if(!debug) debug = 1;
3147 if(scanf(
"%d", &debug)!=1)
3148 fprintf(stderr,
"error parsing debug value\n");
3157 fprintf(stderr,
"debug=%d\n", debug);
3160 fprintf(stderr,
"key function\n"
3161 "? show this help\n"
3162 "+ increase verbosity\n"
3163 "- decrease verbosity\n"
3164 "c Send command to first matching filter supporting it\n"
3165 "C Send/Que command to all matching filters\n"
3166 "D cycle through available debug modes\n"
3167 "h dump packets/hex press to cycle through the 3 states\n"
3169 "s Show QP histogram\n"
3176 static void *input_thread(
void *
arg)
3198 "Unable to send packet to main thread: %s\n",
3217 if (!f->in_thread_queue)
3229 static int init_input_threads(
void)
3233 if (nb_input_files == 1)
3241 f->non_blocking = 1;
3248 av_log(NULL,
AV_LOG_ERROR,
"pthread_create failed: %s. Try to increase `ulimit -v` or decrease `ulimit -s`.\n", strerror(ret));
3278 if (nb_input_files > 1)
3279 return get_input_packet_mt(f, pkt);
3288 if (output_streams[i]->unavailable)
3297 input_files[i]->eagain = 0;
3299 output_streams[i]->unavailable = 0;
3311 InputFile *ifile = input_files[file_index];
3332 ist = input_streams[ifile->
ist_index + i];
3363 goto discard_packet;
3372 goto discard_packet;
3376 "next_dts:%s next_dts_time:%s next_pts:%s next_pts_time:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s off:%s off_time:%s\n",
3387 int64_t stime, stime2;
3394 int64_t new_start_time = INT64_MAX;
3436 memcpy(dst_data, src_sd->
data, src_sd->
size);
3458 "Inter stream timestamp discontinuity %"PRId64
", new offset= %"PRId64
"\n",
3477 "timestamp discontinuity %"PRId64
", new offset= %"PRId64
"\n",
3505 av_log(NULL,
AV_LOG_INFO,
"demuxer+ffmpeg -> ist_index:%d type:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s off:%s off_time:%s\n",
3539 int nb_requests, nb_requests_max = 0;
3557 for (i = 0; i < graph->
nb_inputs; i++) {
3558 ifilter = graph->
inputs[i];
3564 if (nb_requests > nb_requests_max) {
3565 nb_requests_max = nb_requests;
3630 int64_t timer_start;
3643 if ((ret = init_input_threads()) < 0)
3679 ist = input_streams[i];
3690 os = output_files[i]->
ctx;
3699 ost = output_streams[i];
3707 ist = input_streams[i];
3723 if (output_streams) {
3725 ost = output_streams[i];
3746 struct rusage rusage;
3748 getrusage(RUSAGE_SELF, &rusage);
3749 return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
3750 #elif HAVE_GETPROCESSTIMES
3752 FILETIME
c, e, k,
u;
3753 proc = GetCurrentProcess();
3754 GetProcessTimes(proc, &c, &e, &k, &u);
3755 return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
3763 #if HAVE_GETRUSAGE && HAVE_STRUCT_RUSAGE_RU_MAXRSS
3764 struct rusage rusage;
3765 getrusage(RUSAGE_SELF, &rusage);
3766 return (int64_t)rusage.ru_maxrss * 1024;
3767 #elif HAVE_GETPROCESSMEMORYINFO
3769 PROCESS_MEMORY_COUNTERS memcounters;
3770 proc = GetCurrentProcess();
3771 memcounters.cb =
sizeof(memcounters);
3772 GetProcessMemoryInfo(proc, &memcounters,
sizeof(memcounters));
3773 return memcounters.PeakPagefileUsage;
3790 setvbuf(stderr,NULL,_IONBF,0);
3795 if(argc>1 && !strcmp(argv[1],
"-d")){
3819 if (nb_output_files <= 0 && nb_input_files == 0) {
3826 if (nb_output_files <= 0) {
3841 printf(
"bench: utime=%0.3fs\n", ti / 1000000.0);
3843 av_log(NULL,
AV_LOG_DEBUG,
"%"PRIu64
" frames successfully decoded, %"PRIu64
" decoding errors\n",