Zoneminder and Odroid XU4 - needed a working setup!

User avatar
memeka
Posts: 4321
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by memeka » Thu Feb 28, 2019 9:01 am

why not use mad_ady's ffmpeg from above and use ZM 1.30.4 on the latest 18.04 ubuntu image?

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Thu Feb 28, 2019 3:06 pm

pat2 has trust issues with regard to precompiled packages from untrusted sources, as normal people would

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Fri Mar 01, 2019 12:16 am

:-)
no, mad, probably i misunderstood. English is not my mother tongue.
Do you think that using your ffmpeg package i will solve the issue on ZM?
if yes, i will use for sure...


EDIT: I skipped your post "success!" i didn't read it! great Mad! i will use it and report to you. thanks a lot.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Sat Mar 02, 2019 4:10 am

GREAT JOB, MAD!

mad, you are GREAT!!!! it's working! Great! you are great!

I procedure
I downloaded the files from your site and followed your instructions! it's working.
For experiment i will follow also the second method you are proposing. To compile on 16.04.

I wil let you know. thanks a lot.
You won the challenge!! thaks a lot

EDIT: II procedure
working too the procedure to build ffmpeg on 18.04. thanks mad! great guide and great solution. trying to do on 16.04. again thanks

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Mon Mar 04, 2019 9:44 am

hi Mad, again me. :-)

I'm trying to use your second procedure for 16.04.
I think for sure 2 instructions to be modified accordingly to the new names of files built:

# dpkg -i ffmpeg...
# apt-mark hold ffmpeg...

but I'm not sure for the others.

I'm asking since I tried to build on 16.04: building has been succesfully completed but, even if installed and marked hold (I tried different combinations) and restarted ZM, I don't get the ffmpeg streams on ZM.

If you have time, could you please list the recommeded procedure for 16.04?

thanks

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Mon Mar 04, 2019 11:37 am

Is there any specific reason to use the old 16.04? 16.04 will be EOLed in two years probably.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Mon Mar 04, 2019 3:25 pm

Since 16.04 has by default a non-hardware accelerated ffmpeg, you shouldn't need to recompile it (there's nothing to disable).
Anyway, if you want to enable the hw decoder on 16.04, you can follow this thread: viewtopic.php?f=146&t=24366

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Mon Mar 04, 2019 4:46 pm

yes, Odroid.
I discovered ZM 1.32 and 1.33 have a bug not yet solved: not possible to see video recorded in case of MJPEG cameras (i.e. Foscam old cameras) and ARM board.
On 16.04 it's possible to install ZM 1.30.4, available for 16.04 but not for 18.04, that doesn't have the bug.

Understood, Mad. That's the reason, even if recompiled, the same setup doesn't allow too see MPEG streams. Probably there is another reason.

Anyway I undestand there is no reason to invest on 16.04 since near to EOL.

Again, guys, thanks for your great support. Interesting for me also to understand, not only to solve the issue.

In my next posts i will insert my contribute: some howtos (howto expose in WAN, how to access through ID, how to use https, how to record on a external/network HD, how to configure cameras,...) about ZM if you will decide to publish an article on Odroid newspaper. And, Odroid, it could be useful to protect your farm :-)

thanks again :-)

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Mon Mar 04, 2019 5:20 pm

Yes! I need a more comprehensive how-to guide for my personal weekend farm security as well as our Magazine. :D

lazlo
Posts: 143
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by lazlo » Tue Mar 05, 2019 2:06 pm

pat2 wrote:
Mon Mar 04, 2019 4:46 pm
yes, Odroid.
I discovered ZM 1.32 and 1.33 have a bug not yet solved: not possible to see video recorded in case of MJPEG cameras (i.e. Foscam old cameras) and ARM board.
On 16.04 it's possible to install ZM 1.30.4, available for 16.04 but not for 18.04, that doesn't have the bug.

Understood, Mad. That's the reason, even if recompiled, the same setup doesn't allow too see MPEG streams. Probably there is another reason.

