「Shinobi」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(最新の英語版から転載)
(同期)
 
(同じ利用者による、間の4版が非表示)
6行目: 6行目:
 
{{Related|ZoneMinder}}
 
{{Related|ZoneMinder}}
 
{{Related articles end}}
 
{{Related articles end}}
[https://shinobi.video/ Shinobi] は Node.js で記述された最新のオープンソース NVR(Network Video Recorder) です。個人または教育のための使用であれば、Pro バージョンの使用にライセンスキーは必要ありません。商用目的の使用の場合は、[https://hub.shinobi.video/articles/view/QDD2cqvbTekzhar この]ペを参照してください。
+
[https://shinobi.video/ Shinobi] は Node.js で記述された最新のオープンソース NVR(Network Video Recorder) です。個人または教育のための使用であれば、Pro バージョンの使用にライセンスキーは必要ありません。商用目的の使用の場合は、この [https://hub.shinobi.video/articles/view/QDD2cqvbTekzhar アップストリムドキュメント] を参照してください。
   
 
{{Note|h.265 をサポートするカメラは、Shinobi ダッシュボードのブラウザでは表示できません。録画(ビデオのコピー)は引き続き機能しますが、ブラウザを使用して表示することはできません。モバイルアプリを使って、これらのストリームを表示できます。}}
 
{{Note|h.265 をサポートするカメラは、Shinobi ダッシュボードのブラウザでは表示できません。録画(ビデオのコピー)は引き続き機能しますが、ブラウザを使用して表示することはできません。モバイルアプリを使って、これらのストリームを表示できます。}}
20行目: 20行目:
 
# root のみが実行できるため、1000 未満のポートへのバインドは機能しません。これは、FTP または SMTP を使用してモーション/オブジェクト検出を受信する場合にのみ関係します。いくつかの回避策オプションについては、[[#カメラ内からの動き/物体検出]] を参照してください。}}
 
# root のみが実行できるため、1000 未満のポートへのバインドは機能しません。これは、FTP または SMTP を使用してモーション/オブジェクト検出を受信する場合にのみ関係します。いくつかの回避策オプションについては、[[#カメラ内からの動き/物体検出]] を参照してください。}}
   
== Configuration ==
+
== 設定 ==
   
  +
=== MariaDB サーバーのインストールとセットアップ ===
=== Install and set up the MariaDB server ===
 
   
  +
初期設定については [[MariaDB#インストール]] を参照し、次のコマンドを使用して Shinobi 用のデータベースを作成します:
Refer to [[MariaDB#Installation]] for initial setup, then use the following commands to create a database for Shinobi:
 
   
 
# mysql
 
# mysql
 
> 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:
+
Shinobi のユーザー {{ic|majesticflame}} を作成し、新しいデータベースに対するすべての権限を付与します:
   
 
# mysql < /usr/share/shinobi/sql/user.sql
 
# 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'''.
+
{{Note|{{AUR|shinobi-git}} {{Pkg|mariadb}} に依存するため、MariaDB Shinobi と同じサーバーにインストールされます。ただし、Shinobi を手動でインストールした場合や、MariaDB を別のサーバーにインストールして {{Pkg|mariadb}} 依存関係を使用せずにインストールした場合は、{{ic|/usr/share/shinobi/sql/user.sql}} をコピーして変更する必要があります。例えば、LAN IP '''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
   
  +
次に、[[SCP と SFTP#一般的な使用方法|scp]] またはその他のメカニズムを使用してファイルを MariaDB サーバーにコピーし、変更した 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 ===
+
=== Shinobi のセットアップ ===
   
{{Note|If MariaDB is on a separate server, edit {{ic|/etc/shinobi/conf.json}} and replace '''127.0.0.1''' under {{ic|db.host}}.}}
+
{{Note|MariaDB が別のサーバー上にある場合は、{{ic|/etc/shinobi/conf.json}} を編集し、{{ic|db.host}} の下の '''127.0.0.1''' を置き換えます。}}
   
Customize {{ic|/etc/shinobi/conf.json}} as desired.
+
必要に応じて {{ic|/etc/shinobi/conf.json}} をカスタマイズします。
   
  +
必要に応じて、メールセクションを設定し、コメントに示されているように cron キーをランダムなものに置き換えます。
Optionally setup the mail section accordingly as well as replacing the cron key with something random as indicated in the comments.
 
   
  +
必要に応じて、{{ic|/etc/shinobi/super.json}} を編集し、"pass" の値を md5sum ハッシュ化されたパスワードに置き換えることにより、スーパー管理者パスワードを変更します。次のようなものを生成します。
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 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.
+
shinobi.target ユニットを使用して Shinobi を [[起動]]/[[有効化]] します。{{ic|shinobi.target}} {{ic|shinobi-camera.service}} {{ic|shinobi-cron.service}} を起動/停止します。http://localhost:8080/super にアクセスして、ユーザーの作成を含む初期セットアップを実行します。ウォークスルーについては、[https://shinobi.video/docs/configure 公式の設定ガイド] を参照してください。完了したら、http://localhost:8080 にアクセスし、管理者以外のユーザーとしてログインします。
   
{{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}}. }}
+
{{Note|別のコンピューター上の場合は '''localhost''' LAN IP に置き換え、{{ic|/etc/shinobi/conf.json}} {{ic|ip}} の下にある '''127.0.0.1'''を置き換えます。}}
   
== Android and iOS apps ==
+
== Android および iOS アプリ ==
   
Shinobi Mobile Apps for both Android and iOS are available though [https://cdn.shinobi.video/installers/ShinobiMobile/ this] public test.
+
Android iOS の両方の Shinobi モバイルアプリは、[https://cdn.shinobi.video/installers/ShinobiMobile/ この] 公開テストを通じて利用できます。
   
  +
== ヒントとテクニック ==
== Tips and tricks ==
 
   
  +
=== カメラ映像と Shinobi の間の遅延 ===
=== Delay between camera video and Shinobi ===
 
   
  +
カメラと Shinobi ダッシュボードの間にある程度の遅れや遅れが生じるのは正常であり、ストリームの種類とビデオ設定によって異なります。遅延を最小限に抑えるためのヒントについては、[https://hub.shinobi.video/articles/view/Eug1dxIdhwY6zTw アップストリームドキュメント] を参照してください。
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.
 
   
  +
=== Shinobi でネイティブにモーション/オブジェクトを検出 ===
=== 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.
+
Shinobi はビデオフィードを監視し、動きが検出された場合にのみ録画できます。フルフレームまたはトリガー領域はネイティブにサポートされています。アップストリームのドキュメントの [https://shinobi.video/docs/configure#content-setting-up-motion-detection setup-up-motion-detection] の記事を参照してください。
   
  +
=== カメラ内からの動き/物体検出 ===
=== 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].
+
一部のカメラメーカーは、カメラ自体のファームウェア内でネイティブの動き/オブジェクト検出を提供しています。Shinobi は、カメラによって動きが検出されたときに記録をトリガーする外部イベントを受け入れることができ、これらのイベントは [https://hub.shinobi.video/articles/view/Qdu39Dp8zDqWIA0 SMTP] または、[https://shinobi.video/articles/2019-02-23-how-to-use-ftpbased-event-triggering-in-shinobi FTP]のいずれかによって通信されます。
   
  +
{{Note|カメラが動きを検出したときと、Shinobi がビデオの開始をトリガーするときとの間にラグがある場合、'''セグメント長変数''' をより高い値に調整する必要がある場合があります。これをテストするには、誰かがモーションをトリガーしている間のライブストリームを視聴するだけです。モーションがトリガーされた時間をカメラの時計で観察し、ビデオと比較します。より高い値を設定して、再度テストしてください。}}
{{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.}}
 
   
  +
私たちのパッケージは root として {{ic|node}} を実行していないため、これらのサービスのネイティブポート (STMP の場合は 25、FTP の場合は 21) を使用できません。
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).
 
   
  +
Shinobi およびカメラ内のこれらのサービスには、単純に 1,000 を超えるポートを選択することをお勧めします。
It is recommended to simply select a port above 1,000 for these services on Shinobi and within the camera.
 
   
  +
ネイティブポートの使用が必須の場合は、{{ic|shinobi-camera.service}} に [[ドロップインスニペット]] を使用します。
If using the native ports is a hard requirement, use a [[drop-in snippet]] for {{ic|shinobi-camera.service}}:
 
   
 
[Service]
 
[Service]
 
AmbientCapabilities=CAP_NET_BIND_SERVICE
 
AmbientCapabilities=CAP_NET_BIND_SERVICE
   
== Resources ==
+
== リソース ==
   
* [https://shinobi.video/docs/ Shinobi docs] - Official docs and guides.
+
* [https://shinobi.video/docs/ Shinobi docs] - 公式ドキュメントとガイド。
* [https://www.ispyconnect.com/cameras iSpy camera database] - Large database of URLs for various cameras.
+
* [https://www.ispyconnect.com/cameras iSpy camera database] - さまざまなカメラの URL の大規模なデータベース。
* [https://hub.shinobi.video/explore Shinobi camera database] - Searchable database of supported cameras including things such as protocols, URLs for streams, and other technical specs.
+
* [https://hub.shinobi.video/explore Shinobi camera database] - プロトコル、ストリームの URL、その他の技術仕様などを含む、サポートされているカメラの検索可能なデータベース。
* [https://community.home-assistant.io/t/stream-component-confirmed-cameras-and-configurations/106729 Home assistant camera database] - Another resource for finding URLs for streams.
+
* [https://community.home-assistant.io/t/stream-component-confirmed-cameras-and-configurations/106729 Home assistant camera database] - ストリームの URL を検索するための別のリソース。

2024年3月27日 (水) 11:16時点における最新版

関連記事

Shinobi は Node.js で記述された最新のオープンソース NVR(Network Video Recorder) です。個人または教育のための使用であれば、Pro バージョンの使用にライセンスキーは必要ありません。商用目的の使用の場合は、この アップストリームドキュメント を参照してください。

ノート: h.265 をサポートするカメラは、Shinobi ダッシュボードのブラウザでは表示できません。録画(ビデオのコピー)は引き続き機能しますが、ブラウザを使用して表示することはできません。モバイルアプリを使って、これらのストリームを表示できます。

インストール

shinobi-gitAURインストール して下さい。

ノート: Shinobi は root としてではなく非特権ユーザーとして実行されます。これは、アップストリームが node の実行を期待する方法です。その結果、いくつかの制限が課せられます:
  1. WebUI からのプラグインのインストールは機能しません。必要な場合は、root としてサーバーを手動で起動して下さい。
  2. pm2 が使用されていないため、WebUI からの再起動機能は機能しません。
  3. root のみが実行できるため、1000 未満のポートへのバインドは機能しません。これは、FTP または SMTP を使用してモーション/オブジェクト検出を受信する場合にのみ関係します。いくつかの回避策オプションについては、#カメラ内からの動き/物体検出 を参照してください。

設定

MariaDB サーバーのインストールとセットアップ

初期設定については MariaDB#インストール を参照し、次のコマンドを使用して Shinobi 用のデータベースを作成します:

# mysql
> CREATE DATABASE ccio; flush privileges; \q

Shinobi のユーザー majesticflame を作成し、新しいデータベースに対するすべての権限を付与します:

# mysql < /usr/share/shinobi/sql/user.sql
ノート: shinobi-gitAURmariadb に依存するため、MariaDB は Shinobi と同じサーバーにインストールされます。ただし、Shinobi を手動でインストールした場合や、MariaDB を別のサーバーにインストールして mariadb 依存関係を使用せずにインストールした場合は、/usr/share/shinobi/sql/user.sql をコピーして変更する必要があります。例えば、LAN IP が 192.168.9.100 の場合
$ sed 's/127.0.0.1/192.168.9.100/g' < /usr/share/shinobi/sql/user.sql > /tmp/user.sql

次に、scp またはその他のメカニズムを使用してファイルを MariaDB サーバーにコピーし、変更した SQL ファイルを実行します:

# mysql < /tmp/user.sql

最後にデータベースにテーブルを追加します:

# mysql ccio < /usr/share/shinobi/sql/framework.sql

Shinobi のセットアップ

ノート: MariaDB が別のサーバー上にある場合は、/etc/shinobi/conf.json を編集し、db.host の下の 127.0.0.1 を置き換えます。

必要に応じて /etc/shinobi/conf.json をカスタマイズします。

必要に応じて、メールセクションを設定し、コメントに示されているように cron キーをランダムなものに置き換えます。

必要に応じて、/etc/shinobi/super.json を編集し、"pass" の値を md5sum ハッシュ化されたパスワードに置き換えることにより、スーパー管理者パスワードを変更します。次のようなものを生成します。

$ echo -n PASSWORD | md5sum

shinobi.target ユニットを使用して Shinobi を 起動/有効化 します。shinobi.targetshinobi-camera.serviceshinobi-cron.service を起動/停止します。http://localhost:8080/super にアクセスして、ユーザーの作成を含む初期セットアップを実行します。ウォークスルーについては、公式の設定ガイド を参照してください。完了したら、http://localhost:8080 にアクセスし、管理者以外のユーザーとしてログインします。

ノート: 別のコンピューター上の場合は localhost を LAN IP に置き換え、/etc/shinobi/conf.jsonip の下にある 127.0.0.1を置き換えます。

Android および iOS アプリ

Android と iOS の両方の Shinobi モバイルアプリは、この 公開テストを通じて利用できます。

ヒントとテクニック

カメラ映像と Shinobi の間の遅延

カメラと Shinobi ダッシュボードの間にある程度の遅れや遅れが生じるのは正常であり、ストリームの種類とビデオ設定によって異なります。遅延を最小限に抑えるためのヒントについては、アップストリームドキュメント を参照してください。

Shinobi でネイティブにモーション/オブジェクトを検出

Shinobi はビデオフィードを監視し、動きが検出された場合にのみ録画できます。フルフレームまたはトリガー領域はネイティブにサポートされています。アップストリームのドキュメントの setup-up-motion-detection の記事を参照してください。

カメラ内からの動き/物体検出

一部のカメラメーカーは、カメラ自体のファームウェア内でネイティブの動き/オブジェクト検出を提供しています。Shinobi は、カメラによって動きが検出されたときに記録をトリガーする外部イベントを受け入れることができ、これらのイベントは SMTP または、FTPのいずれかによって通信されます。

ノート: カメラが動きを検出したときと、Shinobi がビデオの開始をトリガーするときとの間にラグがある場合、セグメント長変数 をより高い値に調整する必要がある場合があります。これをテストするには、誰かがモーションをトリガーしている間のライブストリームを視聴するだけです。モーションがトリガーされた時間をカメラの時計で観察し、ビデオと比較します。より高い値を設定して、再度テストしてください。

私たちのパッケージは root として node を実行していないため、これらのサービスのネイティブポート (STMP の場合は 25、FTP の場合は 21) を使用できません。

Shinobi およびカメラ内のこれらのサービスには、単純に 1,000 を超えるポートを選択することをお勧めします。

ネイティブポートの使用が必須の場合は、shinobi-camera.serviceドロップインスニペット を使用します。

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE

リソース

  • Shinobi docs - 公式ドキュメントとガイド。
  • iSpy camera database - さまざまなカメラの URL の大規模なデータベース。
  • Shinobi camera database - プロトコル、ストリームの URL、その他の技術仕様などを含む、サポートされているカメラの検索可能なデータベース。
  • Home assistant camera database - ストリームの URL を検索するための別のリソース。