[Solved] zmNinja - Events can't be downloaded - Saving Error - IPhone

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

[Solved] zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

Hello,

I am running a Ubuntu 20.04 with Zoneminder 1.36 and everything is working great! I decided to give zmNinja a shot as I would love to access my footage from outside. The app is working great so far except for one problem which I am facing. I am hoping you guys can help me resolve the problem.

Every time, I go to events List and I try to download an event by clicking on the download icon, it says:

Code: Select all

Please wait...
After a minute, it switches over to:

Code: Select all

Please wait... (100%)
At that point, it is basically stuck. I looked through the forums and read the docs. I was unable to find a solution to fix this problem. I decided to look into the logs and here is what is happening:

The error:

Code: Select all

Saving error:"Provided video is not compatible with Saved Photo album"
The Logs:

Code: Select all

Sep 26, 2021 05:27:53:488 PM INFO Returning pre-loaded list of 1 monitors
Sep 26, 2021 05:27:53:553 PM DEBUG ZM State has not changed, still at default
Sep 26, 2021 05:27:53:560 PM DEBUG obfuscate: original:5944 obfuscated:1679 scheme:lzs
Sep 26, 2021 05:27:53:595 PM DEBUG Using small thumbs 
Sep 26, 2021 05:27:53:595 PM DEBUG getMonitorsNow: returning 1 monitors
Sep 26, 2021 05:27:53:595 PM INFO EventCtrl called with: E/MID=0 playEvent =  false
Sep 26, 2021 05:27:53:599 PM INFO Image padding digits reported as 5
Sep 26, 2021 05:27:53:611 PM DEBUG $scope.loadMore ... delta: NaN
Sep 26, 2021 05:27:53:622 PM DEBUG EventSever: sendMessage: received->{"event":"push","data":{"type":"badge","badge":0,"appversion":"1.6.009"},"token":""}
Sep 26, 2021 05:27:53:622 PM DEBUG EventSever: Not sending WSS message as event server is off
Sep 26, 2021 05:27:53:622 PM DEBUG Clearing app badge count
Sep 26, 2021 05:27:53:623 PM DEBUG Starting page refresh timer
Sep 26, 2021 05:27:53:623 PM DEBUG **EXCEPTION**TypeError: undefined is not an object (evaluating 'screen.orientation.type') caused by undefined
Sep 26, 2021 05:27:53:623 PM DEBUG resize/orient: 375(w) * 768(h)
Sep 26, 2021 05:27:53:723 PM DEBUG getInitialEvents called
Sep 26, 2021 05:27:53:723 PM DEBUG EventCtrl: grabbing # of event pages
Sep 26, 2021 05:27:53:723 PM DEBUG EventCtrl: grabbing events for: id=0 Date/Time:-
Sep 26, 2021 05:27:53:723 PM DEBUG getEvents:http://x.x.x.x/zm/api/events/index.json?&sort=StartTime&direction=desc&page=1&token=<removed>
Sep 26, 2021 05:27:53:725 PM DEBUG Setting up carousel watchers
Sep 26, 2021 05:27:53:783 PM DEBUG We have a total of 1 and are at page=1
Sep 26, 2021 05:27:53:783 PM DEBUG EventCtrl: success, got 2 events
Sep 26, 2021 05:27:53:784 PM DEBUG EventCtrl:loading one more page just in case we don't have enough to display
Sep 26, 2021 05:27:53:785 PM DEBUG No more - We have a total of 1 and are at page=1
Sep 26, 2021 05:27:55:608 PM DEBUG unbinding eventCtrl watchers as modal has its own
Sep 26, 2021 05:27:55:610 PM DEBUG Shall I follow the same monitor for prev/next?:0
Sep 26, 2021 05:27:55:639 PM INFO Using stream mode single
Sep 26, 2021 05:27:55:639 PM DEBUG EventModalCtrl called from app.events
Sep 26, 2021 05:27:55:639 PM DEBUG Setting playback to undefined
Sep 26, 2021 05:27:55:696 PM DEBUG If recording is in progress, live feed will be shown
Sep 26, 2021 05:27:55:696 PM DEBUG Generated Connkey:651703
Sep 26, 2021 05:27:55:696 PM INFO *** Constructed API for detailed events: http://x.x.x.x/zm/api/events/93.json?&token=<removed>
Sep 26, 2021 05:27:55:760 PM DEBUG No object detection found in notes
Sep 26, 2021 05:27:55:762 PM DEBUG Neighbor next URL=http://x.x.x.x/zm/api/events/index/StartTime >:2021-09-26 16:55:21.json?sort=StartTime&direction=asc&limit=1&token=<removed>
Sep 26, 2021 05:27:55:763 PM DEBUG Neighbor pre URL=http://x.x.x.x/zm/api/events/index/StartTime <:2021-09-26 16:55:21.json?sort=StartTime&direction=desc&limit=1&token=<removed>
Sep 26, 2021 05:27:55:765 PM DEBUG Video url passed to player is: http://x.x.x.x/zm/index.php?view=view_video&mode=mpeg&format=h264&eid=93&token=<removed>
Sep 26, 2021 05:27:55:895 PM DEBUG On Play Ready invoked
Sep 26, 2021 05:27:55:896 PM DEBUG Setting cue points..
Sep 26, 2021 05:27:55:896 PM DEBUG API-Total length:637.16
Sep 26, 2021 05:27:55:896 PM DEBUG Player-Total length:0
Sep 26, 2021 05:27:55:958 PM DEBUG neighbors of 93are pre= next=95
Sep 26, 2021 05:27:55:962 PM DEBUG resize/orient: 375(w) * 768(h)
Sep 26, 2021 05:27:55:962 PM DEBUG Using small thumbs 
Sep 26, 2021 05:27:55:962 PM DEBUG giving time for collection to redraw...
Sep 26, 2021 05:27:55:963 PM DEBUG orientation: 0
Sep 26, 2021 05:27:55:963 PM DEBUG sizechanged, scroll to item: 0, postion: 0
Sep 26, 2021 05:27:56:066 PM DEBUG recomputing all row heights
Sep 26, 2021 05:27:56:263 PM DEBUG ready for next resize
Sep 26, 2021 05:27:57:263 PM DEBUG saveEvent  in EventModalCtrl called with video and 93
Sep 26, 2021 05:27:57:264 PM DEBUG -->Going to try and download http://x.x.x.x/zm/index.php?view=view_video&mode=mpeg&format=h264&eid=93&token=<removed>
Sep 26, 2021 05:27:57:264 PM INFO >>saveEvent: File path to grab is http://x.x.x.x/zm/index.php?view=view_video&mode=mpeg&format=h264&eid=93&token=<removed>
Sep 26, 2021 05:27:57:264 PM DEBUG Trying to save image to album: zmNinja
Sep 26, 2021 05:27:57:707 PM INFO >>>Starting checkAllEvents interval...
Sep 26, 2021 05:28:20:072 PM DEBUG local download complete: file:///var/mobile/Containers/Data/Application/916FB321-AA08-485C-8BED-489A979F12E0/Library/NoCloud/zmNinja-eid-93.mp4
Sep 26, 2021 05:28:20:072 PM DEBUG Now trying to move it to album
Sep 26, 2021 05:28:20:239 PM DEBUG Saving error:"Provided video is not compatible with Saved Photo album"
Sep 26, 2021 05:28:26:420 PM DEBUG Video state=play
Sep 26, 2021 05:28:26:426 PM DEBUG Not toggling screen controls as video controls were just used
Sep 26, 2021 05:28:26:597 PM DEBUG Not reloading as you have a modal open
Sep 26, 2021 05:28:56:599 PM DEBUG Not reloading as you have a modal open
Sep 26, 2021 05:29:26:608 PM DEBUG Not reloading as you have a modal open
Sep 26, 2021 05:29:40:275 PM INFO -->Clearing online/offine
More Info:
zmNinja version:1.6.009 (ios)
ZoneMinder version:1.36.7


