[Ffmpeg-devel] [PATCH] Allowing (k,M,G and B) unit postfixes

Panagiotis Issaris takis.issaris
Thu Sep 14 01:12:56 CEST 2006


On do, 2006-09-14 at 00:37 +0200, Michael Niedermayer wrote:
> iam a little unsure about the upper/lowwer case and kibibit (every time i read
> about these gigibit units i somehow want to vomit ...)
Personally, I am not to fond of typing uppercase characters on the
commandline at all. And for some reason, I shiver when hearing the name
"gigi" and "kibi".

> maybe we could have lowwer case for one and upper case for the other
> or we just follow all the standard comitees and add kiB, MiB and GiB
> after all using k to mean 2 things is just wrong and theres no real standard
> which say k=1024 ...
Hmm. I think I am currently following the standards as I am using the
prefix k, M and G as meaning 1000, 1000000 and 1000000000. For the
moment I did not implement any ki, Mi or Gi support as in current FFmpeg
the unit for specifying bitrates is in powers of 10 not 2.
As in "ffmpeg -i ... -b 800 ..." means a bitrate of 800*1000 bits/s
and not 800*1024 bits/s.

I am _not_ following the standards in respect to the fact that I am
dropping the specification of the type, meaning the "b" for bits. That
was intentional, to make it shorter to type :)

So, with my current patch:
"ffmpeg -i ... -b 800000 ..." means 800000 bits/s
and is equal in meaning to:
"ffmpeg -i ... -b 800k ..." 
"ffmpeg -i ... -b 100kB ..." 

Am I correct to think that you like the current behavior, as you dislike
the kibi/gibi units? And as in my patch k=/=1024?

With friendly regards,

More information about the ffmpeg-devel mailing list