From b4fb6086b372aad09f2701ebd7de293635299ef1 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 13 Jan 2023 06:20:25 -0700 Subject: [PATCH] Clarify docs about rtmp (#5052) * 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 --- README.md | 3 ++- docs/docs/development/contributing.md | 1 - docs/docs/frigate/installation.md | 2 +- docs/docs/guides/camera_setup.md | 12 ++---------- docs/docs/guides/getting_started.md | 7 +------ docs/docs/integrations/home-assistant.md | 22 +++++++++++++--------- docs/docs/troubleshooting/faqs.md | 2 +- 7 files changed, 20 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 009e945cb..8fb3013b9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/docs/development/contributing.md b/docs/docs/development/contributing.md index b77fca75c..931e9c116 100644 --- a/docs/docs/development/contributing.md +++ b/docs/docs/development/contributing.md @@ -62,7 +62,6 @@ cameras: input_args: -re -stream_loop -1 -fflags +genpts roles: - detect - - rtmp detect: height: 1080 width: 1920 diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md index 0eb63966c..aae147964 100644 --- a/docs/docs/frigate/installation.md +++ b/docs/docs/frigate/installation.md @@ -119,7 +119,7 @@ services: size: 1000000000 ports: - "5000:5000" - - "1935:1935" # RTMP feeds + - "8554:8554" # RTSP feeds environment: FRIGATE_RTSP_PASSWORD: "password" ``` diff --git a/docs/docs/guides/camera_setup.md b/docs/docs/guides/camera_setup.md index 959856fa0..d1aeba087 100644 --- a/docs/docs/guides/camera_setup.md +++ b/docs/docs/guides/camera_setup.md @@ -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 diff --git a/docs/docs/guides/getting_started.md b/docs/docs/guides/getting_started.md index aa105cf49..39bbe2354 100644 --- a/docs/docs/guides/getting_started.md +++ b/docs/docs/guides/getting_started.md @@ -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 @@ -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). @@ -148,7 +145,6 @@ cameras: - path: rtsp://10.0.10.10:554/rtsp roles: - detect - - rtmp detect: width: 1280 height: 720 @@ -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 diff --git a/docs/docs/integrations/home-assistant.md b/docs/docs/integrations/home-assistant.md index 180f699b6..040eb3536 100644 --- a/docs/docs/integrations/home-assistant.md +++ b/docs/docs/integrations/home-assistant.md @@ -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 @@ -124,13 +124,17 @@ https://HA_URL/api/frigate/notifications//clip.mp4 ## RTMP stream -In order for the live streams to function they need to be accessible on the RTMP -port (default: `1935`) at `: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 `: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 @@ -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://:2000/live/front_door +rtsp://:2000/front_door ``` Use the camera name in the stream URL: ``` -rtmp://:2000/live/{{ name }} +rtsp://:2000/{{ name }} ``` Use the camera name in the stream URL, converting it to lowercase first: ``` -rtmp://:2000/live/{{ name|lower }} +rtsp://:2000/{{ name|lower }} ``` ## Multiple Instance Support diff --git a/docs/docs/troubleshooting/faqs.md b/docs/docs/troubleshooting/faqs.md index f41f85cda..00d038af0 100644 --- a/docs/docs/troubleshooting/faqs.md +++ b/docs/docs/troubleshooting/faqs.md @@ -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