Go2rtc project - help thread

I have successfully accessed my Reolink 810A cameras using Go2RTC via the HA Integration WebUI. I can see that there is an option to send an audio file and I believe that I can therefore use TTS.

I need some help with the coding to use TTS: and playing a Message to the camera please. My device stream URL is: rtsp://user:[email protected]/h264Preview_01_sub.

How do I address the camera in an automation to send a message via TTS?

Many thanks!!

Reolink cameras has terrible support for open protocols. They have glitchy RTSP with no support for two way audio.

I am still having an issue with 2 way audio on Lorex cameras when my NVR is in play.

If I wire the camera directly to my network switch I can set my configuration to go to the camera directly. In this scenario 2 way audio works properly, but when I have the camera connected to the NVR and access it through the NVR 2 way audio doesn’t work anymore.

Lorex has a lot of the same API’s as Dahua and after a ton of poking at this thing, I cannot spot where the NVR is changing any settings, but one thing I did notice is the ONVIF version is being downgraded through the NVR. Going to the camera direct it is 19.06, but going through the NVR causes it to downgrade to 18.12. At this point I’m drawing blanks on how to proceed as I don’t want to connect my cameras to my main network switch and would prefer them be connected directly to the NVR, but Lorex also does not appear to support bridge mode to make the cameras directly accessible from my main network.

Any tips on how to debug this further to determine what exactly the difference is between the two setups and determine if it’s something that is fixable?

Does anyone know how to configure go2rtc so that all cameras are selected when you open it ?

image

When opening the Go2RTC dashboard it asks for a username and password but admin/admin doesn’t work.

Anyone knows what the standard username and password is?

This is Hass port number. Not go2rtc

Weird, when i try to open the webinterface of Go2rtc it leads me to a login popup

Hi, I have a relatively cheap chinese cam with two rstp channels. One is SD and it works. The other channel is HD (which I would like to use), but I get the the message:

webrtc/offer: codecs not match: H265, AAC

I tried to use ffmpeg to transcode to H264 and opus, but this results in another message:

webrtc/offer: source 0 error: exit status 1

Here is my config:

streams:
  camera_hd: rtsp://xxxxxx:[email protected]/live/ch0#backchannel=0
  camera_sd: rtsp://xxxxxx:[email protected]/live/ch1#backchannel=0
  camera_ff: ffmpeg:camera_hd#video=h264#audio=opus
ffmpeg:
  bin: ffmpeg
log:
  level: info
  api: debug
  rtsp: debug
  streams: debug
  webrtc: debug

Is my config bad ? What is the reason for exit status 1 ? Status 1 is sort of a catch-all exit code …

Thank you for any hints

Thank you! This was the solution that finally worked for me, but I’m trying to understand why. I don’t understand how a standard iframe doesn’t work, but nested ones do…

1 Like

I think the standard iframe doesn’t have these options to activate the microphone

allow=“camera *;microphone *”

You need to increase log level for exec module to trace. FFmpeg fail with transcoding for some reason

Thank you Alexey. I have changed loglevel from info to verbose, but when I click on log (left colums in dashboard) I only get some info not related to go2rtc. dmsg in console goves me some errormessages related to bluetooth. Entering ‘journalctl’ in console results in ‘command not found’.

So: how do I access the logs ?

Thank you for your help.

If you running add-on, you need to check addon log. If you running integration, you need to increase integration log level to debug.

OK Alexey,
thank you so much for your help.
I have now set everything to loglevel debug. Here is the result:

Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.197 DBG [webrtc] new consumer url=camera_ff
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.207 DBG [streams] probe producer url=ffmpeg:rtsp://xxxxxx:[email protected]/live/ch0#video=h264#audio=opus
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.207 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://xxxxxx:[email protected]/live/ch0 -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -c:a libopus -ar:a 48000 -ac:a 2 -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/7d992590cfb9486ceeef9ea2299377b9"
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[8377]: [rtsp @ 0x55959ef220] Unable to open RTSP for listening
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[8377]: rtsp://xxxxxx:[email protected]/live/ch0: Cannot assign requested address
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.482 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://xxxxxx:[email protected]/live/ch0#video=h264#audio=opus
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.482 DBG [streams] probe producer url=ffmpeg:rtsp://xxxxxx:[email protected]/live/ch0#video=h264#audio=opus
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.482 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -allowed_media_types video+audio -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://xxxxxx:[email protected]/live/ch0 -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -c:a libopus -ar:a 48000 -ac:a 2 -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/7d992590cfb9486ceeef9ea2299377b9"
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[8378]: [rtsp @ 0x55c0e3d220] Unable to open RTSP for listening
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[8378]: rtsp://xxxxxx:[email protected]/live/ch0: Cannot assign requested address
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.741 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="exec: exit status 1" url=ffmpeg:rtsp://xxxxxx:[email protected]/live/ch0#video=h264#audio=opus
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.741 DBG [streams] can't stop none producer
Mär 14 15:08:52 RPiHA go2rtc_linux_arm64[7667]: 15:08:52.741 DBG [webrtc] add consumer error="source 0 error: exec: exit status 1"

The related go2rtc.yaml file looks like this:

streams:
  
  camera_sd: rtsp://xxxxxx:[email protected]/live/ch1#backchannel=0
  camera_ff: ffmpeg:rtsp://xxxxxx:[email protected]/live/ch0#video=h264#audio=opus
ffmpeg:
  bin: ffmpeg
log:
  level: debug
  api: debug
  rtsp: debug
  streams: debug
  webrtc: debug

If I open the stream

rtsp://xxxxxx:[email protected]/live/ch0 in VLC, it runs just fine and in HD quality.

Thank you very much in advance

I don’t know why ffmpeg wants to open RTSP for listening. That needs only for UDP connection.

Подскажите пожалуйста я настроил go2rtc.yaml вот так.
Please tell me, I configured go2rtc.yaml like this.
image
Как мне отправить текст (TTS) или музыку (MP3) на камеру DoorBell?
Спасибо.
How can I send text (TTS) or music (MP3) to the DoorBell camera?
Thank you.

1 Like

What camera you have? I tried Reolink 823a but no luck with http stream
Can Reolink 823 allow stream http?

http://CAM_IP/flvport=1935&app=bcs&stream=channel0_ext.bcs&user=USER&password=PASSWORD

Replaced
cam_ip = Reolink ip
user = reolink username
password = reolink password

sorry, I apologize for the post but I’ve been trying for months and every time I go back with the hope of succeeding sooner or later but still nothing. I use webRTC camera integration version 2.3.1 and with these lines:

  - type: custom:webrtc-camera
         url: rtsp://user:[email protected]:554/Streaming/Channels/102/

I see my hikvision camera in real time.

I’m trying to update the integration to the latest version, which is 3.1.0, but nothing works anymore if I do.
I state that I’m not very practical, in fact I’m very poor, but I also installed go2rtc and I also tried to insert the url of the camera there but I don’t see anything.

Did I miss some step to do? Are there any compatibility issues with hikvision? where am i wrong? Can anyone help me? I would just like to keep the integration updated in the hope that it will improve a bit since at the moment the video often doesn’t load and I have to refresh the page several times to get it started, but if I update then nothing works anymore.
thanks a lot to everyone.

You need to get it work in the go2rtc WebUI. After that try to use camera in the WebRTC Camera integration

ok thanks but what should i do? why the url works in the integration but doesn’t work in go2rtc? do i have to change something? the url is invalid?