Do you guys know what is the problem? Would love to figure this out and get the downloads working! Thank you very much!
Last edited by stikerdestiny on Tue Sep 28, 2021 7:09 pm, edited 1 time in total.
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

Hey Guys,

Any help would really be appreciated. Please and thank you :D
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

Is there a possibility for me to get a test account on your ZM web console? I can check with my iOS app what is going on. If so, please send an email to pliablepixels at gmail.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Mon Sep 27, 2021 1:35 pm Is there a possibility for me to get a test account on your ZM web console? I can check with my iOS app what is going on. If so, please send an email to pliablepixels at gmail.
Hi asker,

I should be able to arrange that for you. I will send you an email with the test account soon. :D
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Mon Sep 27, 2021 1:35 pm Is there a possibility for me to get a test account on your ZM web console? I can check with my iOS app what is going on. If so, please send an email to pliablepixels at gmail.
Done. Please check your email. Thank you.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

Received. Can you leave access on till the weekend? I may or may not get time to debug before that.
Also, I did a quick login: access is super slow - is it possible for you to add a smaller video that I can try and download? The 2 current ones are over a gig in size.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Tue Sep 28, 2021 10:48 am Received. Can you leave access on till the weekend? I may or may not get time to debug before that.
Also, I did a quick login: access is super slow - is it possible for you to add a smaller video that I can try and download? The 2 current ones are over a gig in size.
I will try my best to leave it on till the weekend but I can't guarantee that it will be up 24/7. As for the smaller download. I have added a second monitor with 2 videos. You should be able to download those instead. They are small in size.

