Page 1 of 1
Uploading .mp4 timelapse at end of the day
Posted: Thu 27 Feb 2025 9:40 am
by Nottub
A little issue you may be able to give me some guidance on.
I have created a couple of scripts to take a snapshot from my webcam every minute through the day and annotate the captured image with the current date and time. Then at the end of the day another script takes those images and converts them into a timelapse .mp4.
I have set up (in the 'Extra Webfiles') to upload at the end of the day to my web host.
These fail with the message 'Unprocessable entity' or something similar. However if I select 'Real Time' it does upload. I don't leave 'Real Time' selected once it has uploaded.
The message in the diagnostic log (attached) reads at 09:00:17
Code: Select all
Error: TimeStamp is out of date
Data TS = 1740646802
Server TS = 1740646817
It does initiate at 09:00:02 but errors 15s later. A guide perhaps WRT the Timestamps recorded at initiation and failure of the transfer.
The log may be able to show more but I can't see anything. Perhaps the file size (19Mb) is just too big?
Any help appreciated.
Martyn
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 9:08 am
by Nottub
Just to confirm the upload again failed this morning. here is the error as reported in the 'Latest errors' :
Code: Select all
2025-02-28 09:00:52 - PHP[Int]: HTTP Error uploading to images/timelapse.mp4: Response code = 422: UnprocessableEntity
Not sure if this helps.
Thanks
Martyn
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 9:41 am
by water01
Are you uploading it as a Binary file?
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 9:55 am
by mcrossley
It looks like you are running an old version of upload.php. Please update it to the latest in the /webfiles folder.
If that does not fix the problem - the timeout is increased to 20 seconds in the latest version of upload.php - then we can look at this further.
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 10:36 am
by Nottub
water01 wrote: ↑Fri 28 Feb 2025 9:41 am
Are you uploading it as a Binary file?
Hi, the upload is set as a Binary.
Mark, the upload.php is the version which came with CMX 4.3.3 b4070. Do I need to update it somewhere else?
EDIT: I have just updated the php version with IONOS from 8.2 to 8.3.
Within the upload.php file is at line 77:
Code: Select all
If (abs ($receivedTime - $requestTime) >20). {
Does this mean that it is the later version?
Many thanks for your suggestions
Martyn
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 11:56 am
by mcrossley
It still appears to be an older version. The latest is dated "2024/11/28 17:56:02" on line 2
Yes line 77 should be > 20
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 12:05 pm
by Nottub
mcrossley wrote: ↑Fri 28 Feb 2025 11:56 am
It still appears to be an older version. The latest is dated "2024/11/28 17:56:02" on line 2
Yes line 77 should be > 20
I can see that Mark thanks for pointing out what I'm looking for. But how do I update it in CMX?
I have just a few minutes ago updated the version in IONOS (my provider). Will this auto update in CMX when I restart?
If not I don't know how to update the version that CMX uses.
Thanks
Martyn
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 12:09 pm
by mcrossley
You just need to put your "secret" into the upload.php file, then copy it up to your web server. Cumulus Will just start using it.
You can check it is on your server by loading the script in a web browser:
https://www.calvertoncam.co.uk/weather/upload.php
Newer versions report the script version and your PHP version in the response.
Old versions do not, you just get "Welcome to upload.php" and a load of "x"'s.
Re: Uploading .mp4 timelapse at end of the day
Posted: Fri 28 Feb 2025 12:48 pm
by Nottub
mcrossley wrote: ↑Fri 28 Feb 2025 12:09 pm
You just need to put your "secret" into the upload.php file, then copy it up to your web server. Cumulus Will just start using it.
You can check it is on your server by loading the script in a web browser:
https://www.calvertoncam.co.uk/weather/upload.php
Newer versions report the script version and your PHP version in the response.
Old versions do not, you just get "Welcome to upload.php" and a load of "x"'s.
Thanks Mark, I have re-uploaded the upload.php file with the 'secret' and I do now get the 'welcome', a 'version number' of 2024/11/28 17:56:02, and an 'Engine' number of 8.3.17, then a lot of XXXX's.
Hopefully that's now up to date!
I didn't realise I had to update the upload.php 'secret' again.
My other .php transfers have been working OK though.
Lets see what this update does.
Thanks again for giving up your time.
Martyn
Re: Uploading .mp4 timelapse at end of the day
Posted: Sat 01 Mar 2025 9:14 am
by Nottub
I thought I would post back to confirm that this mornings upload of my timelapse using CMX worked fine, with no error messages.
Fingers crossed that this continues.
https://www.calvertoncam.co.uk/weather/ ... elapse.mp4
Now need to a bit of fine tuning and get my old webcam up and running looking westwards.
Remarkable all this on a RPi.
Thanks
Martyn