Closed PartialVolume closed 7 years ago
This unfortunately is harder than it might seem like.
a) Zoneminder uses ffmpeg to encode jpeg images to ffmpeg (unless you are on h264 branch which stores native videos). The process of ffmpeg conversion is CPU intensive
b) Zoneminder has the convenience to be able to do this at the server end directly from the images folder.
c) If zmN were to do this mobile side, we would need to: c.1) Find an equivalent encoder that converts images to videos (ffpmeg or otherwise) that works with cordova c.2) Make sure its license compatible (non GPL) c.3) Worry about the network bandwidth (event playback routes via zms, not direct image grabs) c.4) make sure FPS is correct
I did come across https://bgrins.github.io/videoconverter.js/ -- but its huge and never attempted it
etc etc
overall, not very simple. If you find an easy way, and are willing to do a PR, happy to accept
Unless you are thinking about some sort of API which zmNinja invokes to the ZoneMinder server to encode and send a video, in which case: No such API exists today, you'll have to add it to ZM first.
Finally, when the h264 ZM branch goes live, it would do videos by default making the image-video encoding activity somewhat unnecessary.
Interesting, I've been using Zoneminder for quite a few years now and knew there had a few suggestions in the past about storing H264 video as mp4 or back then I think somebody had got something part working with mkv. Looks like the video storage branch is fairly active.
I'm assuming this won't affect zmNinja too much as the branch can also store as jpegs which I'm guessing will mean you don't need to change zmNinja much ?
I was thinking more along the lines of having the server do the conversion rather than having ffmpeg as part of ZmNinja.
So i guess the changes to the API would be in the video storage branch that could provide access to convert JPEGS to the various formats supported by ffmpeg and maybe allow access to the stored mp4 event so no conversion is required.
Just wondering if you've tried zmNinja with the video storage branch ?
Yes, some folks use zmN with the video storage branch - it works
The API could be implemented in either branch. In the non video branch it would result in the server executing the same script it does today to create a video out of JPEG events
In the video branch, this conversion wouldn't be needed
In both branches, you'd need to think of a way to then send the path of the video (once created) back to the app for viewing/local storage
I'll take closer look at the API and see if I'm up for it/can spare the time. I'm new to github so I'm on abit of a learning curve re PRs merges forks etc let alone learning angularjs ionic and Cordova. Hopefully the API is written in C something that's in my comfort zone, although I think I read somewhere its written in something I've not come across before. :-)
This was implemented as part of #379 and #383
Platform & OS Version Android 6.0 Marshmallow / Android 5.1 Lollipop / Kubuntu Linux 16.04
The version of the app you are reporting: 1.2.21
Device details: HTC M8 / UMI Fair / Octal Core PC
What is the nature of your issue Enhancement Request
Details Zoneminder can convert an event into an avi, mov, asf, mpeg,mpg etc file. I'm hoping it would be not too difficult to add this feature to zmNinja, ie so you can download onto your phone the video file converted in zoneminder. Does the zoneminder API support access to the video conversion feature on zoneminder ?
This would be pretty much complete it's features for me except maybe for casting a live feed or event footage to a chromecast stick or DLNA.
Regards Nick