Update camera specific to use presets

This commit is contained in:
Nick Mowen 2022-09-14 16:54:14 -06:00
parent 2e56d5cd7e
commit 6addcc38ff

View File

@ -8,15 +8,15 @@ title: Camera Specific Configurations
The input and output parameters need to be adjusted for MJPEG cameras The input and output parameters need to be adjusted for MJPEG cameras
```yaml ```yaml
input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -c:v mjpeg input_args: preset-http-mjpeg-generic
``` ```
Note that mjpeg cameras require encoding the video into h264 for recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly. Note that mjpeg cameras require encoding the video into h264 for recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly.
```yaml ```yaml
output_args: output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an record: preset-record-mjpeg
rtmp: -c:v libx264 -an -f flv rtmp: preset-rtmp-mjpeg
``` ```
## JPEG Stream Cameras ## JPEG Stream Cameras
@ -24,25 +24,7 @@ output_args:
Cameras using a live changing jpeg image will need input parameters as below Cameras using a live changing jpeg image will need input parameters as below
```yaml ```yaml
input_args: input_args: preset-http-jpeg-generic
- -r
- 5 # << enter FPS here
- -stream_loop
- -1
- -f
- image2
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -use_wallclock_as_timestamps
- 1
``` ```
Outputting the stream will have the same args and caveats as per [MJPEG Cameras](#mjpeg-cameras) Outputting the stream will have the same args and caveats as per [MJPEG Cameras](#mjpeg-cameras)
@ -53,7 +35,7 @@ The input parameters need to be adjusted for RTMP cameras
```yaml ```yaml
ffmpeg: ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rw_timeout 5000000 -use_wallclock_as_timestamps 1 -f live_flv input_args: preset-rtmp-generic
``` ```
## UDP Only Cameras ## UDP Only Cameras
@ -62,7 +44,7 @@ If your cameras do not support TCP connections for RTSP, you can use UDP.
```yaml ```yaml
ffmpeg: ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport udp -timeout 5000000 -use_wallclock_as_timestamps 1 input_args: preset-rtsp-udp
``` ```
## Model/vendor specific setup ## Model/vendor specific setup
@ -77,7 +59,7 @@ cameras:
output_args: output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
rtmp: -c:v copy -c:a aac -f flv rtmp: -c:v copy -c:a aac -f flv
inputs: inputs:
- path: rtsp://user:password@camera-ip:554/H264/ch1/main/av_stream # <----- Update for your camera - path: rtsp://user:password@camera-ip:554/H264/ch1/main/av_stream # <----- Update for your camera
roles: roles:
@ -99,7 +81,7 @@ You will need to remove `nobuffer` flag for Blue Iris RTSP cameras
```yaml ```yaml
ffmpeg: ffmpeg:
input_args: -avoid_negative_ts make_zero -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 input_args: preset-rtsp-blue-iris
``` ```
### Reolink 410/520 (possibly others) ### Reolink 410/520 (possibly others)
@ -112,21 +94,7 @@ According to [this discussion](https://github.com/blakeblackshear/frigate/issues
cameras: cameras:
reolink: reolink:
ffmpeg: ffmpeg:
input_args: input_args: preset-http-reolink
- -avoid_negative_ts
- make_zero
- -fflags
- +genpts+discardcorrupt
- -flags
- low_delay
- -strict
- experimental
- -analyzeduration
- 1000M
- -probesize
- 1000M
- -rw_timeout
- "5000000"
inputs: inputs:
- path: http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password - path: http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password
roles: roles:
@ -148,6 +116,6 @@ In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate
```yaml ```yaml
ffmpeg: ffmpeg:
output_args: output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac record: preset-record-ubiquiti
rtmp: -c:v copy -f flv -ar 44100 -c:a aac rtmp: preset-rtmp-ubiquiti
``` ```