Webserver picture limit

Posted on
Sun Jul 25, 2021 12:19 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Webserver picture limit

I recently upgraded my security camera watching the driveway from a 1080 to a 4K because the 1080 could not always resolve the license plate numbers... The ubiquiti software that I have monitoring all the cameras handles both resolutions and has a command option allowing me to grab a real time snapshot and display it as a refreshing URL or using a python action script to create a JPG in the documents folder. The action script is triggered whenever the magnetic driveway sensor trips, saves the current picture and pushes back the prior 8 to give me the last 9 images catching vehicles coming and going. At 1080, this worked fine, and after the camera was upgraded, the URLs that query the camera API in real time continue to work fine. If I pull up the control page with the 9 small images or the individual control pages with the full screen image for editing on the server, those also load fine. But in the web browser, i get
Code: Select all
file:///Users/*****/Documents/DrivewayFolder/Driveway0.jpg size too large: received 870455 / max 768000

in the log and no image. copying other camera images using the same script shows that the 1080 jpgs are roughly 280,000... I have no options in the Ubiquity download; it's just IP/API/Snapshot/Camera=?APIKEY=
And since the images do appear when that same URL downloads them directly, it's not any kind of a system limitation, so is there any reason for the limitation, or alternatively, does anyone know of a python lib that could squeeze the 4k images by 15% or so?

Posted on
Sun Jul 25, 2021 1:57 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Webserver picture limit

In the next release (2021.1.1) I've doubled the maximum refreshing image allowed to 1.5M which should avoid the problem for your use case.

Image

Posted on
Mon Aug 23, 2021 9:19 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Webserver picture limit

matt (support) wrote:
In the next release (2021.1.1) I've doubled the maximum refreshing image allowed to 1.5M which should avoid the problem for your use case.


I think you may have missed something; I upgraded to 2021.1.1 from 7.5 on Saturday, and on the Server with the client running locally, it worked perfectly using the Safari browser... but this morning when I attempted to pull the images up on either chrome through the reflector or through Touch on an iPhone or iPad, the log reports the same "File too large" error except now the max size is listed as 486400., down from the 768000 it was in 7.5.

Posted on
Mon Aug 23, 2021 11:32 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Webserver picture limit

There are different restrictions for non-reflector vs. reflector connections. I am only able to raise the limit on non-reflector connections, because the bandwidth charges for refreshing large images through our hosted servers adds up quickly. It sounds like your Indigo Touch connection is also connecting via the reflector. If you are at home on WiFi then you should be able to choose the Bonjour detected server in the settings (gear icon) table and it will directly connect without using a reflector while you are home.

Image

Posted on
Mon Aug 23, 2021 1:40 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Webserver picture limit

With Matt’s help, I created a python script that takes any picture grab from cameras of mine that are too large to display in the reflector and reduces their size to something suitable.

I can share it if you want to try that route.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests