ETA, hidebanner, max_muxing_queue_size
This commit is contained in:
parent
3999157199
commit
c05904cc3e
|
@ -71,7 +71,7 @@ AVDictionary *format_opts, *codec_opts, *resample_opts;
|
|||
|
||||
static FILE *report_file;
|
||||
static int report_file_level = AV_LOG_DEBUG;
|
||||
int hide_banner = 0;
|
||||
int hide_banner = 1;
|
||||
|
||||
enum show_muxdemuxers {
|
||||
SHOW_DEFAULT,
|
||||
|
|
|
@ -158,6 +158,8 @@ int nb_output_files = 0;
|
|||
FilterGraph **filtergraphs;
|
||||
int nb_filtergraphs;
|
||||
|
||||
int64_t max_frames_hint = -1;
|
||||
|
||||
#if HAVE_TERMIOS_H
|
||||
|
||||
/* init terminal so that we can grab keys */
|
||||
|
@ -1872,13 +1874,31 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
|
|||
av_bprintf(&buf_script, "drop_frames=%d\n", nb_frames_drop);
|
||||
|
||||
if (speed < 0) {
|
||||
av_bprintf(&buf, " speed=N/A");
|
||||
av_bprintf(&buf, " speed=N/A ");
|
||||
av_bprintf(&buf_script, "speed=N/A\n");
|
||||
} else {
|
||||
av_bprintf(&buf, " speed=%4.3gx", speed);
|
||||
av_bprintf(&buf, " speed=%4.3gx ", speed);
|
||||
av_bprintf(&buf_script, "speed=%4.3gx\n", speed);
|
||||
}
|
||||
|
||||
float fps;
|
||||
|
||||
//get fps
|
||||
fps = t > 1 ? frame_number / t : -1;
|
||||
if (fps <= 0 || max_frames_hint < 0) {
|
||||
av_bprintf(&buf, "ETA=N/A");
|
||||
} else {
|
||||
//get remaining frames
|
||||
int64_t remaining_frames = max_frames_hint - frame_number;
|
||||
secs = remaining_frames / fps;
|
||||
mins = secs / 60;
|
||||
secs %= 60;
|
||||
hours = mins / 60;
|
||||
mins %= 60;
|
||||
|
||||
av_bprintf(&buf, "Remaining=%"PRId64" ETA=%02d:%02d:%02d", remaining_frames, hours, mins, secs);
|
||||
}
|
||||
|
||||
if (print_stats || is_last_report) {
|
||||
const char end = is_last_report ? '\n' : '\r';
|
||||
if (print_stats==1 && AV_LOG_INFO > av_log_get_level()) {
|
||||
|
@ -4958,7 +4978,7 @@ int main(int argc, char **argv)
|
|||
|
||||
register_exit(ffmpeg_cleanup);
|
||||
|
||||
setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */
|
||||
setvbuf(stderr, NULL,_IONBF,0); /* win32 runtime needs this */
|
||||
|
||||
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
||||
parse_loglevel(argc, argv, options);
|
||||
|
@ -4982,6 +5002,10 @@ int main(int argc, char **argv)
|
|||
if (ret < 0)
|
||||
exit_program(1);
|
||||
|
||||
//get env
|
||||
const char* hint = getenv("MAXFRAMES");
|
||||
max_frames_hint = hint != NULL ? strtoll(hint, NULL, 10) : -1;
|
||||
|
||||
if (nb_output_files <= 0 && nb_input_files == 0) {
|
||||
show_usage();
|
||||
av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name);
|
||||
|
|
|
@ -1569,7 +1569,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
|||
MATCH_PER_STREAM_OPT(disposition, str, ost->disposition, oc, st);
|
||||
ost->disposition = av_strdup(ost->disposition);
|
||||
|
||||
ost->max_muxing_queue_size = 128;
|
||||
ost->max_muxing_queue_size = 1024;
|
||||
MATCH_PER_STREAM_OPT(max_muxing_queue_size, i, ost->max_muxing_queue_size, oc, st);
|
||||
ost->max_muxing_queue_size *= sizeof(AVPacket);
|
||||
|
||||
|
|
Loading…
Reference in New Issue