diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-06-11 21:53:36 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-06-11 21:53:36 +0300 |
commit | 4daaed02f5b888ca2ee423967d3eadd09d0d0975 (patch) | |
tree | bac62dbaa1a32c56354760df93772abb9b0ef64b /doc/ipcam_common.md | |
parent | 96145418dda05ad9b3bfba0ef9603cd27145190e (diff) |
some documentation
Diffstat (limited to 'doc/ipcam_common.md')
-rw-r--r-- | doc/ipcam_common.md | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/ipcam_common.md b/doc/ipcam_common.md new file mode 100644 index 0000000..ca796fa --- /dev/null +++ b/doc/ipcam_common.md @@ -0,0 +1,65 @@ +## Dependencies + +- `ffmpeg` + +## HLS + +Let's assume IP cameras stream h264 via rtsp. + +- Create `/var/ipcamfs` directory. + +- Add to `/etc/fstab`: + ``` + tmpfs /var/ipcamfs tmpfs mode=1755,uid=1000,gid=1000,size=350M 0 0 + ``` + + You may want to adjust tmpfs size. + +- Run `mount /var/ipcamfs`. + +- Copy systemd unit file: + ``` + cp /home/user/homekit/systemd/ipcam_rtsp2hls@.service /etc/systemd/system + ``` + +- Create configuration directory: + ``` + mkdir /etc/ipcam_rtsp2hls.conf.d + ``` + +- Then for each `camname`: + - create `/etc/ipcam_rtsp2hls.conf.d/camname.conf` with following content: + ``` + USER=suer + PASSWORD=password + IP=192.168.1.2 + PORT=554 + # uncomment if needed + # ARGS="--force-tcp" + ``` + - run `systemctl enable ipcam_rtsp2hls@camname` and `systemctl start ipcam_rtsp2hls@camname` + +## Recording + +- Copy systemd unit file: + + ``` + cp /home/user/homekit/systemd/ipcam_capture@.service /etc/systemd/system + ``` + +- Create configuration directory: + ``` + mkdir /etc/ipcam_capture.conf.d + ``` + +- Then for each `camname`: + - create `/etc/ipcam_capture.conf.d/camname.conf` with following content: + ``` + IP=192.168.1.2 + PORT=554 + CREDS="user:password" + OUTDIR=/path/to/files + # uncomment if needed + # ARGS="--force-tcp" + ``` + - run `systemctl enable ipcam_capture@camname` and `systemctl start ipcam_capture@camname` |