Anyway I undestand there is no reason to invest on 16.04 since near to EOL.

Again, guys, thanks for your great support. Interesting for me also to understand, not only to solve the issue.

In my next posts i will insert my contribute: some howtos (howto expose in WAN, how to access through ID, how to use https, how to record on a external/network HD, how to configure cameras,...) about ZM if you will decide to publish an article on Odroid newspaper. And, Odroid, it could be useful to protect your farm :-)

thanks again :-)
From the contents of this post I can see you be very busy and I hate to add to your workload but I would like to suggest a HOWTO about adding watermarks to your security footage.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Mar 05, 2019 3:58 pm

@lazlo: Why would you need/want watermarks over your security footage? It will just make the footage less accurate.

lazlo
Posts: 143
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by lazlo » Tue Mar 05, 2019 4:09 pm

mad_ady wrote:
Tue Mar 05, 2019 3:58 pm
@lazlo: Why would you need/want watermarks over your security footage? It will just make the footage less accurate.
Deep Fakes.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Mar 05, 2019 4:14 pm

:))

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Wed Mar 06, 2019 2:26 am

========================================================================
............................................ZM HOW-TO..........................................
========================================================================

1. After installation (see previous posts for ZM installation and FFMPEG modification if you use HK 18.04 distro), check if ZM is working well in your LAN: open a web browser (Firefox is recommended, I will explain better):

http://LANserverip/zm (e.g. http://192.168.1.200/zm)

if ZM page appears, you are in a good shape

2. Set the ZM access in authenticated way: go in Options/System: flag on OPT_USE_AUTH.
Close the browser, open the browser, you will be asked to enter Userid/password. Use admin/admin (*)

3. Modify userid/passwd: go in Options/Users: change username from admin to whatever1, set the new pwd to whatever2
Close the browser, open the browser, you will be asked to enter Userid/password. Use whatever1/whatever2 (*)

4. Check AUTH_TYPE = builtin (if no, set to), check AUTH_RELAY = hashed (if no, set to), change AUTH_HASH_SECRET to whatever (*)

5. Enable https for ZM (the easy way, there is another method using letsencrypt certificates, I will explain in future), go in terminal:

Add SSL to Apache2 (the easy way)

-Create a self-signed certificate:

Code: Select all

make-ssl-cert generate-default-snakeoil --force-overwrite
It creates the following files:

Code: Select all

/etc/ssl/private/ssl-cert-snakeoil.key
/etc/ssl/certs/ssl-cert-snakeoil.pem
-Activate Apache SSL module:

Code: Select all

a2enmod ssl
-Activate Apache default ssl virtual host:

Code: Select all

a2ensite default-ssl
-Restart Apache:

Code: Select all

service apache2 restart
You should now be able to access the web server using https://LANserverip/zm (e.g. https://192.168.1.200/zm)

6. Enable portforwarding of 443 port on your router; it depends by your router. On ASUS: go in WAN/Port Forwarding

Service name: HTTPS_Port_Forwarding
Port: 443
Local IP: LANserverip (e.g.: 192.168.1.200)
Local port:443
Protocol: TCP

You should now be able to access the web server using https://WANserverip/zm (e.g. https://5.157.104.224/zm)

