Post a camera still to a URL?

TidalWaveOne

Young grasshopper
Joined
Dec 16, 2014
Messages
33
Reaction score
6
1. Can Blue Iris post a camera still image to a URL? Like to a PHP script on another web server where I can do something with the image?

2. Right now I am uploading/posting to an FTP server. There are some size options but I want it to post a 1920x1080 image but that is not an option in the "Size" field in the "Post" tab of the camera options and I could not add it manually (I tried but it didn't accept it).
 

devastator

Getting the hang of it
Joined
May 22, 2015
Messages
169
Reaction score
28
Location
Belgium
Don't know if it can upload directly to an ftp server, but you could fire a python script from a trigger and have that upload it ...
 

TidalWaveOne

Young grasshopper
Joined
Dec 16, 2014
Messages
33
Reaction score
6
Well, change of plans... I've changed the way images are handled. Blue Iris now saves a still to a folder and a batch script runs about every minute (via Windows Task Scheduler) to process the image by reducing the resolution to 1920x1086 and using a JPG quality that keeps the image file size down to around 150 KB (using ImageMagick). The batch script then uploads the image to a server (using pscp for PuTTY) and Weather Underground (via FTP using WinSCP). I believe this will allow for greater control and better reliability.

HOWEVER, it would be great if I could have Blue Iris launch the batch file right after it saves the image to the folder. I don't see any option to so this though.... ?

If you're interested you can see my new sky/weather camera here:
Lantana Sky & Weather Cam
 

TidalWaveOne

Young grasshopper
Joined
Dec 16, 2014
Messages
33
Reaction score
6
Like what you are doing here. Keep us posted on any progress. Thanks
Great... lastest update is that I heard back from Ken at Blue Iris support and he thinks my idea of launching a batch file after posting an image is a "great idea" and has put it on his implementation list. Until then it looks like what I have now will do (with Task Scheduler running my batch script every minute).
 

devastator

Getting the hang of it
Joined
May 22, 2015
Messages
169
Reaction score
28
Location
Belgium
How about triggering an alert (run a batch file) and have that bat file download the image from BI. That's how I did it in the past (the script got lost in a disk crash though ...)
 

J Sigmo

Known around here
Joined
Feb 5, 2018
Messages
997
Reaction score
1,335
Very nice! I will be following this thread with great interest.
 

TidalWaveOne

Young grasshopper
Joined
Dec 16, 2014
Messages
33
Reaction score
6
How about triggering an alert (run a batch file) and have that bat file download the image from BI. That's how I did it in the past (the script got lost in a disk crash though ...)
At this point I've spent so much time on it and it's working reasonably well that I think I will just wait until Ken (hopefully) adds the feature to run the batch script automatically... unless someone has the exact instructions and scripts needed to what you suggest? I have no idea how to "download an image from BI" from a script... but maybe if I get bored I will look into it. :D
 

TidalWaveOne

Young grasshopper
Joined
Dec 16, 2014
Messages
33
Reaction score
6
I will recreate the script once i have time ;-)
Wow..... I didn't know this was so easy. I came across it reading the documentation when I was trying to learn about live streaming to YouTube.

Looks like all I had to do was download wget and use this to fetch the image:
wget.exe "http://192.168.X.X:8080/image/skycam?q=90&s=100" -O %origfile%

This does make things much easier and more reliable... I just run the script every minute and there's no need for Blue Iris to post images and then another script run every minute (or so) to make sure the image is there and is not locked (finished writing it) before processing it. And no need or benefit to monitor the folder for new files from Blue Iris.

YEAH!

UPDATE: I've switched to using curl.exe instead of wget.exe because it does things I need that wget.exe doesn't (like POST a file to a PHP script).

UPDATE: I've posted the batch file I run every minute here (slightly altered for security reasons of course):
More Info - Lantana Sky & Weather Cam
 
Last edited:
Top