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; speed = t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1;
if (total_size < 0) av_bprintf(&buf, "size=N/A time="); 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) { if (pts == AV_NOPTS_VALUE) {
av_bprintf(&buf, "N/A "); av_bprintf(&buf, "N/A ");
} else { } else {
@ -4689,11 +4693,11 @@ static int transcode(void)
break; break;
if(kbinteractionresult == 1) { //pause if(kbinteractionresult == 1) { //pause
fprintf(stderr, "Paused\r"); fprintf(stderr, "Paused\r");
//wait for key //wait for key
getchar(); getchar();
fprintf(stderr, "Unpaused\n"); fprintf(stderr, "Unpaused\r");
} }
} }

7
notes
View File

@ -1,5 +1,8 @@
notes: notes:
ffmpeg.c: ffmpeg.c:
key scanning: 3905 key scanning: 3905
mainloop: 4656 mainloop: 4656
added: 4685 transcode_init: 3667
pause added: 4685
print size adj.: 1773