Skip to content

Commit

Permalink
Restructured camera specific documentation (#4005)
Browse files Browse the repository at this point in the history
* Restructured camera specific documentation

* Make room for manufacture specific docs
* Added initial (more or less) working setup for Annke C800 camera

* Update docs/docs/configuration/camera_specific.md

remove tracking settings from example

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Moved unify and blue iris cams examples

* headline cleanup

* removed doubled headline in advanced options
* changed headline level for camera specific setup to make headlines
  show up in toc

* removed specific optimizations not related to cam

* more generic phrasing

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
  • Loading branch information
menkej and NickM-27 committed Oct 8, 2022
1 parent 8dd367e commit 2eada21
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 26 deletions.
2 changes: 0 additions & 2 deletions docs/docs/configuration/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: Advanced Options
sidebar_label: Advanced Options
---

## Advanced configuration

### `logger`

Change the default log level for troubleshooting purposes.
Expand Down
76 changes: 52 additions & 24 deletions docs/docs/configuration/camera_specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: camera_specific
title: Camera Specific Configurations
---

### MJPEG Cameras
## MJPEG Cameras

The input and output parameters need to be adjusted for MJPEG cameras

Expand All @@ -19,7 +19,7 @@ output_args:
rtmp: -c:v libx264 -an -f flv
```

### JPEG Stream Cameras
## JPEG Stream Cameras

Cameras using a live changing jpeg image will need input parameters as below

Expand Down Expand Up @@ -47,7 +47,7 @@ input_args:

Outputting the stream will have the same args and caveats as per [MJPEG Cameras](#mjpeg-cameras)

### RTMP Cameras
## RTMP Cameras

The input parameters need to be adjusted for RTMP cameras

Expand All @@ -56,8 +56,56 @@ 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
```

## UDP Only Cameras

If your cameras do not support TCP connections for RTSP, you can use UDP.

```yaml
ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport udp -timeout 5000000 -use_wallclock_as_timestamps 1
```

## Model/vendor specific setup

### Annke C800
This camera is H.265 only. To be able to play clips on some devices (like MacOs or iPhone) the H.265 stream has to be repackaged and the audio stream has to be converted to aac. Unfortunately direct playback of in the browser is not working (yet), but the downloaded clip can be played locally.

```yaml
cameras:
annkec800: # <------ Name the camera
ffmpeg:
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
rtmp: -c:v copy -c:a aac -f flv

inputs:
- path: rtsp://user:password@camera-ip:554/H264/ch1/main/av_stream # <----- Update for your camera
roles:
- detect
- record
- rtmp
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: # <---- update for your camera's resolution
height: # <---- update for your camera's resolution


```

### Blue Iris RTSP Cameras

You will need to remove `nobuffer` flag for Blue Iris RTSP cameras

```yaml
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
```

### Reolink 410/520 (possibly others)

![Resolutions](/img/reolink-settings.png)

According to [this discussion](https://github.com/blakeblackshear/frigate/issues/3235#issuecomment-1135876973), the http video streams seem to be the most reliable for Reolink.

```yaml
Expand Down Expand Up @@ -93,26 +141,6 @@ cameras:
fps: 7
```

![Resolutions](/img/reolink-settings.png)

### Blue Iris RTSP Cameras

You will need to remove `nobuffer` flag for Blue Iris RTSP cameras

```yaml
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
```

### UDP Only Cameras

If your cameras do not support TCP connections for RTSP, you can use UDP.

```yaml
ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport udp -timeout 5000000 -use_wallclock_as_timestamps 1
```

### Unifi Protect Cameras

In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record and rtmp.
Expand All @@ -122,4 +150,4 @@ ffmpeg:
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac
rtmp: -c:v copy -f flv -ar 44100 -c:a aac
```
```
2 changes: 2 additions & 0 deletions docs/docs/configuration/cameras.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ cameras:
front: ...
side: ...
```

For camera model specific settings check the [camera specific](/configuration/camera_specific) infos.

0 comments on commit 2eada21

Please sign in to comment.