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

Frames look jaggy #38

Open
ThomasVuNguyen opened this issue Feb 10, 2024 · 1 comment
Open

Frames look jaggy #38

ThomasVuNguyen opened this issue Feb 10, 2024 · 1 comment

Comments

@ThomasVuNguyen
Copy link

I dont think the frame rate matches my camera stream. Is there a way to designate frame rate?

@cybrox
Copy link
Contributor

cybrox commented Feb 12, 2024

There's no way to designate frame rate in this library.

MJPEG works by opening an HTTP connection to the server, which will be kept open by the server while it sends JPEGs separated by a delimiter string.

The rate at which new images are sent depends entirely on the server. This library simply redraws the image every time a new one has been received. Some devices allow you to pass a query parameter like ?fps=10 in the MJPEG URL but that's specific to your streaming server.

The best you can do is compare the MJPEG stream in Flutter to an MJPEG stream in your browser and see if they are similar. If not, it's most likely the network connection between your mobile device and the server that slows things down.

Since MJPEG is not aware of similarities between images and does not support any form of delta-compressing, every frame is a full JPEG image, which results in very high bandwidth. So it's not uncommon to run into issues especially on wireless networks when using somewhat high resolution (Full-HD and above) or somewhat high framerate (20 and above)

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

2 participants