silvanmelchior / RPi_Cam_Web_Interface

A web interface for the RPi Cam
MIT License
1.52k stars 489 forks source link

Why I set the 1080p resoltion, it seems not like that high? #670

Open edwardchang0112 opened 2 years ago

edwardchang0112 commented 2 years ago

Here is the source streaming 289731994_453145829974434_9196367508488598690_n

And the streaming at the destination 289517113_3203606736547078_3704865279508174399_n

It seems not at the same resolution, any comments on this?

roberttidey commented 2 years ago

When you set the resolution under camera settings then you are setting what the camera captures at. This resolution is used directly for videos and images captured to files.

The web interfaces streams a preview of this data which is converted from the raw camera resolution. This allows for a lower network bandwidth if required.

You can control the quality of the conversion using the preview settings (under camera settings.

The width will determine how the resolution is converted. So if it is set to say 512 then that will be the horizontal resolution and the vertical will be that needed to keep the aspect ratio. If you set the width to be the same as the raw width then the original resolution is kept.

The quality determines the level of jpeg compression used in the stream. This can be set low to keep bandwidth low but with some fuzziness or high to avoid any image degradation.

The divider determines the preview frame rate relative to the original frame rate. 1 will keep frame rate the same, 2 will halve the frame rate etc. Again this allows trading of bandwidth for smoothness of the video when there is movement.