From 137ecb2e65861a92f1cdf3dd3d457da85554435d Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Wed, 8 Nov 2023 07:57:12 +0100 Subject: [PATCH 1/5] Update device-foscam-x5.md (#238) --- en/device-foscam-x5.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/en/device-foscam-x5.md b/en/device-foscam-x5.md index 8f5da4a..9483dae 100644 --- a/en/device-foscam-x5.md +++ b/en/device-foscam-x5.md @@ -23,15 +23,17 @@ Update your wireless credentials on autostart.sh: --- ### GPIO -IRLed | IRCut | Reset | IRSensor --|-|-|- -GPIO0 | GPIO3 | GPIO66 | GPIO80 +IRLed | IRCut | Speaker | Reset | IRSensor +-|-|-|-|- +GPIO0 | GPIO3 | GPIO14 | GPIO66 | GPIO80 ``` cli -s .nightMode.irSensorPin 80 cli -s .nightMode.irCutPin1 3 cli -s .nightMode.irCutSingleInvert true cli -s .nightMode.backlightPin 0 +cli -s .audio.speakerPin 14 +cli -s .audio.speakerPinInvert true ``` --- From b9cec36e60292e7ad980bc15a2d00178f832c74f Mon Sep 17 00:00:00 2001 From: Signor Pellegrino <68112357+FlyRouter@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:13:27 +0300 Subject: [PATCH 2/5] Update majestic-streamer.md --- en/majestic-streamer.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/en/majestic-streamer.md b/en/majestic-streamer.md index 9b01176..a41231b 100644 --- a/en/majestic-streamer.md +++ b/en/majestic-streamer.md @@ -86,6 +86,20 @@ Examples of other addresses for different services: We ask that you add information about other popular services here, thank you. +### ROI + +Detection zones of two types: + +`motionDetect.roi: 1854x1304x216x606,1586x1540x482x622` + +`motionDetect.skipIn: 960x540x1920x1080` + +**roi** - region of interest, when we specify one or more regions whose movements we are interested in. + +**skipIn** - on the contrary, if we are interested in movements on the whole screen, except for some areas (for example, there is a tree in the frame, which is swaying in the wind). + +Coordinate format is the same as in osd.privacyMasks: x,y of the top left point, length and width in pixels. + ### How to convert YUV image to a more common image format Use `convert` command from ImageMagick software. Run it like this: From b1966d501184dbf8c860a897ff4298f11cd5860f Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Wed, 8 Nov 2023 02:16:13 -0500 Subject: [PATCH 3/5] Update motion detection instruction --- en/majestic-streamer.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/en/majestic-streamer.md b/en/majestic-streamer.md index 9b01176..5159c27 100644 --- a/en/majestic-streamer.md +++ b/en/majestic-streamer.md @@ -34,23 +34,44 @@ cli -s .video0.codec h264 ; cli -s .video0.fps 10 ; killall -1 majestic The experiments continue... + ### Motion detection -Motion detect is supported for Hisilion/Goke, Ingenic and Sigmastar, the script file needs to be located at: -`/usr/share/openipc/motion_detect.sh` +Motion detect is supported for Hisilion/Goke, Ingenic and Sigmastar. +When a motion event is detected, `majestic` invokes a predefined script +`/usr/share/openipc/motion_detect.sh` with parameters specifying the motion +activity and zone: -The following will be executed on a motion event: ``` /usr/share/openipc/motion_detect.sh [object count] [x coordinate] [y coordinate] [region width] [region height] ``` -Example script: +To test the motion detection, create a simple script that echoes the parameters to the output: + ``` -#!/bin/sh +mkdir -p /usr/share/openipc +echo "#!/bin/sh echo [$0] [$1] [$2] [$3] [$4] [$5] +" > /usr/share/openipc/motion_detect.sh ``` -Final result: +Enable motion detection in `majestic` configuration: + +``` +cli -s .motionDetect.enabled true +cli -s .motionDetect.visualize true +cli -s .motionDetect.debug true +cli -s .osd.enabled true +``` + +Reboot the camera and restart `majestic` in the foreground: + +``` +killall majestic; sleep 3; majestic +``` + +You should see the script running after motion detection events: + ``` 20:37:02 [ motion] motion_update@155 Motion detected: [1163x0] -> [690x475] 20:37:02 [ tools] motion_event@615 Execute motion script: /usr/share/openipc/motion_detect.sh From 95515e4037a5be28258805bd443236993c7b9ba2 Mon Sep 17 00:00:00 2001 From: Signor Pellegrino <68112357+FlyRouter@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:23:12 +0300 Subject: [PATCH 4/5] Update majestic-streamer.md --- en/majestic-streamer.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/en/majestic-streamer.md b/en/majestic-streamer.md index 3c53128..0b416a3 100644 --- a/en/majestic-streamer.md +++ b/en/majestic-streamer.md @@ -50,9 +50,7 @@ To test the motion detection, create a simple script that echoes the parameters ``` mkdir -p /usr/share/openipc -echo "#!/bin/sh -echo [$0] [$1] [$2] [$3] [$4] [$5] -" > /usr/share/openipc/motion_detect.sh +echo -e "#!/bin/sh\n\necho [\$0] [\$1] [\$2] [\$3] [\$4] [\$5]\n" > /usr/share/openipc/motion_detect.sh ``` Enable motion detection in `majestic` configuration: From 944f4427cd582a92be7a5a4633f9fdeb8070fcd5 Mon Sep 17 00:00:00 2001 From: Signor Pellegrino <68112357+FlyRouter@users.noreply.github.com> Date: Wed, 8 Nov 2023 13:44:35 +0300 Subject: [PATCH 5/5] Update majestic-streamer.md --- en/majestic-streamer.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/en/majestic-streamer.md b/en/majestic-streamer.md index 0b416a3..7315603 100644 --- a/en/majestic-streamer.md +++ b/en/majestic-streamer.md @@ -46,13 +46,6 @@ activity and zone: /usr/share/openipc/motion_detect.sh [object count] [x coordinate] [y coordinate] [region width] [region height] ``` -To test the motion detection, create a simple script that echoes the parameters to the output: - -``` -mkdir -p /usr/share/openipc -echo -e "#!/bin/sh\n\necho [\$0] [\$1] [\$2] [\$3] [\$4] [\$5]\n" > /usr/share/openipc/motion_detect.sh -``` - Enable motion detection in `majestic` configuration: ``` @@ -76,12 +69,6 @@ You should see the script running after motion detection events: [/usr/share/openipc/motion_detect.sh] [1] [1163] [0] [690] [475] ``` -More info: -- https://github.com/OpenIPC/majestic/issues/28 -- https://github.com/OpenIPC/majestic/issues/117 - -The experiments continue... - ### Broadcasts using RTMP To instantly launch a YouTube broadcast, run these commands in the console: