frigate: Enable RTMP on Back Yard camera

I couldn't get RTMP to work on the Back Yard camera because the `ffmpeg`
process kept crashing:

```
ffmpeg.back_yard.clips_rtmp    ERROR   : av_interleaved_write_frame(): Connection reset by peer
ffmpeg.back_yard.clips_rtmp    ERROR   : [flv @ 0x5562090c8ec0] Failed to update header with correct duration.
ffmpeg.back_yard.clips_rtmp    ERROR   : [flv @ 0x5562090c8ec0] Failed to update header with correct filesize.
ffmpeg.back_yard.clips_rtmp    ERROR   : Error writing trailer of rtmp://127.0.0.1/live/back_yard: Connection reset by peer
watchdog.back_yard             INFO    : Terminating the existing ffmpeg process...
watchdog.back_yard             INFO    : Waiting for ffmpeg to exit gracefully...
```

I thought increasing the value of `--shm-size` argument for `podman`
would help, but even going as high as 1024 mebibytes did not resolve the
problem.

Ultimately, I decided that it is not really necessary to view the full
4k stream in real time.  The back yard camera supports three streams, so
I set them all up for different roles.  I briefly considered using a
single 1080p stream for both object detection and RTMP streaming, but
this consumed considerable CPU time, so I decided against it for now.  I
may re-evaluate that option if I decide to purchase a TPU.
jenkins-master
Dustin 2021-08-22 20:31:59 -05:00
parent 544810ad34
commit 9868873860
1 changed files with 8 additions and 3 deletions

View File

@ -46,13 +46,18 @@ frigate_cameras:
back_yard: back_yard:
ffmpeg: ffmpeg:
inputs: inputs:
# 640x480 for object detection
- path: rtsp://frigate:{{ vault_frigate_password_back_yard }}@172.30.0.212/cam/realmonitor?channel=1&subtype=1 - path: rtsp://frigate:{{ vault_frigate_password_back_yard }}@172.30.0.212/cam/realmonitor?channel=1&subtype=1
roles: roles:
- detect - detect
# 4k for recording
- path: rtsp://frigate:{{ vault_frigate_password_back_yard }}@172.30.0.212/cam/realmonitor?channel=1&subtype=0 - path: rtsp://frigate:{{ vault_frigate_password_back_yard }}@172.30.0.212/cam/realmonitor?channel=1&subtype=0
roles: roles:
- clips - clips
#- rtmp # 1080p for streaming viaHome Assistant
- path: rtsp://frigate:{{ vault_frigate_password_back_yard }}@172.30.0.212/cam/realmonitor?channel=1&subtype=2
roles:
- rtmp
height: 480 height: 480
width: 640 width: 640
objects: objects:
@ -64,9 +69,9 @@ frigate_cameras:
clips: clips:
enabled: true enabled: true
rtmp: rtmp:
enabled: false enabled: true
snapshots: snapshots:
enabled: true enabled: true
retain: retain:
default: 365 default: 365
frigate_shm_size: 100 frigate_shm_size: 256