Recording MPEG streams directly?

Forum for questions and support relating to the 1.28.x releases only.
Locked
m00dawg
Posts: 8
Joined: Thu Sep 17, 2015 5:25 pm

Recording MPEG streams directly?

Post by m00dawg »

Is it possible to be able to record an MPEG stream directly off the camera and to disk? The ideal would be only grabbing a few JPEGs during non-alarm mode, but to grab the MPEG stream when alarming but I haven't been able to get MPEG streams to disk at all so far.

My actual plan is to configure to cameras in ZoneMinder. One would be for a 320x240 B&W stream just grabbing JPEG frames off the camera and using that for motion detection. Then one would be the full on large stream which is linked to the B&W. The hope was to use less resources when tracking movement.

I have that almost setup now but if I'm not doing any motion detection on the large stream, it seemed like it would be better to just have it chucking streams directly to disk and not having to worry about it.

I have ffmpeg 2.8. In ZoneMinder, OPT_FFMPEG is checked, PATH_FFMPEG is set to '/usr/bin/ffmpeg' (which is the right place on my system for it). ZoneMidner added "-r 25" to the FFMPEG_OUTPUT_OPTIONS. FFMPEG_INPUT_OPTIONS is blank.

For the camera I wanted MPEG recording on, I tried setting the Source Type to both remote (RTSP) and Ffmpeg. I can monitor both but when enabling record, I still see JPEGs being generated on disk.

Thoughts?
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Recording MPEG streams directly?

Post by bbunge »

This seems to be asked from time to time. And the answer is that Zoneminder saves JPEG files as you have discovered (think film). You can export those as individual files or have them put together as a stream. I have done this many times and it works well. You may be able to set a filter to automatically export streams based upon an alarm. You did not say what version of Linux you are using but Ubuntu does not need ffmpeg added to export streams as it uses avconv.
m00dawg
Posts: 8
Joined: Thu Sep 17, 2015 5:25 pm

Re: Recording MPEG streams directly?

Post by m00dawg »

Ooop, sorry. Ubuntu 14.04, although I installed ffmpeg via the PPA. Having said that, I can't get MPEG/SWF to work on the viewing side so not sure what's going on there. That said, if Zoneminder won't write MPEG video to disk normally, I think the JPEG-based viewer would be just fine. I was really only thinking MPEG for less work on the Zoneminder side to write the contents to disk (at the cost of more disk I/O) and faster FPS (particularly during alarms).
Locked