Built-in go2rtc camera setup problem

Hi there,

I'm trying to setup my ip camera with built-in go2rtc and generic camera intergration.
I've been crawling through all the documents and forum threads I could find but still can not get it working.

in the configuration.yamI I have a line:

go2rtc:

in config directory I created go2rtc.yaml file:

streams:
  water_meter_rtsp: rtsp://***:***@192.168.100.*:554/Streaming/Channels/1
  water_meter_digits_go2rtc: 
    - ffmpeg:water_meter_rtsp#video=h264#hardware#rtsp#vf=crop=305:70:155:200

When HA starts there are no errors or warnings related to go2rtc in logs.

When I try to add camera wth Generic Camera integration:

I get this error in logs:
Error from stream worker: Not Found error opening stream (Server returned 404 Not Found, rtsp://127.0.0.1:18554/water_meter_digits_go2rtc)

Can anybody tell me what am I doing wrong before I get insane please?
many thanks

In theory HA is supposed to pick up on a stream and determine the best way to present it without futzing with stuff.
Did you try without that file, and just have the go2rtc: in the configuration.yaml to enable it?

No I did not. How HA will know stream exists if it isn't defined in go2rtc.yaml? I also wanted go2rtc to crop the picture before reaching HA.

Have you changed the go2rtc ports? Because the default port numbers are 8554 and 1984. You can also replace 127.0.0.1 with the LAN address of your HA device, e.g. I have this and it works:

  url: "http://homeassistant.mydomain.com:1984/api/frame.jpeg?src=akuvox"

You can test this in your browser.

You don't need this unless you've disabled default_config, as it's included in the default config.

These configuration options don't exist, so they have no effect. https://www.home-assistant.io/integrations/go2rtc/#go2rtc-configuration-variables

You're supposed to put the RTSP stream URL of the camera, not localhost.

HA manages the go2rtc server itself. When you add a generic camera it will add the RTSP url to go2rtc. It creates the stream, it doesn't consume it from go2rtc.