Page 2 of 2
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 4:34 pm
by dmgould
I use the dynamic image block for my webcam image display. On one of my sites I have an older webcam that just replaces the existing image, so there is no problem of image file storage. On my other site I just reference my webcam image that I upload to WUnderground. That way they do the storage plus provide a time lapse option. The down side is when they have server problems, which is happening right now with my webcams, it doesn't work properly. You can see the dynamic image example on my pueblo weather page. Click on the Weather Camera tab to see that I point to my WUnderground images on that page including the current time lapse, and no cron job needed. As I write this the images are not updating because of problems at WUnderground, but the images and time lapse from a day ago and before are still there. They work fine - when WUndergound is working correctly.
http://www.puebloweather.net/belmont/template
Here is a direct link to my weather camera page:
http://www.highlandlakesweather.net/tem ... camera.php
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 5:23 pm
by WessexWeather
Hi Dave,
Thanks for that. However, I occasionally want to download an interesting webcam image to save or upload to social media. With this method, correct me if I'm wrong, once the webcam image is overwritten it's lost forever? Or can of be retrieved from WU (when their servers aren't down!)?
Hence the request for date-stamped folders, rather than a huge list of images.
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 5:55 pm
by dmgould
I'll look into that, but I believe only the current still image would be available to download using WU. The past time lapse videos are all available from WU sorted by day/date. Here is the link to one of mine if you aren't familiar with the WU site.
https://www.wunderground.com/webcams/dm ... /show.html
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 6:11 pm
by WessexWeather
Thanks, I upload to WU too (both data and webcam images) but their site has been so buggy over the past year that I'm no longer a big fan, and their time lapse videos can be messed up. I also upload to webcams.travel who also create nice time lapses. Mine is here: -
https://m.webcams.travel/webcam/1497961 ... shall-west
The key for me is to be able to retrieve previous images.
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 6:29 pm
by dmgould
I sure agree with your WU buggy assessment. So does Jachym I think. They are not the same company since they became the Weather Company. Thanks for the webcams.travel link. I might look into that one as well.
Re: Webcam pictures used too much disk space
Posted: Wed Sep 13, 2017 9:57 pm
by dmgould
Simon,
I can get to the images archived on WUnderground. On the 'Monthly Overview' link click the date and then click through to the time you want. The URL to the image file shows when you inspect the code, and you can then save the file. Here is the one I just went to as a test. It's still not as handy as having it on your own server or computer, but it works.
http://icons.wunderground.com/webcamarc ... 434EDT.jpg
Re: Webcam pictures used too much disk space
Posted: Mon Oct 02, 2017 4:22 am
by BobW55
Another possible work around:
I use IP Time Lapse
https://iptimelapse.com/ for my single web cam.
It will send a single JPG to my Web server every 5 minutes. It deletes the current pic and replaces it with the new one using the same name. It stores the images on my local PC for how ever many days you specify.
It also has the ability to create time lapse videos. I use 2. The first one up dates every hour, the second one updates at the end of the day. Both use the same file names for upload to your server, and also store the originals on your local PC. I keep a rolling 7 days worth for both. I then use the Webcam and Videos Block to display them on my web page.
Works well and saves tons of server storage space. My Weather PC has a 500 Gig hard drive, and it has only used 85gig in the 4 years it has been in use.
Bob
www.melvinweather.com
Re: Webcam pictures used too much disk space
Posted: Mon Oct 02, 2017 9:39 am
by WessexWeather
Thanks Bob,
I have looked at this before, but I no longer want to run a PC 24/7. That is why I now use Meteobridge and Meteotemplate.
If only I could find something like this that runs server side.
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 5:00 pm
by BlueBear
Sorry for reviving an old thread but I just realized that I have over 36,000 images in my webcam plugin and want to nuke them and start over.
Can someone give me a step by step guide to emptying out the info in the database. I'm not very confident of playing with that in case I mess up the entire thing!
Thanks in advance
Bill
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 5:45 pm
by Jachym
Do you use PhpMyAdmin?
If so you can delete the references (rows) for those images and then delete them physically from the server
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 7:19 pm
by Fraggboy
What I do is setup a CRON job to delete images older than 7 days old. I have the job execute every 7 days. It keeps my webcam folder under control.
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 7:31 pm
by WessexWeather
Fraggboy wrote: ↑Fri Jan 05, 2018 7:19 pm
What I do is setup a CRON job to delete images older than 7 days old. I have the job execute every 7 days. It keeps my webcam folder under control.
How do you also deal with all the entries in the MySQL database?
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 7:37 pm
by BlueBear
Jachym wrote: ↑Fri Jan 05, 2018 5:45 pm
Do you use PhpMyAdmin?
If so you can delete the references (rows) for those images and then delete them physically from the server
Yes I do use PhpMyAdmin, and have started deleting the rows, but doing 500 at a time it's gonna take a while to delete 30,000+ rows

Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 7:38 pm
by BlueBear
Fraggboy wrote: ↑Fri Jan 05, 2018 7:19 pm
What I do is setup a CRON job to delete images older than 7 days old. I have the job execute every 7 days. It keeps my webcam folder under control.
Are you willing to share your CRON job? I'd like to do something similar
tnx
Bill
Re: Webcam pictures used too much disk space
Posted: Fri Jan 05, 2018 10:57 pm
by Fraggboy
You bet!
Code: Select all
find /path/to/the/folder* -mtime +5 -exec rm {} \;
Change the path. Leave the * after the directory you want to trim (No space). The number is the days you want to keep. It will delete all files that are older than 5 days.
I have a script that has 3 lines (Shown above) that points to different folders/times.
I don't delete anything from the database. It hasn't hurt anything (yet). I'm sure that if someone is a SQL guru, they can create a script to remove those entries..
Hope this helps.
Re: Webcam pictures used too much disk space
Posted: Sat Jan 06, 2018 1:36 am
by BlueBear
Fraggboy wrote: ↑Fri Jan 05, 2018 10:57 pm
You bet!
Code: Select all
find /path/to/the/folder* -mtime +5 -exec rm {} \;
Change the path. Leave the * after the directory you want to trim (No space). The number is the days you want to keep. It will delete all files that are older than 5 days.
I have a script that has 3 lines (Shown above) that points to different folders/times.
I don't delete anything from the database. It hasn't hurt anything (yet). I'm sure that if someone is a SQL guru, they can create a script to remove those entries..
Hope this helps.
Thanks, but I bet your hosting the database on your local server, I use external hosting so doubt that will work!
Re: Webcam pictures used too much disk space
Posted: Sat Jan 06, 2018 7:02 pm
by scadie
Hi Everyone,
I delete everything on my side (empty sql database, delete folder in block and plug-in), now the block work perfectly but the plugin webcam just show me the current picture but i don't get anymore the calendar to see previuos webcam picture.
Any idea ?
Re: Webcam pictures used too much disk space
Posted: Sat Jan 06, 2018 8:50 pm
by Jachym
You can run an sql command
Eg
Delete from webcam where DateTime>"2015-01-01 and DateTime<"2016-01-01"
Change the dates based on your data
Re: Webcam pictures used too much disk space
Posted: Mon Jan 08, 2018 4:50 pm
by Fraggboy
BlueBear wrote: ↑Sat Jan 06, 2018 1:36 am
Fraggboy wrote: ↑Fri Jan 05, 2018 10:57 pm
You bet!
Code: Select all
find /path/to/the/folder* -mtime +5 -exec rm {} \;
Change the path. Leave the * after the directory you want to trim (No space). The number is the days you want to keep. It will delete all files that are older than 5 days.
I have a script that has 3 lines (Shown above) that points to different folders/times.
I don't delete anything from the database. It hasn't hurt anything (yet). I'm sure that if someone is a SQL guru, they can create a script to remove those entries..
Hope this helps.
Thanks, but I bet your hosting the database on your local server, I use external hosting so doubt that will work!
Depends on the level of access you have to your external hosting environment. If you only have cPanel access, you just need to play around with the location of the folder. The root folder of *some* external hosting starts at /www/template/.....
You will just need to play around with it.
Re: Webcam pictures used too much disk space
Posted: Mon Jan 08, 2018 6:50 pm
by BlueBear
Jachym wrote: ↑Sat Jan 06, 2018 8:50 pm
You can run an sql command
Eg
Delete from webcam where DateTime>"2015-01-01 and DateTime<"2016-01-01"
Change the dates based on your data
Thanks for the hint Jachym,
( for anyone else trying this, note there is a minor typo in the suggestion, missing a " after the 2015-01-01)
Once I figured that out it went smoothly!
Bill
Re: Webcam pictures used too much disk space
Posted: Mon Jan 08, 2018 10:31 pm
by Jachym
Hi,
yes, sorry stupid typo
Re: Webcam pictures used too much disk space
Posted: Sun Mar 18, 2018 11:49 am
by andyk1
Reading through these post I did not find an answer to my problem.
I set up both the webcam and also the webcamTimelaps blocks but did not see a setup for the timelaps block. I also cannot get my cam to load the most current picture. I have 4-5 days worth of 5 min snaps in my /weathercam dir but not sure how to set it to show the most resent 5 min snap. Any help would be appreciated.
I forgot to mention I use a meteobride to ftp the outdoor cam images which is succesful. If you look at my site you will see the next snapped image does not advance.
I have the path set as:
/npw/weathercam/FI9826P_00626E526DB0/snap/Schedule_20180318-062408.jpg which does show that snap but I am unsure how to get it to advance to the most current picture. Nothing i the directions explain that but look at other sites... Melvins... I see both single and timelaps working.
www.nicomaparkweather.com
Andy
Re: Webcam pictures used too much disk space
Posted: Wed Jun 06, 2018 10:05 am
by Jachym
Your link points to a specific image, the block requires a link which is static, ie the image is updated on the same link, not unique link for each image
Re: Webcam pictures used too much disk space
Posted: Wed Jul 11, 2018 11:25 am
by proger
The way I do it.
Just to give people some options.
at the end of month I download image from my host
I then make a timelaps movie for that month and put in a folder on my website.
Build a new page and have all my timelaps in there.
check it out here
http://www.auestadhome.com/template/cus ... e=timelaps
After this is done I delete that month from database and all files assosiated with that month.
Just how I do it..