Merge branch 'master' of github:OpenIPC/wiki

pull/243/head
Igor Zalatov 2023-11-08 17:36:10 +03:00
commit 015556d889
2 changed files with 38 additions and 16 deletions

View File

@ -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
```
---

View File

@ -34,35 +34,41 @@ 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:
Enable motion detection in `majestic` configuration:
```
#!/bin/sh
echo [$0] [$1] [$2] [$3] [$4] [$5]
cli -s .motionDetect.enabled true
cli -s .motionDetect.visualize true
cli -s .motionDetect.debug true
cli -s .osd.enabled true
```
Final result:
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 <SED_IVE_DETCTOR> [ motion] motion_update@155 Motion detected: [1163x0] -> [690x475]
20:37:02 <SED_IVE_DETCTOR> [ tools] motion_event@615 Execute motion script: /usr/share/openipc/motion_detect.sh
[/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:
@ -86,6 +92,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: