Code Monkey home page Code Monkey logo

Comments (6)

rzeldent avatar rzeldent commented on June 12, 2024

Hi Jochen,

Thanks for reporting this. Might be an issue indeed. Looked at the code and caching from the browser should not occur.
I was thinking, can you start a stream and see if the snapshot is updated in this case?
It might be that the frame is not grabbed again...?

Rene

from esp32cam-rtsp.

rzeldent avatar rzeldent commented on June 12, 2024

Made a possible fix to grab a frame before getting the buffer:
[#](https://github.com/rzeldent/esp32cam-rtsp/tree/bugfix/snapshot_update).
Does this fixes the issue?

Regards,

Rene

from esp32cam-rtsp.

joeheaven avatar joeheaven commented on June 12, 2024

Dear Rene, Sunday morning and yet the answer and a fix comes at the speed of light. Wow, thanks very much.

Just for clarification regarding the previous behaviour: Activating the stream or not did not influence the outcome, the image was always the same.

I just checked the new version and observe the following: Getting a snapshot yields an image. Refreshing the browser with Ctrl+F5 (should reduce potential interference with cache) I get again the same picture, a second refresh then yields the new picture. So currently I would use a double cURL or so to get the real current picture. Thats already much better and manageable. But maybe not exactly the intended behaviour.

So: Thanks for a now (kind of) working solution, if you have other variants to test, please let me know.

Again: Thanks!!!!

[EDIT]: I still have the debug output within VSC open, so if you want me to grab any of that, just tell me what you need.

[EDIT2]: I just build and uploaded the new version, I did not erase before. All my settings were still there and working. Maybe that was not the optimal way? Convinient, but a possible source of error?

from esp32cam-rtsp.

rzeldent avatar rzeldent commented on June 12, 2024

Hi Jochen,

Think I found the issue and, in a way also logical/explainable. See this post from EspressIf: espressif/esp32-camera#357.

What happens is that if you use a framebuffer count > 1, the old images remain in the framebuffer and will be retrieved first. So this explains why you need to refresh multiple times (depends on frame buffer size).
The initial fix got just one framebuffer but this works only of the frame buffer count equals 1; this is not the default.
One could set the framebuffer count to 0 but this might impact the peformance.

I fixed this issue by reading the fb framebuffer count times before sending the snapshot. I gave it a quick test and this is the solution.

Please give it a test so I can merge this fix in the main!

Kind regards,

Rene

from esp32cam-rtsp.

joeheaven avatar joeheaven commented on June 12, 2024

Dear Rene,

it works perfectly as expected now! Brilliant!

Thanks very much!

Best regards,
Jochen

from esp32cam-rtsp.

rzeldent avatar rzeldent commented on June 12, 2024

Hi Jochen,

Thanks for verifying. I merged the branch!

from esp32cam-rtsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.