#Weird Caching behavior in chromium based browsers with MJPEG-Streamer

34 messages · Page 1 of 1 (latest)

pure spade
#

Not sure if this is a bug within how Mainsail is written or a change Chromium has made recently, but I have a IP Camera setup going to Shinobi (self-hosted DVR Server) and Mainsail pointed to that as a MJPEG-Steamer URL, the stream works perfectly fine, but recently while the tab is open in Chromium based browsers it starts flooding my cache (storage_blob folder), I had the stream open all day watching a long print, and before I closed the tab I was at 46GB of just cache, granted once the tab is closed it does flush the cache but thats still a lot of space being eaten up. I have tried this on both Windows and Linux inside of Edge, Chrome, and Chromium as well as I have noticed that Orca Slicer exhibits the same behavior as it uses Chromium to connect to the UI of the printer you have set. Connecting directly to the Shinobi stream does not have the same issue. Firefox does not appear to have the same issue either.

dark wraith
#

What service do you use?

pure spade
#

Not sure I understand your question

dark wraith
#

I mean what service did you choose in this window?

pure spade
#

MJPEG-Steamer

#

So i'm actually going to lean now on it might be a bug with Chromium because I am not seeing the cache grow past 77MB, going to wait for a bit to see and will update here if it changes : / gotta love the Mechanic shop effect I've had it happen 3 times over the past few days adn as soon as I ask about it, it wants to change its behavior.

pure spade
#

so this is after 30 mins, if I close the tab all this gets wiped

dark wraith
#

This is the C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\blob_storage folder?

pure spade
#

yep

#

I know it is related to the webcam feed because inside the browsers Dev Tools under Network I can see the stream of files being passed, and as soon as I hid the Webcam Widget or navigate to another page it stops, I can also click on the files in Dev Tools and see it as jpeg images

dark wraith
#

I'm just wondering, as I cannot reproduce it on my end

#

For me I don't get a single file into the blob_storage folder

pure spade
#

I wonder if its because I am using a separate server for the camera stream, though the stream of files in Dev Tools comes from the device I have running Mainsail and Klipper not the DVR server for my camera, though technically it should be the same as if I was running Crowsnest they are both URL based to a remote image source

#

not sure if you left yours just running but it did take about 20 mins before it started to fill up and it also stops if you minimize the tab it does not hope ever remove it until the tab is closed

dark wraith
#

K, then I let it run for a while. Can you send your crowsnest.log?

#

Or I will do it tomorrow ^^
Already late at my place

pure spade
#

so I don't have the camera running though Crowsnest its a MJPEG stream from Shinobi

#

so yeah about 8GB an hour it appears

pure spade
#

I plugged in an old webcam and started up crowsnest and i can confirm this issue does not happen when a camera is viewed via WebRTC, I have not tried a camera through Crowsnest and MJPEG just yet

dark wraith
#

I couldn't reproduce it yet on my end with crowsnest. So try to reproduce it with crowsnest and if it doesn't happen it might be something about that Shinobi setup

pure spade
#

So it may not be 100% chromium, one of the things that led me to believe that was inside of Dev Tools I could see the stream of blob files being created, one this I should have better specified is that I am using MS Edge, I am also trying it in Google Chrome and it does not appear to be exhibiting the same issue with filling up storage like Edge and Orca Slicer does even though it does show a stream of blob files in Dev tools that is my fault for not being specific on the browser, I made the mistake of assuming based on the fact two Chromium based systems where doing the same behavior, now that makes me wonder if Orca is using what ever browser is set default, I will do some more investigating and reply back if I find anything

#

so can confirm Chrome is doing the same thing it just dumped 2GB into the folder

#

Does Crowsnest have the ability to receive a MJPEG stream from an network based camera now? also I can view the Stream from Shinobi directly and it does not exabit that same behavior it only appears to be when viewing it though Mainsail

#

The main reason I have it setup through Shinobi is because it is a PTZ Wifi Camera and originally when I was trying to add the stream directly to Mainsail it would never load so I ended up using Shinobi as an intermediary

dark wraith
#

I asked about the crowsnest thing, to confirm that it's the browser and Mainsail and not maybe something weird about the stream

pure spade
#

watching the Stream directly from the same exact link I have inside of Mainsail does not reproduce the same behavior

dark wraith
#

Yes, but it might be a combination of that stream and Mainsail, that's why I asked you, if you could try to reproduce it with crowsnest.

#

I don't have Shinobi setup, so easiest for me to test would be with crowsnest.

#

With crowsnest nothing happens for me. I watched like 1 hour a 4k mjpg stream, nothing. My blobs always get cleared automatically and nothing gets written to disk for me

pure spade
#

kk, ive setup a MJPEG Stream from Crowsnest and its streaming now I'll let you know if it repeats the same behavoir

dark wraith
#

Thank you 😄

pure spade
#

also since both Chrome and Edge where doing the same behavior I have Edge watching the Crowsnest MJPEG Stream and on the Chrome side I changed the backend for the Shinobi Stream to UV4L-MJPEG was this is receieving the video stream, one thing of note is with UV4L as the service it does not appear to be streaming in Blob files like with the MJPEG Stream

#

I will reply back in an hour with my findings from both tests