Opened 10 months ago

Closed 3 months ago

#10501 closed defect (fixed)

ffmpeg(1) prints 'kB' for byte values divided by 1024

Reported by: WHR Owned by:
Priority: minor Component: ffmpeg
Version: unspecified Keywords:
Cc: WHR Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by WHR)

Take the following example of a statistic output of the ffmpeg(1) command line tool:

frame=39687 fps=562 q=31.0 Lsize=  134695kB time=00:22:02.97 bitrate= 834.0kbits/s speed=18.7x    
video:119395kB audio:14442kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.641295%

All the byte values have an unit of 'kB'. Based on how it matches exactly the offical SI unit prefix symbol (lowercased 'k') and the uppercased 'B' to form unit 'kilobyte', and how the man page describes what the tool would interpreting user's numerical inputs, I has without doubt, believed it was a decimal unit prefix and the number is based on powers of 1000 (1 kB == 1000 B), for years.
Until yesterday I found the size of one of my encoded file didn't match what ffmpeg(1) reported at the end of encoding; by reading the source file ffmpeg.c, I can confirm that all output numbers with 'kB' unit there, are actually divided from original byte values by 1024 instead of 1000.
This behavior is inconsistent and could mislead users.

Change History (3)

comment:1 by WHR, 10 months ago

Description: modified (diff)

comment:2 by Balling, 10 months ago

It is kibibyte, yes. KiB.

comment:3 by Balling, 3 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.