Search found 39 matches

by cmisip
Sat Jul 15, 2017 8:49 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Interesting results. The number of cameras that could use the hardware decoder increases with the GPU memory split. At 256 MB for the GPU and using total_mem=1024 in /boot/config.tx, I got 4 cameras at 704x480 working. At GPU mem of 144, I could only get three working. With each zma and zmc using up...
by cmisip
Tue Jul 11, 2017 11:43 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I got motion vectors from the hardware MMAL encoder. I just finished a testable version tonight. I am running tests on the system. Right now I am running 6 cameras running at 640x360 resolution with the first three using the hardware MMAL decoder and encoder ( for the vectors ) and the last three ru...
by cmisip
Thu Jun 29, 2017 10:57 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

There's a glimmer of hope that motion vector processing will work on h264 hardware decode as well. I managed to get a successful handoff from ffmpeg hardware decode to rpi mmal encoder in a test code. It is also quite possible to setup a native mmal decoder. I will try on the first and see where it ...
by cmisip
Tue Jun 27, 2017 12:13 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Getting this error on the neon stuff when trying to build a package on the raspberry pi 3. make[3]: Entering directory '/mnt/DISK1/build/ZoneMinder/obj-arm-linux-gnueabihf' [ 1%] Building CXX object src/CMakeFiles/zm.dir/zm_image.cpp.o /mnt/DISK1/build/ZoneMinder/src/zm_image.cpp:3418:128: warning: ...
by cmisip
Sat Jun 24, 2017 7:48 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Managed to get master up and running and integrate the fixes for motion vector analysis. The motion vector code required a few database commands to setup the Ffmpeghw Monitor type and the Mvdect Function. These need to be run by mysql root. ALTER TABLE Monitors modify column Type enum('Local','Remot...
by cmisip
Sat Jun 24, 2017 5:01 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Found the solution. /etc/zm/zm.conf did not contain the config parameters required. I found that I had to put in: ZM_PATH_SOCKS=/tmp/zm ZM_PATH_MAP=/dev/shm ZM_DIR_EVENTS=/usr/share/zoneminder/events ZM_DIR_IMAGES=/usr/share/zoneminder/images ZM_PATH_ZMS=/zm/cgi-bin/nph-zms ZM_PATH_SWAP=/tmp I also ...
by cmisip
Sat Jun 24, 2017 2:03 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I am trying to run master. I successfully built an ubuntu 16.04 package but there are issues that prevent me from testing. Some I was able to workaround. I thought I'd post here. Install problem Unpacking zoneminder (1.28.108-nmu2015100101) ... Setting up zoneminder (1.28.108-nmu2015100101) ... Use ...
by cmisip
Sat Jun 17, 2017 10:26 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Making some headway. I got a working solution now. Will have to do some more testing and post it on git once I figure out how to do that. I dont see the spikes in motion vectors anymore. The spikes might be the cause of the std::vector creation segfaults in Monitor::Analyse. It was due to me miscalc...
by cmisip
Tue Jun 13, 2017 5:05 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Thanks, I will look into that. I am unraveling the code piece by piece. I still dont know why I get a segfault with vector creation in Monitor::Analyse. Do you know why? Hopefully, I might not need to create a std::vector. I assumed that it was because the vector was referring to memory addresses th...
by cmisip
Sun Jun 11, 2017 3:38 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I figured it out. Needed to extend mem_ptr to allocate for the sidedata info. I can see the sideinfo in Monitor::Analyse now but I segfault when I create a vector from it.

Chris
by cmisip
Sat Jun 10, 2017 2:50 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Maybe you can give me a little hint. How is information passed from Monitor::Capture to Monitor::Analyse? I have motion vector information saved in a uint8_t * pointer and it is present in image_buffer[index] in Monitor::Capture. However it is not present in image_buffer[index] in Monitor::Analyse. ...
by cmisip
Sun Jun 04, 2017 11:20 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I wrote a test code based on ffmpeg's extract_mvs example to see how the motion vectors could be extracted and processed from an h264 stream. Can't guarantee that it will work and its probably got tons of bugs. It should compile against the latest ffmpeg-3.x. In Ubuntu xenial, pkg-config does not li...
by cmisip
Fri May 19, 2017 11:20 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I'm trying to grasp the inner workings of zm_zone checkalarm. It seems that each y line is checked from lo_x to hi_x within extents defined by the zone's polygon for that line. How does the program handle multiple lines of lo_x and hi_x when each y is intersected by the polygon more than once? I saw...
by cmisip
Wed May 17, 2017 10:59 am
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

Regarding the script, I ran into those issues with bash sometimes. Different flavors of linux or updates change the fields. Thanks for fixing. Has there been any work on using motion vectors to detect motion in video frames? As a consequence of h264 software decode, the macroblock motion vectors are...
by cmisip
Sun May 14, 2017 10:45 pm
Forum: ZoneMinder 1.29.x
Topic: Raspberry pi3 and h264_mmal
Replies: 60
Views: 82231

Re: Raspberry pi3 and h264_mmal

I have an idea why multiple zmc's can seemingly access a single decode pipeline concurrently. I think the zmc's are able to successfully open the codec but they dont have exclusive access to it. That's why it never falls over to software decoding regardless of having more than 1 zmc. It can however ...