It's a highly useful metric, both at runtime and when viewing logs.
Unified · Split
| @@ -555,7 +555,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti · 554 unmodified lines | |||
| 555 | static int64_t last_time = -1; | 555 | static int64_t last_time = -1; |
| 556 | static int first_report = 1; | 556 | static int first_report = 1; |
| 557 | uint64_t nb_frames_dup = 0, nb_frames_drop = 0; | 557 | uint64_t nb_frames_dup = 0, nb_frames_drop = 0; |
| 558 | int mins, secs, us; | 558 | int mins, secs, ms, us; |
| 559 | int64_t hours; | 559 | int64_t hours; |
| 560 | const char *hours_sign; | 560 | const char *hours_sign; |
| 561 | int ret; | 561 | int ret; |
| @@ -579,6 +579,16 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti · 17 unmodified lines | |||
| 579 | vid = 0; | 579 | vid = 0; |
| 580 | av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); | 580 | av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); |
| 581 | av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); | 581 | av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); |
| 582 | |||
| 583 | secs = (int)t; | ||
| 584 | ms = (int)((t - secs) * 1000); | ||
| 585 | mins = secs / 60; | ||
| 586 | secs %= 60; | ||
| 587 | hours = mins / 60; | ||
| 588 | mins %= 60; | ||
| 589 | |||
| 590 | av_bprintf(&buf, "elapsed=%"PRId64":%02d:%02d.%02d ", hours, mins, secs, ms / 10); | ||
| 591 | |||
| 582 | for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) { | 592 | for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) { |
| 583 | const float q = ost->enc ? atomic_load(&ost->quality) / (float) FF_QP2LAMBDA : -1; | 593 | const float q = ost->enc ? atomic_load(&ost->quality) / (float) FF_QP2LAMBDA : -1; |
| 584 | 594 | ||