blob: ca796fac801363af377b1b9b0ba3274c03edd3b7 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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`
|