[MEncoder-users] V210 Codec

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Feb 18 18:02:28 CET 2009


Hello,

Please do not quote parts you do not directly reply to.

On Wed, Feb 18, 2009 at 08:29:48AM -0800, Larry Reznick wrote:
> the resulting file is 1,829,939,518 bytes long with 1752 frames. Its 
> YUV4MPEG2 header shows:
> 
> $ head -1 spirit_720p.y4m
> YUV4MPEG2 W1280 H544 F12570329:524288 Ip A1:1

Either you used an old MPlayer version or something is wrong with your
source file. -fps 24000/1001 results in a file with "F6285171:262144"
for me.

> That fraction is bizarre. Obviously, the denominator is binary based, 
> but why use that one?

Because it is the one that still fits in 32 bits and represents the
value of the single-precision floating-point value that MPlayer had
stored as fps most closely.

> Mathematically, this fraction works out to 
> 23.97599983 instead of 23.976. In fact, 23.976 should have been 
> expressed as 2997/125.

23.976 is a rounded value for display, not exact.

> However, one could argue that the rate is 
> supposed to be 24000/1001, which is 23.976023976 (repeating the last six 
> digits). Thus, while 23.976 is theoretically inaccurate enough, the 
> bizarre fraction MPlayer comes up with causes even more error.

Well, it's not the one I get, mine corresponds to
23.97602462768554687500.
Nevertheless, since the calculation method was already changed in
mencoder I saw no fault in using the same in that code, which works for
all common frame rates (though I notice it might cause issues for frame
rates < 0), e.g. I now get F24000:1001



More information about the MEncoder-users mailing list