sizeoutput in mB

This commit is contained in:
mrbesen 2019-10-07 17:08:04 +02:00
parent 069ec5af69
commit e0eed46bfc
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 13 additions and 6 deletions

View File

@ -1769,7 +1769,11 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
speed = t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1;
if (total_size < 0) av_bprintf(&buf, "size=N/A time=");
else av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0);
else {
int64_t shifted = total_size >> 20; //calculate mB
if(shifted > 25) av_bprintf(&buf, "size=%"PRId64"mB time=", shifted);
else av_bprintf(&buf, "size=%"PRId64"kB time=", total_size >> 10);
}
if (pts == AV_NOPTS_VALUE) {
av_bprintf(&buf, "N/A ");
} else {
@ -4693,7 +4697,7 @@ static int transcode(void)
//wait for key
getchar();
fprintf(stderr, "Unpaused\n");
fprintf(stderr, "Unpaused\r");
}
}

5
notes
View File

@ -2,4 +2,7 @@ notes:
ffmpeg.c:
key scanning: 3905
mainloop: 4656
added: 4685
transcode_init: 3667
pause added: 4685
print size adj.: 1773