Asker, something I noticed while testing: I can't seem to download when the video writer is set to `Camera Passthrough` in the storage tab of the monitor. When I disable, that option I am able to view the video directly (still can't download it). When I enable it, I can't view it and the saving error occurs. Hope that helps.

Update: I just confirmed the above behaviour. If the video writer is set to `Camera Passthrough` and I check the audio checkbox in the storage tab, the video can't be downloaded/viewed from the Event List. Thought I would let you know to help you debug it faster. :)

If by any chance, you notice that the server is down, just ping me on email and I will get it up and running in a few seconds but that shouldn't be the case. :)
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

So I think its related to the video format you are using to create the mp4.

1. I tried downloading the mp4 on my desktop - only VLC was able to play it. That tells me its not a standard encoding format - quicktime failed.
2. If you force MJPEG on the monitor (in monitors=>configuration) it is able to play in zmNinja but otherwise can't
3. Your comment about pass through vs. non pass through also confirms that

You are not going to be able to save the mp4 to your phone if its not natively playable, so I'd recommend experimenting with the camera encoding options including resolution. I can't check monitor options as the profile you created for me does not have monitor access.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Tue Sep 28, 2021 3:03 pm So I think its related to the video format you are using to create the mp4.

1. I tried downloading the mp4 on my desktop - only VLC was able to play it. That tells me its not a standard encoding format - quicktime failed.
2. If you force MJPEG on the monitor (in monitors=>configuration) it is able to play in zmNinja but otherwise can't
3. Your comment about pass through vs. non pass through also confirms that

You are not going to be able to save the mp4 to your phone if its not natively playable, so I'd recommend experimenting with the camera encoding options including resolution. I can't check monitor options as the profile you created for me does not have monitor access.
Asker, I just gave you admin permissions. You should be able to have a look at the monitor options. If you don't mind, would you be able to have a quick view of it and see if I have things configured correctly? I just want to make sure that I am not doing anything in the configurations which could be causing it? Would appreciate it. :)
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

Ok, I am fiddling with HomeCamera2 and will try a few changes
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Tue Sep 28, 2021 3:46 pm Ok, I am fiddling with HomeCamera2 and will try a few changes
Feel free. Thank you very much :)
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

So I lost access to your web console in the middle of making changes- not responsive
Can you configure Home Camera 2 to just be in monitor mode in a way that we can see live streams on chrome?
I am unable to see live view on a browser
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Tue Sep 28, 2021 4:31 pm So I lost access to your web console in the middle of making changes- not responsive
Can you configure Home Camera 2 to just be in monitor mode in a way that we can see live streams on chrome?
I am unable to see live view on a browser
Sure one sec.
stikerdestiny
Posts: 13
Joined: Sun Sep 26, 2021 12:45 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by stikerdestiny »

asker wrote: Tue Sep 28, 2021 4:31 pm So I lost access to your web console in the middle of making changes- not responsive
Can you configure Home Camera 2 to just be in monitor mode in a way that we can see live streams on chrome?
I am unable to see live view on a browser
Done. You should be able to see it now. You might need to start a recording to see a clip. Feel free to do so :)
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja - Events can't be downloaded - Saving Error - IPhone

Post by asker »

So I keep seeing a black box saying 'unable to stream'
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Post Reply