Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latency #33

Open
EmbeddedSam opened this issue Jul 15, 2015 · 3 comments
Open

Latency #33

EmbeddedSam opened this issue Jul 15, 2015 · 3 comments

Comments

@EmbeddedSam
Copy link

What kind of latency could one expect from this module from camera to display <100ms? I am really looking for something which is around 720p with <10ms latency but I think this might be pi in the sky.

@philn
Copy link
Contributor

philn commented Jul 15, 2015

See also #31

@thaytan
Copy link
Owner

thaytan commented Jul 18, 2015

The maximum framerate at 720p is 49fps, which gives a minimum frame duration of around 20ms, but that may not be the lower bound on latency - I'm not sure. The capture+encode may be able to happen faster or slower - depending on camera exposure time, or it may be fixed to that 20ms lower bound at 720p.

The encoder doesn't have a 'zerolatency' mode like x264 does - it only outputs completed encoded buffers, so the minimum latency does have a lower bound based on camera exposure and encoding time.

Beyond that, of course, there's whatever transmission and receiver delay. In my experience, most of the latency is in the transmission and whatever the receiver has configured as a receive buffer.

Based on a quick and possibly misleading test, regardless of framerate I am seeing a fairly consistent 40-50ms latency between the capture timestamp reported by MMAL and the time at which it hands over the encoded buffer. That value may be due to the exposure time of the camera in the scene I tested.

@alexanderhupfer
Copy link

I have seen that there is a YUV version of raspivid (RaspiVidYUV). Would it be possible to reduce the latency by using the YUV stream and encode with zerolatency-x264 afterwards?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants