「Shinobi」の版間の差分
(→インストール: 同期) |
(最新の英語版から転載) |
||
20行目: | 20行目: | ||
# root のみが実行できるため、1000 未満のポートへのバインドは機能しません。これは、FTP または SMTP を使用してモーション/オブジェクト検出を受信する場合にのみ関係します。いくつかの回避策オプションについては、[[#カメラ内からの動き/物体検出]] を参照してください。}} |
# root のみが実行できるため、1000 未満のポートへのバインドは機能しません。これは、FTP または SMTP を使用してモーション/オブジェクト検出を受信する場合にのみ関係します。いくつかの回避策オプションについては、[[#カメラ内からの動き/物体検出]] を参照してください。}} |
||
− | == |
+ | == Configuration == |
+ | |||
=== Install and set up the MariaDB server === |
=== Install and set up the MariaDB server === |
||
− | Refer to [[MariaDB#Installation]] for initial setup, then to create a database for Shinobi, use the following commands: |
||
+ | Refer to [[MariaDB#Installation]] for initial setup, then use the following commands to create a database for Shinobi: |
||
− | $ mysql -u root -p |
||
+ | |||
− | <<enter the mariadb root password assigned in the first step>> |
||
+ | # mysql |
||
− | MariaDB [(none)]> CREATE DATABASE ccio; flush privileges; \q |
||
+ | > CREATE DATABASE ccio; flush privileges; \q |
||
+ | |||
+ | Create Shinobi's user {{ic|majesticflame}} and grant it all privileges to the new database: |
||
+ | |||
+ | # mysql < /usr/share/shinobi/sql/user.sql |
||
+ | |||
+ | {{Note|{{AUR|shinobi-git}} depends on {{Pkg|mariadb}}, so MariaDB will be installed on the same server as Shinobi. However if you installed Shinobi manually or without the {{Pkg|mariadb}} dependency with MariaDB installed on a separate server, then you will need to copy and modify {{ic|/usr/share/shinobi/sql/user.sql}} as needed if, for example, your LAN IP is '''192.168.9.100'''. |
||
− | === Setup Shinobi === |
||
− | Create the user and setup database framework: |
||
− | First substitute 127.0.0.1 with the LAN IP address of the server. For example, if this is '''192.168.9.100''': |
||
$ sed 's/127.0.0.1/192.168.9.100/g' < /usr/share/shinobi/sql/user.sql > /tmp/user.sql |
$ sed 's/127.0.0.1/192.168.9.100/g' < /usr/share/shinobi/sql/user.sql > /tmp/user.sql |
||
+ | |||
+ | Then copy the file to your MariaDB server with [[SCP and SFTP#General Usage|scp]] or any other mechanism then running the modified sql file: |
||
+ | |||
# mysql < /tmp/user.sql |
# mysql < /tmp/user.sql |
||
+ | }} |
||
+ | |||
+ | Finally populate the database with tables: |
||
+ | |||
# mysql ccio < /usr/share/shinobi/sql/framework.sql |
# mysql ccio < /usr/share/shinobi/sql/framework.sql |
||
+ | === Setup Shinobi === |
||
− | Next, edit {{ic|/etc/shinobi/conf.json}} changing both instances of '''127.0.0.1''' to match the actual IP address of the server. |
||
+ | |||
+ | {{Note|If MariaDB is on a separate server, edit {{ic|/etc/shinobi/conf.json}} and replace '''127.0.0.1''' under {{ic|db.host}}.}} |
||
+ | |||
+ | Customize {{ic|/etc/shinobi/conf.json}} as desired. |
||
Optionally setup the mail section accordingly as well as replacing the cron key with something random as indicated in the comments. |
Optionally setup the mail section accordingly as well as replacing the cron key with something random as indicated in the comments. |
||
− | Optionally change |
+ | Optionally change the super admin password by editing {{ic|/etc/shinobi/super.json}} and replacing the value for "pass" with an md5sum hashed password. Generate one like this: |
− | echo -n PASSWORD | md5sum |
||
+ | $ echo -n PASSWORD | md5sum |
||
− | [[Start]] and [[Enable]] shinobi. Browse to http://192.168.9.100:8080/super to perform initial setup including creating a user/users. See the official [https://shinobi.video/docs/configure configure guide] for a walk-through. Once finished, browse to http://192.168.9.100:8080 and log in as the non-admin user. |
||
+ | |||
+ | [[Start]] and [[enable]] shinobi with the {{ic|shinobi.target}} unit. {{ic|shinobi.target}} will start/stop {{ic|shinobi-camera.service}} and {{ic|shinobi-cron.service}}. Browse to http://localhost:8080/super to perform initial setup including creating a user/users. See the official [https://shinobi.video/docs/configure configure guide] for a walk-through. Once finished, browse to http://localhost:8080 and log in as the non-admin user. |
||
+ | |||
+ | {{Note|Replace '''localhost''' with a LAN IP if on a separate computer and replace '''127.0.0.1''' under {{ic|ip}} in {{ic|/etc/shinobi/conf.json}}. }} |
||
== Android and iOS apps == |
== Android and iOS apps == |
||
+ | |||
Shinobi Mobile Apps for both Android and iOS are available though [https://cdn.shinobi.video/installers/ShinobiMobile/ this] public test. |
Shinobi Mobile Apps for both Android and iOS are available though [https://cdn.shinobi.video/installers/ShinobiMobile/ this] public test. |
||
+ | |||
+ | == Tips and tricks == |
||
+ | |||
+ | === Delay between camera video and Shinobi === |
||
+ | |||
+ | Some level of a lag or delay between the camera and the Shinobi dashboard is normal and dependent on stream type and video settings. See [https://hub.shinobi.video/articles/view/Eug1dxIdhwY6zTw upstream documentation] for some tips on minimizing the delay. |
||
+ | |||
+ | === Motion/object detection natively in Shinobi === |
||
+ | |||
+ | Shinobi can monitor a video feed and only record if motion is detected. Full frame or trigger areas are natively supported. See the [https://shinobi.video/docs/configure#content-setting-up-motion-detection setting-up-motion-detection] article of upstream's documentation. |
||
+ | |||
+ | === Motion/object detection from within the camera === |
||
+ | |||
+ | Some camera manufactures offer native motion/object detection within the firmware of the camera itself. Shinobi can accept external event to trigger a record when motion is detected by the camera and these events are communicated by either [https://hub.shinobi.video/articles/view/Qdu39Dp8zDqWIA0 SMTP] or [https://shinobi.video/articles/2019-02-23-how-to-use-ftpbased-event-triggering-in-shinobi FTP]. |
||
+ | |||
+ | {{Note|Adjustment to a higher value to the '''Segment length''' variable might be needed if there is a lag between when the camera detects motion and when Shinobi triggers the start of video. To test this, simply watch the live stream while someone triggers motion. Observe the time from the camera's clock when the motion was triggered and compare that to the video. Set a higher value and test again.}} |
||
+ | |||
+ | Since our package is not running {{ic|node}} as root, it cannot use the native ports for these services (25 for STMP and 21 for FTP). |
||
+ | |||
+ | It is recommended to simply select a port above 1,000 for these services on Shinobi and within the camera. |
||
+ | |||
+ | If using the native ports is a hard requirement, use a [[drop-in snippet]] for {{ic|shinobi-camera.service}}: |
||
+ | |||
+ | [Service] |
||
+ | AmbientCapabilities=CAP_NET_BIND_SERVICE |
||
+ | |||
== Resources == |
== Resources == |
||
+ | |||
* [https://shinobi.video/docs/ Shinobi docs] - Official docs and guides. |
* [https://shinobi.video/docs/ Shinobi docs] - Official docs and guides. |
||
* [https://www.ispyconnect.com/cameras iSpy camera database] - Large database of URLs for various cameras. |
* [https://www.ispyconnect.com/cameras iSpy camera database] - Large database of URLs for various cameras. |
2024年3月26日 (火) 22:15時点における版
関連記事
Shinobi は Node.js で記述された最新のオープンソース NVR(Network Video Recorder) です。個人または教育のための使用であれば、Pro バージョンの使用にライセンスキーは必要ありません。商用目的の使用の場合は、このページを参照してください。
目次
インストール
shinobi-gitAUR を インストール して下さい。
Configuration
Install and set up the MariaDB server
Refer to MariaDB#Installation for initial setup, then use the following commands to create a database for Shinobi:
# mysql > CREATE DATABASE ccio; flush privileges; \q
Create Shinobi's user majesticflame
and grant it all privileges to the new database:
# mysql < /usr/share/shinobi/sql/user.sql
Finally populate the database with tables:
# mysql ccio < /usr/share/shinobi/sql/framework.sql
Setup Shinobi
Customize /etc/shinobi/conf.json
as desired.
Optionally setup the mail section accordingly as well as replacing the cron key with something random as indicated in the comments.
Optionally change the super admin password by editing /etc/shinobi/super.json
and replacing the value for "pass" with an md5sum hashed password. Generate one like this:
$ echo -n PASSWORD | md5sum
Start and enable shinobi with the shinobi.target
unit. shinobi.target
will start/stop shinobi-camera.service
and shinobi-cron.service
. Browse to http://localhost:8080/super to perform initial setup including creating a user/users. See the official configure guide for a walk-through. Once finished, browse to http://localhost:8080 and log in as the non-admin user.
Android and iOS apps
Shinobi Mobile Apps for both Android and iOS are available though this public test.
Tips and tricks
Delay between camera video and Shinobi
Some level of a lag or delay between the camera and the Shinobi dashboard is normal and dependent on stream type and video settings. See upstream documentation for some tips on minimizing the delay.
Motion/object detection natively in Shinobi
Shinobi can monitor a video feed and only record if motion is detected. Full frame or trigger areas are natively supported. See the setting-up-motion-detection article of upstream's documentation.
Motion/object detection from within the camera
Some camera manufactures offer native motion/object detection within the firmware of the camera itself. Shinobi can accept external event to trigger a record when motion is detected by the camera and these events are communicated by either SMTP or FTP.
Since our package is not running node
as root, it cannot use the native ports for these services (25 for STMP and 21 for FTP).
It is recommended to simply select a port above 1,000 for these services on Shinobi and within the camera.
If using the native ports is a hard requirement, use a drop-in snippet for shinobi-camera.service
:
[Service] AmbientCapabilities=CAP_NET_BIND_SERVICE
Resources
- Shinobi docs - Official docs and guides.
- iSpy camera database - Large database of URLs for various cameras.
- Shinobi camera database - Searchable database of supported cameras including things such as protocols, URLs for streams, and other technical specs.
- Home assistant camera database - Another resource for finding URLs for streams.