Through Dynamic DNS functionalities on your router (if you have: on ASUS and DLink such functionalities are present) or using services like NOIP you could link dynamically you WANserverip to a static host name (e.g. https://hostname/zm).

So, in this way you could expose in a secure way ZM service in WAN (authenticated access and accessible in encrypted way https, so all info flow on WAN will be encrypted) through a static web address.

(*): If you are asked to restart ZM, go in Terminal

Code: Select all

sudo service zoneminder restart
TO BE CONTINUED…

========================================================================
.................................HOW-TO-CONFIGURE-CAMERA................................
========================================================================

4 way is to are (3 easy, the fourth manual):

1. use PRESETS
2. use ONVIF automatic detection
3. googling: inserting model/version camera and the word "zoneminder"
4. manual way

For your inspiration following the confiruration of my 3 types of cameras (founded manually):

I: FOSCAM FI8910W (old PTZ MJPEG model used for indoor)

General
Name: whatever
Server: None
Source Type: Remote
Function: Monitor (to view only)

Source
Remote Protocol: HTTP
Remote Method: Simple
Remote Host: 192.168.1.203
Remote Host Port: 200
Remote Host Path: /videostream.cgi?user=user-on-camera&pwd=pwd-on-camera&rate=3
Target Colorspace: 24 bit color
Capture Width: 640
Capture Height: 480

other values to default, other sheet Control on PTZ commands in next session

II: FOSCAM FI8918W (PTZ FFMPEG model used for indoor)

General
Name: whatever
Server: None
Source Type: Ffmpeg
Function: Modect (to view and to record on mtoion detection, to be deepened how-to set the area and sensibility)

Source
Source Path: rtsp://user-on-camera:pwd-on-camera@192.168.1.206:200/videoSub
Remote Method: TCP
Options: blank
Target Colorspace: 24 bit color
Capture Width: 640
Capture Height: 480

other values to default, other sheet Control on PTZ commands in next session

III: (Jidetech POE PTZ FFMPEG dome model used for outdoor and LEFTEK POE PTZ FFMPEG dome model used for outdoor )

General
Name: whatever
Server: None
Source Type: Ffmpeg
Function: Modect (to view and to record on mtoion detection, to be deepened how-to set the area and sensibility)

Source
Source Path: rtsp://user-on-camera:pwd-on-camera@192.168.1.200:554/1/h264minor
Remote Method: TCP
Options: blank
Target Colorspace: 24 bit color
Capture Width: 640
Capture Height: 480

other values to default, other sheet Control on PTZ commands in next session

TO BE CONTINUED…btw the big project in Istanbul launched succesfully, next week coming back in Italy

========================================================================
.................................HOW-TO-RECORD-ON-SSD.....................................
========================================================================

- install cifs-utils

Code: Select all

sudo apt-get install cifs-utils 
- create directory to mount SSD

Code: Select all

mkdir /home/odroid/Documents/STORAGE 
- edit /etc/fstab

Code: Select all

sudo nano /etc/fstab
-insert the following lines:

note: right UUID of SSD to be discovered through ls -l /dev/disk/by-uuid/*

Code: Select all

#SSD
UUID=BE28A67028A626FD /home/odroid/Documents/STORAGE auto nosuid,nodev,nofail 0 0 
ctrl-O, ctrl-X

Code: Select all

sudo mount -a
reboot if needed

Code: Select all

mkdir /home/odroid/Documents/STORAGE/ZM-IMAGES
mkdir /home/odroid/Documents/STORAGE/ZM-IMAGES/images
mkdir /home/odroid/Documents/STORAGE/ZM-IMAGES/events
mkdir /home/odroid/Documents/STORAGE/ZM-IMAGES/temp

Code: Select all

sudo nano /etc/fstab
-insert the following lines to create a bind:

Code: Select all

/home/odroid/Documents/STORAGE/ZM-IMAGES/images /var/cache/zoneminder/images none defaults,bind 0 0
/home/odroid/Documents/STORAGE/ZM-IMAGES/events /var/cache/zoneminder/events none defaults,bind 0 0
/home/odroid/Documents/STORAGE/ZM-IMAGES/temp /var/cache/zoneminder/temp none defaults,bind 0 0
ctrl-O, ctrl-X

Code: Select all

sudo mount -a

Code: Select all

sudo chown -R www-data:www-data /home/odroid/Documents/STORAGE/ZM-IMAGES
a similar procedure could be followed to mount an USB HD or a network storage disc.

========================================================================
.................................HOW-TO-RECORD-ON-MOTION-DETECTION.................
========================================================================

in Console, click in colum zones, for the camera you want MOTION DETECTION:
click again on the picture,

1. set the area you want to check the detection (leave unchanged if you want the full area)
2. set:

Name: whatever
Type: Active
Unit: Pixels
Alarm Colour: whatever
Alarm check method: Blobs
Min-Max Pix Thresh: 40 - 0
Filter: 5 -5
Min/max Alarmed area: 200 - 0
Min/max Filtered area: 20 - 0
Min/max Blob area: 20 - 0
Min/max Blob
: 2 - 0
Overload Frame: 2

SAVE

put in Console the camera in MODECT mode (column function)

========================================================================
.................................HOW-TO-IMPLEMENT-PTZ-COMMANDS.......................
========================================================================

Enable PTZ commands: go in Options/System: flag on OPT_CONTROL.

in Console, click in colum source, for the camera you want PTZ:

Control
Contrallable: flag
Control Type: choose your camera model
Control device: according tp your model (in my case blank)
Control address: camera_ip:camera_port (in my case 192.168.1.200:8999)

SAVE

THE END
Last edited by pat2 on Sat Mar 16, 2019 7:08 pm, edited 11 times in total.

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Thu Mar 07, 2019 2:21 pm

Thank you for the guide.
I've ordered this cheap(us$45 in Korea) IP camera with a cheap 4-port PoE fast-Ethernet switch to learn how to build an affordable farmer's security system with ZM+XU4. ;)
https://www.hikvision.com/es-la/Product ... -2CD1021-I

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Thu Mar 07, 2019 3:52 pm

Cool, it supports H.264+, whatever that is :D

@odroid: when you'll hook it up try without downgrading ffmpeg. If the video stream is error-free, it should work

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Thu Mar 07, 2019 4:13 pm

@mad_ady,
Okay. I will try the pre-installed(MFC accelerated) ffplay on Ubuntu 18.04 with non-encrypted RTSP streaming mode first.
I will create another topic once I receive the toys early next week.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Thu Mar 07, 2019 4:56 pm

You can test that it works from the command line with something like ffmpeg -i rtsp://webcamip/stream.sdp test.mkv. If it starts transcoding, it should be fine. Would be worth doing a long-term test. If the camera image breaks down (there's packet loss for whatever reason) it's important that the stream doesn't stop. In ZoneMinder's case it shouldn't be an issue. If it looses connection to the webcam it will reestablish it automatically.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Thu Mar 07, 2019 10:59 pm

hi, odroid, mad, the guide is not complete. i will continue...missing how to congigure the cameras in ZM and some addtional tricks...
I'm in Istanbul for the launch of big ICT project (4,5 mio eur)...I'm the big boss :-(...

for cameras: if indoor whatever, better FFmpeg, better if PTZ command available.
for outdoor I bought:

https://www.amazon.it/gp/product/B0746F ... UTF8&psc=1

cheap, ffmpeg and PTZ..

User avatar
memeka
Posts: 4321
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by memeka » Fri Mar 08, 2019 10:13 am

“Save 20% on these Foscam 1080p Wi-Fi-enabled Pan/Tilt Security Cameras from $44 shipped“

Wifi + Ethernet, PTZ, $44 shipped

https://amzn.to/2VKbxof

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by joy » Fri Mar 08, 2019 12:22 pm

@pat2,
Awesome project!
I'm looking forward to your next guide to configure cameras with ZM.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Sat Mar 09, 2019 4:43 am

@joy, additional info will be added. :-)

i will suggest configurations for my mjpeg cameras (it's similar to other mjpeg cameras) and my FFmpeg cameras(it's similar to other ffmpeg cameras), and other info...

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Tue Mar 12, 2019 12:18 pm

I've received the camera and PoE switch and connected them to my XU4Q.
Pre-installed ffplay can do a nice preview job with H.264 1080p RTSP streaming after tweaking a few camera configurations. :D
I also enabled the ONVIF mode. My RTSP URL is rtsp://odroid:odroid@192.168.1.4:554/Streaming/Channels/101/
s5p-mfc message looks okay and I believe the hardware accelerated decoder works fine even though there are some mosaic tiles very rarely.

I'm installing the LAMP now with sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql.
What is the next step to install ZM 1.32?
Should I jump into this complicated guide?
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Mar 12, 2019 5:55 pm

@odroid: you should try these steps: viewtopic.php?f=95&t=33745#p245965

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Tue Mar 12, 2019 6:40 pm

Ok. I've tried that link.

Code: Select all

sudo add-apt-repository ppa:iconnor/zoneminder-1.32
sudo apt install zoneminder

Code: Select all

sudo -i
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/
a2enmod cgi
a2enmod rewrite
a2enconf zoneminder
a2enmod expires
a2enmod headers
systemctl enable zoneminder
systemctl start zoneminder
vi /etc/php/7.2/apache2/php.ini
And changed the [Date] field to date.timezone = Asia/Seoul

And restarted the apache.

Code: Select all

systemctl reload apache2 
Connected to my XU4Q IP from a web browser and I can see ZM 1.32.3 GUI now. :D
I will follow the second stage viewtopic.php?f=95&t=33745&p=248904#p248289 tomorrow.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Wed Mar 13, 2019 12:03 am

hahahah :-) great, Odroid!

I didn't complete the guide.

Three important missing points are:

1. how-to record on external USB SSD/HD or a network SSD/HD (insteat of eMMC or SD card),
2. how-to tune the motion detection that triggers video rercoding,
3. how-to implement camera PTZ commands (for camera motion).

ciao

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Wed Mar 13, 2019 9:01 am

I'm waiting for the missing points.
I have to resume my personal project from the camera configuration next week due to a couple of urgent issues.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Sat Mar 16, 2019 7:09 pm

Done!

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Sun Apr 07, 2019 8:54 pm

did anyone used this wiki?
odroid, and you? is your farm currently protected with cameras? :-)

I moved all services, include ZM, on Odroid XU4 from Radxa Rock.
Radxa is more powerfull of Raspberry, but not comparble with odroid XU4.
So, XU4 really fast.

Odroid, mad, memeka, thanks a lot for your support.

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by odroid » Mon Apr 08, 2019 8:12 am

Unfortunately, I'm still very busy to support the N2 production/shipping these days. ;)
I hope I can resume my ZM project a couple of weeks later.
I have to seed some potato and corns by early May and I hope my security system works to protect them against wild animals from that time frame.

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Wed Apr 10, 2019 1:53 am

:-) ok, Odroid.
let me know if you need support to setup ZM.

bye

detxm80
Posts: 9
Joined: Mon Apr 15, 2019 6:12 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by detxm80 » Mon Apr 15, 2019 6:16 am

i guys, i bought the xu4 for create a zoneminder server and now i look that can't video register :( :(

i try your guide (rebuild ffmpeg) but without success (ubuntu 18.04 zoneminder 1.32).
What is the way to have a system ready?
thanks

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Mon Apr 15, 2019 2:21 pm

Were you unable to compile ffmpeg, or did you download the debs I provided?

detxm80
Posts: 9
Joined: Mon Apr 15, 2019 6:12 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by detxm80 » Mon Apr 15, 2019 11:23 pm

mad_ady wrote:
Mon Apr 15, 2019 2:21 pm
Were you unable to compile ffmpeg, or did you download the debs I provided?
i downloaded it
(for example i've Dlink 5020l camera)

and if i try to set on "save jpegs" this is the result:
Attachments
Screenshot (1).png
Screenshot (1).png (41.13 KiB) Viewed 1554 times
Screenshot.png
Screenshot.png (57.18 KiB) Viewed 1555 times

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Apr 16, 2019 12:15 am

Do you see the correct video stream in preview mode?

detxm80
Posts: 9
Joined: Mon Apr 15, 2019 6:12 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by detxm80 » Tue Apr 16, 2019 12:16 am

mad_ady wrote:
Tue Apr 16, 2019 12:15 am
Do you see the correct video stream in preview mode?
absolutely yes

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Apr 16, 2019 12:32 am

I don't remember exactly, but I think there are several options for saving - can yoi try a non-ffmpeg one?

detxm80
Posts: 9
Joined: Mon Apr 15, 2019 6:12 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by detxm80 » Tue Apr 16, 2019 12:57 am

i've only dlink cameras.....my problem is that zm not recording video, jpeg yes but video i'm able to select only disabled

i've buy xu4 only for this purpose :( :( :(

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Tue Apr 16, 2019 2:18 am

So it can save "recordings" in jpeg format as a list of files, right? And those play back fine, right?

See if the zmf component logs anything interesting: http://manpages.ubuntu.com/manpages/bio ... der.1.html

detxm80
Posts: 9
Joined: Mon Apr 15, 2019 6:12 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by detxm80 » Tue Apr 16, 2019 2:46 am

mad_ady wrote:
Tue Apr 16, 2019 2:18 am
So it can save "recordings" in jpeg format as a list of files, right? And those play back fine, right?

See if the zmf component logs anything interesting: http://manpages.ubuntu.com/manpages/bio ... der.1.html
Yes, but i don’t understad what do you mean with this link.
Previously i used ubuntu 18.04 on intel server and all gone ok...
Sorry but english isn’t my mother language

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Sat Apr 20, 2019 11:40 pm

hi detxm80,

with HK 18.04 image, through the patch suggested by the great mad_ady (*) you could play and re-play (recorded images) streams from ffmpeg cameras on the last ZM.
For mjpeg cameras you could play and NOT re-play (recorded images). It's an issue of the last ZM versions.

I solved the issue installing HK 16.04 image (in this case no need of the patch by mad_ady) and ZM 1.30.4 or ZM 1.29.
All is working fine. MJPEG and FFMPEG cameras. Play and re-play.
Please, tell me if you need support. :-)

(*): both methods suggested by mad are working:

1. directly downloading the files from the mad site
2. re-building ffmpeg with the additional option -v4l2m2m as suggested by mad (more time expensive, but very interesting from a learning standpoint)


Note: Odroid XU4 is very powerfull: i'm running too on odroid beside ZM services, my web site, a DLNA server (to watch video by my home TV) and a file server.Note:
These users thanked the author pat2 for the post:
mad_ady (Sun Apr 21, 2019 12:57 am)

dchang0
Posts: 126
Joined: Tue Dec 22, 2015 1:29 pm
languages_spoken: english
ODROIDs: C1+, XU4Q
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by dchang0 » Mon Jun 17, 2019 2:54 am

I'm a bit late to this party, but with some interesting input.

I've got the same problem that pat2 had in the original post.

HOWEVER, I have always been able to successfully capture directly from the camera's RTSP stream using ffmpeg at the command line. I'm using the standard ffmpeg and zoneminder (1.32.3) packages straight from the standard repository on the standard Odroid Ubuntu 18.04 image on an HC1.

So this seems to indicate the problem is really in zoneminder, even if messing with the ffmpeg command fixed it. It doesn't negate the great work you guys did, but it suggests another parallel fix may be available, one that focuses on zoneminder and how it calls ffmpeg.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Mon Jun 17, 2019 4:34 am

I'm more thinking that the cameras make a difference. Some output a slightly non standard or not supported stream that makes ffmpeg choke with the hardware decoder. The software decoder is much more tollerant to bad input. I had the same problems with the xu4's hardware encoder when trying to encode mpeg2ts from a tv recording. It would lock up when there was a bad packet/frame.
So = my advice is - try with the stock ffmpeg first. If it doesn't work downgrade to a software-only one.
These users thanked the author mad_ady for the post:
dchang0 (Tue Jul 16, 2019 6:06 am)

dchang0
Posts: 126
Joined: Tue Dec 22, 2015 1:29 pm
languages_spoken: english
ODROIDs: C1+, XU4Q
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by dchang0 » Wed Jul 17, 2019 2:01 am

mad_ady wrote:
Sun Feb 10, 2019 11:52 pm

There's also a zoneminder alternative you can try - can't remember the name, something japanese sounding - was featured in odroid magazine.
It's shinobi.video.

I'm going to try Shinobi and dump Zoneminder 1.32.3. I can't downgrade my HC2 to Ubuntu 16.04 from 18.04 due to some other software I'm running on it.

I tried building ffmpeg from source with ./configure --disable-v412-m2m, but it Zoneminder fails in the same way as with the HK-provided ffmpeg.
Both ffmpeg binaries I have (HK version and built-from-source) are able to capture the camera's video perfectly when run at the command line.

I also tried installing the latest Zoneminder on Ubuntu 18.04 for amd64 on a VM and it works perfectly with the camera I have, so it's definitely not the camera.

I think it's a bug between Zoneminder 1.32.3 and the XU4's Ubuntu 18.04, but I won't be digging further to find out.

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by mad_ady » Wed Jul 17, 2019 4:40 am

One key difference between shinobi and ZM is that shinobi uses ffmpeg directly (instead of the library), so you can experiment/tweak more. It's a newer project too.

dchang0
Posts: 126
Joined: Tue Dec 22, 2015 1:29 pm
languages_spoken: english
ODROIDs: C1+, XU4Q
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by dchang0 » Wed Jul 17, 2019 5:11 am

mad_ady wrote:
Wed Jul 17, 2019 4:40 am
One key difference between shinobi and ZM is that shinobi uses ffmpeg directly (instead of the library), so you can experiment/tweak more. It's a newer project too.
Works great too. I followed the vanilla installation from source, and it immediately started working with my camera. I am up and running in just 15 minutes.

Technicavolous
Posts: 55
Joined: Mon May 30, 2016 12:17 pm
languages_spoken: Southern US English
ODROIDs: :

XU4 -> CloudShell, BoomBonnet,
eMMC64/Ubuntu
eMMC16/Armbian

C2 -> VU7, HiFiShield2
SD/Ubuntu
eMMC16/Armbian

HC1 -> http://ww2.tech-party.us
SD/Ubuntu
SD/Armbian
.
Location: Howey In The Hills, FL
Has thanked: 0
Been thanked: 0
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by Technicavolous » Wed Jul 17, 2019 6:15 pm

I've been watching this thread for a while and until a few minutes ago I was really excited ...

I have ZoneMinder servers on x86 hardware in full commercial production environments for years. It's tedious but it works well. I've thought about it on an SBC but haven't tried. THIS thread makes me realize its viable.

I've used Zoneminders paid support. In the field, time is money and it's great to make a call and get help or get quick directions via email. $100 / hr may seem stiff but compared to other paid support it's reasonable. They have been prompt with me on the few occasions I've needed them.

Since I do this for a living I use this kind of software according to its legal boundaries. Shinobi has a license structure that prohibits me from using the "community" edition.

Shinobi technically looks cool for playing around with, but commercially, from zero cost to $900 / year with no in between??

OK, that's a little misleading ... but their pricing notes are confusing. In one place they say Pro is $75 / month (https://shinobi.video/pro). The 'Get' link takes you to a Gitlab page to download, and at the bottom it encourages you to purchase support on this page (https://shinobi.video/support). Here there are $10 and $50 / month plans but no $75 / month. And the checkmark for 'PRO' is only on the $1000 / month plan?? I'm seriously confused about commercially using this 'free' software ...

Should we have 'The Shinobi Conversation' in another thread? ;]

I'm convinced now to step up and give ZoneMinder a go on my XU4 and C2's.

.
What box?

pat2
Posts: 65
Joined: Sun Jan 06, 2019 2:22 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Zoneminder and Odroid XU4 - needed a working setup!

Unread post by pat2 » Fri Jul 19, 2019 2:02 am

:-) happy to know ZM interested some forumers.

It's not easy to configure cameras, but I'm really satisfied at home. it's completely free.

Give it a try.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests