summaryrefslogtreecommitdiff
path: root/doc/ipcam-streaming.md
blob: ddc3156985e6348125f0dbd136186317679f62ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
For event-based FTP storage:
```
apt install vsftpd
```

`/etc/vsftpd.conf`:
```
chroot_local_user=YES
allow_writeable_chroot=YES

write_enable=YES
seccomp_sandbox=NO
```

### 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
    ARGS=
    ```
  - run `systemctl enable ipcam_rtsp2hls@camname` and `systemctl start ipcam_rtsp2hls@camname`