RTSP stream randomly becomes unavailable after a few hours

I'm testing an IMOU Bullet 2C with Home Assistant using the Generic Camera integration.

My configuration is pretty simple:

camera:
  - platform: generic
    name: IMOU
    still_image_url: http://192.168.1.20/cgi-bin/snapshot.cgi
    stream_source: rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=0

The stream works fine after HA starts, but after a few hours the entity becomes unavailable. VLC can still open the RTSP stream without any issue.

Has anyone seen something similar? I'm wondering if this is related to ffmpeg or maybe the camera closing idle connections.

Anything in the logs?

The entity changes to unavailable, and I only see an occasional timeout message from the stream component.

The camera itself is still online, and opening the same RTSP URL in VLC works immediately.

That's why I'm not sure whether the issue is on the Home Assistant side or something related to the camera keeping the RTSP session alive.

Is it just WIFI being WIFI?
Can you use an Ethernet cable or add a dedicated AP and SSID?

Most likely is that You Can’t Stream the Same High Res Stream to 2 different apps ( one will “lagout” and become unavailable ( Low performance Camera Processor behavior ) , try with low (url)on VLC and high(url) on HA

Is that a unicast or multicast stream? What does your HA memory usage look like during the time it's streaming?

I'll try it. thanks