[FFmpeg-trac] #10501(ffmpeg:new): ffmpeg(1) prints 'kB' for byte values divided by 1024
FFmpeg
trac at avcodec.org
Wed Aug 2 09:11:11 EEST 2023
#10501: ffmpeg(1) prints 'kB' for byte values divided by 1024
--------------------------------+---------------------------------------
Reporter: WHR | Type: defect
Status: new | Priority: minor
Component: ffmpeg | Version: unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+---------------------------------------
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 in there,
are actually divided from original byte values by 1024 instead of 1000.
This behavior is inconsistent and could mislead users.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10501>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list