Webcam pictures used too much disk space

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by dmgould » Wed Sep 13, 2017 4:34 pm

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
Dave G
Image

User avatar
WessexWeather
Forecaster
Forecaster
Posts: 130
Joined: Mon Aug 21, 2017 6:26 pm
Location: Wimborne, East Dorset, UK
Station model: Davis Vantage Vue
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by WessexWeather » Wed Sep 13, 2017 5:23 pm

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.
Regards,

Simon (WessexWeather)

Image

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by dmgould » Wed Sep 13, 2017 5:55 pm

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
Dave G
Image

User avatar
WessexWeather
Forecaster
Forecaster
Posts: 130
Joined: Mon Aug 21, 2017 6:26 pm
Location: Wimborne, East Dorset, UK
Station model: Davis Vantage Vue
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by WessexWeather » Wed Sep 13, 2017 6:11 pm

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.
Regards,

Simon (WessexWeather)

Image

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by dmgould » Wed Sep 13, 2017 6:29 pm

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.
Dave G
Image

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by dmgould » Wed Sep 13, 2017 9:57 pm

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
Dave G
Image

User avatar
BobW55
Forecaster
Forecaster
Posts: 115
Joined: Thu Sep 28, 2017 11:43 pm
Location: Michigan USA
Station model: Davis Pro2
Software: Cumulus
Contact:

Re: Webcam pictures used too much disk space

Post by BobW55 » Mon Oct 02, 2017 4:22 am

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
http://melvinweather.com/template/indexDesktop.php
Davis Vantage Pro2 wired
Solar/UV sensors
Sky Cam
Ham radio K8pos

User avatar
WessexWeather
Forecaster
Forecaster
Posts: 130
Joined: Mon Aug 21, 2017 6:26 pm
Location: Wimborne, East Dorset, UK
Station model: Davis Vantage Vue
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by WessexWeather » Mon Oct 02, 2017 9:39 am

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.
Last edited by WessexWeather on Fri Jan 05, 2018 7:29 pm, edited 1 time in total.
Regards,

Simon (WessexWeather)

Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Webcam pictures used too much disk space

Post by BlueBear » Fri Jan 05, 2018 5:00 pm

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

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by Jachym » 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

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Webcam pictures used too much disk space

Post by Fraggboy » 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.
Image

User avatar
WessexWeather
Forecaster
Forecaster
Posts: 130
Joined: Mon Aug 21, 2017 6:26 pm
Location: Wimborne, East Dorset, UK
Station model: Davis Vantage Vue
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by WessexWeather » Fri Jan 05, 2018 7:31 pm

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?
Regards,

Simon (WessexWeather)

Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Webcam pictures used too much disk space

Post by BlueBear » Fri Jan 05, 2018 7:37 pm

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 ;)

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Webcam pictures used too much disk space

Post by BlueBear » Fri Jan 05, 2018 7:38 pm

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

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Webcam pictures used too much disk space

Post by Fraggboy » 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.
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Webcam pictures used too much disk space

Post by BlueBear » 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!

User avatar
scadie
Language Admin
Language Admin
Posts: 46
Joined: Sun Aug 20, 2017 2:56 pm
Location: Saint-Hubert, Québec, Canada
Station model: Davis Vantage Pro
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by scadie » Sat Jan 06, 2018 7:02 pm

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 ?
Sylvain Cadieux
scadie@scadie.com

Meteo Saint-Hubert: http://www.meteosaint-hubert.com

Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by Jachym » 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

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Webcam pictures used too much disk space

Post by Fraggboy » Mon Jan 08, 2018 4:50 pm

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.
Image

BlueBear
Forecaster
Forecaster
Posts: 101
Joined: Sun Aug 20, 2017 1:04 pm
Location: Sanford, Manitoba, Canada
Station model: Davis VP2
Software: WeeWx
Contact:

Re: Webcam pictures used too much disk space

Post by BlueBear » Mon Jan 08, 2018 6:50 pm

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

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by Jachym » Mon Jan 08, 2018 10:31 pm

Hi,
yes, sorry stupid typo

andyk1
Professional
Professional
Posts: 433
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: Webcam pictures used too much disk space

Post by andyk1 » Sun Mar 18, 2018 11:49 am

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
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by Jachym » Wed Jun 06, 2018 10:05 am

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

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: Webcam pictures used too much disk space

Post by proger » Wed Jul 11, 2018 11:25 am

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..
Image

Post Reply