I'm working with a company in the entertainment industry where they provide rides. They want to produce short 10s video clips of the customers as they pass a certain point in the ride. They want to provide a web site where customers can go to after the ride and download that video and use as they see fit.
It should be automated and require no staff involvement.
I started having a play with this. I used a webhook with motion detection and this gives me a still and a timestamp. Perfect so far.
And then I came to a realisation - there is no API to download or export video - is there?
Solved! Go to Solution.
@PhilipDAth Well, in theory it IS possible to download the clips directly from the camera.
I did some reverse engineering for another project (you know what I am talking about :)) and I‘ve found out the following:
Video seems to be stored at the camera in smaller chunks of ~30 seconds (iirc).
When you do playback in the dashboard and your PC has a LAN connection to the camera, the browser loads these chunks directly from the camera with HTTPS. The browser is able to do this (despite same origin policy) because the camera registers in DNS with some kind of xyzdwviceid.devices.local.meraki.com (or similar, cannot remember, but you’ll get the pattern) and it‘s local LAN IP. It also has a corresponding SSL certificate that is issued by a Cisco CA.
Before the browser loads the video chunks, it receives some kind of metadata saying things like timestamp_from,timestamp_to,filename_at_camera“ - also from the camera (or maybe from the dashboard backend, but it doesn’t really matter)
I found all the stuff by using a SSL proxy between my browser, the camera and the dashboard backend. I’m sure it‘s not a problem for you to reproduce that.
But anyways, even if you would make it to be able to grab the chunks, you will run into the problem that you cannot take influence on when the chunks begin and when they end. If you need a time span that overlaps two chunks, you would have to do some ffmpeg stuff.
But if you have setup constant FPS, you can calculate the exact timestamp for each frame and get the result you‘re aiming for.
As I mentioned in another post. All this stuff is not official supported and it‘s quite a lot of work to get this done. I stopped working on a perl module for implementing all this to work automatically, because I don’t want to have wasted a lot of time if Meraki is going to change all the stuff or even protect against it in some future firmware versions.
hey @theshmike, i see you reply from this morning at 5:08 PDT (UTC-7) in my inbox, but not here... i'm not sure what happened, and personally don't have the ability to delete posts (nor like that happening either)
That‘s not cool! It took me 15 minutes to write the stuff down and the post was online here for more than an hour before it disappeared.
Is it some kind of „forbidden“ to publish reverse engineered stuff in here? I didn’t find anything about that in the community guidelines.
At least somebody should inform me if he or she deletes a post of mine and tell me a reason...
update: @CarolineS Haha, all right then...had the worst thoughts 🙂
Looks like @CarolineS fixed and restored your post from the spam filter, @theshmike! I'm not aware of any policy like that, and personally, we on the API PM team love our users tinkering and finding creative solutions! You already called out that it's not officially supported and subject to the MV device/firmware changing in the future. I'm not a lawyer, but other than that, I think that doesn't bar you from sharing cool info like this!
@chengineer awesome you‘re on the API team. Then please also recognize THIS thread: https://community.meraki.com/t5/Smart-Cameras/MV-API-rather-useless-for-mass-use-in-retail-analytics... 🙂
Totally recognized, and it's something we've heard--loud and clear--for a while, both on the API & MV teams. While the API team doesn't own this feature, we are consulting with the MV team on possible ways to solve the problems you mentioned there. Another approach we've seen other partners develop use RTSP and local/custom models for edge processing, eliminating the reliance on any cloud APIs (Dashboard API or third-party computer vision engines).
@PhilipDAthJust to back you up with some more details:
Do this to grab video chunks from the camera after you have double checked, that the camera is reachable via LAN and on-camera storage is enabled:
The result will be something like
"start": 1595850970531, "end": 1595851000381, "length": 29.85, "on_camera": true, "storage_provider": "on_camera", "expiry": 1595851698902, "src": "https://192-168-10-10.<macaddress>.devices.meraki.direct/video/20a52333c7473da282ad712fdb8fdb59/1595850970.531.mp4", "width": 1920, "height": 1080, "size": 11689724
There you go, now you can download the video chunk from