Saving records as mpeg/h264 ?

Forum for questions and support relating to the 1.28.x releases only.
Locked
tytanick
Posts: 3
Joined: Thu Oct 07, 2010 4:44 pm

Saving records as mpeg/h264 ?

Post by tytanick »

Are records in 1.28 are finally saving to h264 or still jpegs ?
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Saving records as mpeg/h264 ?

Post by bbunge »

There are several video formats you can choose from when you generate video in Zoneminder: avi,mpg, mpeg,wmv, asf, mov, swf, and 3gp. The video is generated from the saved still images. And you can export the images as well.
tytanick
Posts: 3
Joined: Thu Oct 07, 2010 4:44 pm

Re: Saving records as mpeg/h264 ?

Post by tytanick »

this is not what i ment.

I mean recording normal motion etc.
Normally zoneminder records each frame as separate jpeg what is completny disk inefficient.
So all motion should be recorded to events as video instead of separate jpegs.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Saving records as mpeg/h264 ?

Post by SteveGilvarry »

There is some work towards doing this in github, I am slowly working through some issues with the branch to get it up and running again. Previous devs who did all the hard work have moved on, but thanks for them. https://github.com/ZoneMinder/ZoneMinde ... deostorage.

Does it work yet, no, does it replace jpegs, no, not completely, but it does store events as video. It still uses jpegs for motion detection. Any devs who want to jump in on fixes feel free.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Saving records as mpeg/h264 ?

Post by Nerre »

I think the reasong zm uses jpegs is that it is a lot harder to work frame by frame in video formats. Just imagine the problems with having a program read the video file (playback) at the same time you are recording to it. And even worse. Try to analyse frames that need to be recalculated using delta information.

I don't think JPEGs are much worse on disk than video files, provided you use a suitably set up file system (i.e. small block size etc). At least not if you compare JPEGs to a video file where all frames are I-frames (which probably would be best suited). Disk today is cheap compared to the work needed to make zm work with video files.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Saving records as mpeg/h264 ?

Post by knight-of-ni »

ZoneMinder transcodes video into individual jpeg's due to historical reasons.

Consider that, when the initial code was written, the most common surveillance system consisted of analog cameras attached to a capture card installed in the pc. The good capture cards could typically only stream at 5-7 fps when all the inputs on the card were populated with cameras.

The IP cameras available at the time were very expensive, proprietary, only streamed mjpeg, and didn't go any higher than VGA resolution.

In this environment, the overheard caused by transcoding to jpeg's was not significant and hence was a reasonable solution.

As the industry progressed with better, cheaper, faster IP cameras, the inefficiencies of the current recording method became more obvious.

Moving forward to today, the core of the way ZoneMinder does things is still unchanged. I'm sure most everyone agrees that this needs to change. What we are short on, however, are those who are able or willing to actually do the work, write the code, and submit a pull request.

The good news is that we do have two, unrefined, potential solutions in house. The first solution records video straight to an mp4 container, while the second records to mkv. You can read about them here:

https://github.com/ZoneMinder/ZoneMinder/issues/452

https://github.com/ZoneMinder/ZoneMinder/issues/39

For those unfamiliar, these are not normal releases of zoneminder. Getting these branches to work on your local machine is going require knowledge in how github works and a strong desire to tinker.

We generally know what the current issues are with these potential solutions. What we need are people willing to fix them.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked