Skip to content

Commit

Permalink
Clarify docs about rtmp (#5052)
Browse files Browse the repository at this point in the history
* Update readme features

* Remove RTMP setup from setup guide

* Update integration for RTSP

* Remove rtmp from faq

* Remove RTMP stream from guide

* Remove rtmp from install

* Remove rtmp from dev config
  • Loading branch information
NickM-27 authored Jan 13, 2023
1 parent ab44a65 commit b4fb608
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but
- Communicates over MQTT for easy integration into other systems
- Records video with retention settings based on detected objects
- 24/7 recording
- Re-streaming via RTMP to reduce the number of connections to your camera
- Re-streaming via RTSP to reduce the number of connections to your camera
- WebRTC & MSE support for low-latency live view

## Documentation

Expand Down
1 change: 0 additions & 1 deletion docs/docs/development/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ cameras:
input_args: -re -stream_loop -1 -fflags +genpts
roles:
- detect
- rtmp
detect:
height: 1080
width: 1920
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/frigate/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ services:
size: 1000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
- "8554:8554" # RTSP feeds

This comment has been minimized.

Copy link
@felipecrs

felipecrs Jan 13, 2023

Contributor

This should mention 8555 as well, I think.

environment:
FRIGATE_RTSP_PASSWORD: "password"
```
Expand Down
12 changes: 2 additions & 10 deletions docs/docs/guides/camera_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,14 @@ Larger resolutions **do** improve performance if the objects are very small in t

For the Dahua/Loryta 5442 camera, I use the following settings:

**Main Stream (Recording)**
**Main Stream (Recording & RTSP)**

- Encode Mode: H.264
- Resolution: 2688\*1520
- Frame Rate(FPS): 15
- I Frame Interval: 30

**Sub Stream 1 (RTMP)**

- Enable: Sub Stream 1
- Encode Mode: H.264
- Resolution: 720\*576
- Frame Rate: 10
- I Frame Interval: 10

**Sub Stream 2 (Detection)**
**Sub Stream (Detection)**

- Enable: Sub Stream 2
- Encode Mode: H.264
Expand Down
7 changes: 1 addition & 6 deletions docs/docs/guides/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ cameras:
- path: rtsp://10.0.10.10:554/rtsp # <----- Update for your camera
roles:
- detect
- rtmp
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: 1280 # <---- update for your camera's resolution
height: 720 # <---- update for your camera's resolution
Expand All @@ -80,7 +77,7 @@ cameras:
At this point you should be able to start Frigate and see the the video feed in the UI.
If you get a green image from the camera, this means ffmpeg was not able to get the video feed from your camera. Check the logs for error messages from ffmpeg. The default ffmpeg arguments are designed to work with H264 RTSP cameras that support TCP connections. If you do not have H264 cameras, make sure you have disabled RTMP. It is possible to enable it, but you must tell ffmpeg to re-encode the video with customized output args.
If you get an error image from the camera, this means ffmpeg was not able to get the video feed from your camera. Check the logs for error messages from ffmpeg. The default ffmpeg arguments are designed to work with H264 RTSP cameras that support TCP connections.
FFmpeg arguments for other types of cameras can be found [here](../configuration/camera_specific.md).
Expand Down Expand Up @@ -148,7 +145,6 @@ cameras:
- path: rtsp://10.0.10.10:554/rtsp
roles:
- detect
- rtmp
detect:
width: 1280
height: 720
Expand All @@ -173,7 +169,6 @@ cameras:
- path: rtsp://10.0.10.10:554/rtsp
roles:
- detect
- rtmp
- path: rtsp://10.0.10.10:554/high_res_stream # <----- Add high res stream
roles:
- record
Expand Down
22 changes: 13 additions & 9 deletions docs/docs/integrations/home-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Home Assistant > Configuration > Integrations > Frigate > Options

| Option | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| RTMP URL Template | A [jinja2](https://jinja.palletsprojects.com/) template that is used to override the standard RTMP stream URL (e.g. for use with reverse proxies). This option is only shown to users who have [advanced mode](https://www.home-assistant.io/blog/2019/07/17/release-96/#advanced-mode) enabled. See [RTMP streams](#streams) below. |
| RTSP URL Template | A [jinja2](https://jinja.palletsprojects.com/) template that is used to override the standard RTMP stream URL (e.g. for use with reverse proxies). This option is only shown to users who have [advanced mode](https://www.home-assistant.io/blog/2019/07/17/release-96/#advanced-mode) enabled. See [RTSP streams](#streams) below. |

## Entities Provided

Expand Down Expand Up @@ -124,13 +124,17 @@ https://HA_URL/api/frigate/notifications/<event-id>/clip.mp4

## RTMP stream

In order for the live streams to function they need to be accessible on the RTMP
port (default: `1935`) at `<frigatehost>:1935`. Home Assistant will directly
RTMP is deprecated and it is recommended to switch to use RTSP restreams.

## RTSP stream

In order for the live streams to function they need to be accessible on the RTSP
port (default: `8554`) at `<frigatehost>:8554`. Home Assistant will directly
connect to that streaming port when the live camera is viewed.

#### RTMP URL Template
#### RTSP URL Template

For advanced usecases, this behavior can be changed with the [RTMP URL
For advanced usecases, this behavior can be changed with the [RTSP URL
template](#options) option. When set, this string will override the default stream
address that is derived from the default behavior described above. This option supports
[jinja2 templates](https://jinja.palletsprojects.com/) and has the `camera` dict
Expand All @@ -142,24 +146,24 @@ This is potentially useful when Frigate is behind a reverse proxy, and/or when
the default stream port is otherwise not accessible to Home Assistant (e.g.
firewall rules).

###### RTMP URL Template Examples
###### RTSP URL Template Examples

Use a different port number:

```
rtmp://<frigate_host>:2000/live/front_door
rtsp://<frigate_host>:2000/front_door
```

Use the camera name in the stream URL:

```
rtmp://<frigate_host>:2000/live/{{ name }}
rtsp://<frigate_host>:2000/{{ name }}
```

Use the camera name in the stream URL, converting it to lowercase first:

```
rtmp://<frigate_host>:2000/live/{{ name|lower }}
rtsp://<frigate_host>:2000/{{ name|lower }}
```

## Multiple Instance Support
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/troubleshooting/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A solid green image means that Frigate has not received any frames from ffmpeg.

### How can I get sound or audio in my recordings? {#audio-in-recordings}

By default, Frigate removes audio from recordings to reduce the likelihood of failing for invalid data. If you would like to include audio, you need to override the output args to remove `-an` for where you want to include audio. The recommended audio codec is `aac`. Not all audio codecs are supported by RTMP, so you may need to re-encode your audio with `-c:a aac`. The default ffmpeg args are shown [here](../configuration/index.md/#full-configuration-reference).
By default, Frigate removes audio from recordings to reduce the likelihood of failing for invalid data. If you would like to include audio, you need to override the output args to remove `-an` for where you want to include audio. The recommended audio codec is `aac`. The default ffmpeg args are shown [here](../configuration/index.md/#full-configuration-reference).

:::tip

Expand Down

0 comments on commit b4fb608

Please sign in to comment.