6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11621
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Framerates slightly fast - NOW FIXED!

Mon Feb 09, 2015 12:31 pm

The Pi camera runs slightly fast - somewhere between 0.1 and 1.5% depending on mode. So asking for 30fps actually results in something a smidge faster.

This is a heads up for those who have hacked their systems to compensate for this: I should be fixing this in the next week or so, at which point your hacks will produce odd results. I will post again when it is done.

The best approach is actually to use the timestamps that the GPU provides on each frame, but I know that doesn't work if you're working with a presaved H264 elementary stream from raspivid. There is a workaround for raspivid described at http://www.raspberrypi.org/forums/viewt ... 13#p684870 for those who want to experiment with it (and thanks to ethanol100 for his efforts there).
Last edited by 6by9 on Thu Feb 26, 2015 6:17 pm, edited 1 time in total.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

RecDev
Posts: 5
Joined: Wed Jan 28, 2015 11:56 am

Re: Framerates slightly fast - this will be fixed soon!

Mon Feb 09, 2015 12:57 pm

Will this be a fix in raspivid or a (firmware?) update that will also automatically apply to other ways to access the camera, such as the picamera python library?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11621
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Framerates slightly fast - this will be fixed soon!

Mon Feb 09, 2015 1:06 pm

RecDev wrote:Will this be a fix in raspivid or a (firmware?) update that will also automatically apply to other ways to access the camera, such as the picamera python library?
Firmware, so will fix it for all apps.

There will still be a small error due to the way that the framerate control is implemented on the sensor, but it should be <0.1%, and of course I can't compensate for any error in the oscillator frequency. Using the timestamps would therefore still be recommended if you really need accurate timing.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11621
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Framerates slightly fast - this will be fixed soon!

Sat Feb 21, 2015 3:30 pm

Back to the top - I have changes that all seem to be working with framerate accuracy better than 0.07% for all modes tested.

I will be pushing those changes to the Dom this weekend, so they will probably be released this week. Anyone still relying on any userland corrections to framerates needs to be aware.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11621
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Framerates slightly fast - NOW FIXED!

Thu Feb 26, 2015 5:33 pm

Dom has just released the firmware update which corrects the line lengths. All framerates should now be closer to the requested value.

If you've compensated for the incorrect frame rate elsewhere in your system, that will be giving erroneous results.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”