Go2rtc project - help thread

Also you can get rtsp stream for ffmpeg from go2rtc. This would be something like internal loop. But I’m not test this behaviour yet.

That’s interesting. Looping it actually may have dropped the time from 7-8 seconds to 5-6 seconds on average. :thinking: but not conclusive. go2rtc didn’t like looping it with the same source though to itself.

  frontdoor_main:
    - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
    - ffmpeg:rtsp://127.0.0.1:8554/frontdoor_audio#audio=opus
  frontdoor_audio:
    - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0

Well. I just learned the Amcrest AD410 encoding can be set to G.711U just like other Dahuas even though that isn’t available in any Amcrest Docs/UIs. But “Amcrest Survellince Pro” fixit. :grinning_face_with_smiling_eyes:

My reolinks aren’t capable of this so i’ll have to live with it or experiment more.

Some more info to help others. Things like this are valid.

Let’s say you have a camera from the generic integration already. And you want to keep it since this will auto-convert it to webrtc but you also want to add something ontop. Like in my case, I have my camera added into the integration but I needed to join audio to it for webrtc. rather than re-hardcoding username/passwords in go2rtc, you can do this:

  frontyard_main:
    - hass:10_100_1_141
    - ffmpeg:rtsp://127.0.0.1:8554/hass%3A10_100_1_141#audio=opus

That will use the existing camera as a source and add a transcoded audio track.

1 Like

Should support 2-way audio. Have you test it?

1 Like

I haven’t. I was trying to find what profile this thing was compatible with and didn’t know it was T. I will test it though now that I know this.

I believe this would require https. I have been unable to get https working though per this issue.

I’m not clear why. It doesn’t like the container address as the origin. I am using the NGINX PROXY MANAGER which generates a config on the fly and does letsencrypt. It doesn’t allow for too much customizations.

I also tried outsider of the container via a regular old binary run from the homeassistant server outside of nginx as well. No luck and same errors.

Glad to see a thread started on here. I’m confused as well about how to get this to work properly.

I have RTSPtoWeb - WebRTC installed and I see all of cameras on there using the RTMP stream from Frigate (cameras are coming in through Frigate).

I have no clue how to go from RTSPtoWEB to go2rtc and have my Frigate lovelace card use the go2rtc stream. Can someone please dumb it down for me? I’ve read over the docs 100 times.

I don’t see any cameras in the go2rtc webui unless I manually add an RTSP stream from my cameras.

Thanks!

Do you have installed RTSPtoWebRTC? RTSPtoWeb is different than RTSPtoWebRTC…

For anyone reading along, once I tested this on a standard 443 https port, it’s pretty great. Works awesome on the AD410. Looking forward to a integration release of this and a Lovelace card.

You may check additional ffmpeg options. I think we can make ffmpeg start faster.

I also will try to test later

Also, you need to know, WebRTC from addon Web UI will start faster than default Lovelace card. It has more advanced IP address exchange (candidates).

I am not sure what this is? I couldn’t find it. I see references to it in the docs but not sure. In the ‘GitHub - AlexxIT/hassio-addons: Hass.io addons: go2rtc and SSH Tunnel’ I only see go2rtc and ssh tunnels…

I’ve painfully moved my ha to 443 and have everything working with the go2rtc now. It’s fixed all my issues even with apps like ‘pipup’ which always paused my shield with notifications because they contain audio (can now just strip it from the feeds easily).

ITs all working great.

“Open Web UI” button on this picture:

1 Like

ohhh I thought there was something else. THankyou! I am actually using those URLs generated from the UI in many automations like android TV and such. It works really well.

Understood, but based on the documentation RTSPtoWeb is preferred over RTSPtoWebRTC. Add on: RTSPtoWeb and RTSPtoWebRTC

RTSPtoWeb is preferred over RTSPtoWebRTC though there are add-ons for both.

@johntdyer did you get it figured out? I’m at the same point you are.

I think it would be great if there was an end to end example of this being used.

Which documentation? Are you referring to the webrtc documentation? Because this is go2rtc. Different project. And RTSPtoWebRTC is specifically called out in the go2rtc documentation…

I think its difficult to produce an ‘end to end example’ because the use cases for this is so wide.

If you tell us where you’re stuck, maybe someone can help you. I have this working across various aspects of my HA now.

Thanks @calisro I appreciate your help!

I have cameras coming into home assistant via the frigate plugin. I want to limit the delay from the cameras because with the default rtmp I get 30+ second delay.

My goal is to be able to use go2rtc in the Frigate lovelace card and view externally through my Nabu Casa subscription.

Right now I have go2rtc installed and RTSPtoWebRTC but I don’t know how connect the pieces together and use them in the Frigate Lovelace Card.

Also similar to you I have the AD410 I want to get working through the Frigate card :slight_smile:

I don’t use frigate. But you shouldn’t need to do anything for webrtc to kick in. You should literally need to install those components, forward your 8555 port per the docs and it will make that existing camera stream webrtc. You can check in the go2rtc UI and see the numbers/info link with the data when you open up the camera. That will tell you if its working. Also turn up your debugging logs.

You only really need to define the ‘streams’ if you want to customize them more.

This will work too BUT you probably won’t get 2-way working in that card. Right now I don’t think there is a lovelace card to allow the 2-way. I currently use the ‘webrtc’ link in the go2rtc UI and send that link as a notification to our phones when motion is detected so we can open it and see/talk to the door. It technically just runs in a browser when we click it but it works fine. eventually I am sure someone will make a lovelace card.

There’s no way to mute the mic though. Lol so that’s made some comical fun with “open mic” when we forgot we opened the link. Oops

Hi,
can I use go2rtc to use the reolink camera with full resolution (4k, h265) and convert it to h264, to view it in home Assistant? I tested it and a don’t get any error messages, but i get an grey image with some fragments.

I used the following Command:

- ffmpeg:rtsp://user:pass@IP:554/h265Preview_main#video=h264

Thanks

You built the wrong link. Check docs