Daniel_L
Posts: 5
Joined: Fri Nov 29, 2013 9:23 am

Lag and choppiness when using other resolution than 1080p30

Sun Jan 19, 2014 2:36 pm

I have been playing around with my RPi for a few months and among other things been trying to stream video over WiFi between two Pis. But my network speed is at the limit of what I need for 1080p30 as the native resolution seems to be. (I get around 20-25 Mbit/s, which is just above the 17 Mbit/s that native resolution video gives. Why I cannot improve that is a different question.)

So, the first idea is naturally to reduce resolution, bitrate, compression quality etc to reduce bandwidth needs. But as soon as I change any of the usable parameters I see a noticeable lag and choppiness in the streamed video, and I do not understand why. Of course there is a noticable lag (a few tenths of a second) also at native 1080p30, but I do not see why it would increase if I use 720p60 or 640p90 which are resolutions that are supported by the camera sensor (at least according to the specs from Omnivision). Sometimes if introduces several seconds of lag, and occasional freezes of up to 10s of seconds. This is clear even if I go to wired network.

My only assumption so far is that when telling e.g. raspivid to use any of these resolutions, it does actually to pass this along to the camera but handles it all in the RPi GPU(?) The only logical reason for this would be that when implementing the driver for the camera the only resolution supported was 1080p30(?).
The camera itself will not introduce lag at other supported resolutions, I know that from working with cameras in other implementations.

Is there something I am missing or misunderstanding? Please help or correct if you have any ideas, this is really annoying for my project. Thanks

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Lag and choppiness when using other resolution than 1080

Sun Jan 19, 2014 3:29 pm

Do you get the same laggy behaviour when both Pis are using Ethernet connections??

Is the CPU load high on both Pis??

Try viewing the Pi Cam using a Windows PC with VLC perhaps omxplayer doesn't play nicely with video frame rates over 30fps.

Richard S.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32391
Joined: Sat Jul 30, 2011 7:41 pm

Re: Lag and choppiness when using other resolution than 1080

Sun Jan 19, 2014 5:47 pm

Note that the 60 and 90 fps modes are not yet working, so you will be using p30 as the max fps whatever the resolution. In fact you will be using exactly the same mode, 1080p30, but scaled to your requirements.

I have not idea why it would be more choppy - the scale takes no CPU, it's all done in HW, so there should be no difference.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

Return to “Camera board”