Completely defeated by Stream component

For the first time I feel completely defeated in my attempt to get a Home Assistant component working. I wanted to try recording from my camera, which currently works fine from the Lovelace UI, showing both the static image placeholder and the RTSP stream successfully. First, I just tried running the camera.record service manually. HA says the service isn’t found (wha…? how can it not find the service?). Then I read that camera.record is dependent on having the Stream component installed, not that anything was mentioned about that. So I tried installing Stream. No good, wants me to upgrade my version of ffmpeg. Ok, ffmpeg updated. Tried again. No good, complains about component av == 6.1.2 failing. I read every thread I could find on that topic, tried every fix suggested, and after hundreds of updates, all that was accomplished was that Home Assistant would now freeze permanently during initialization if Stream is included. I hate to give up, but it seems like Stream just has too many interlocking dependencies to untangle. Why is it needed at all when the UI can already display the RTSP stream?
Any clues greatly appreciated.

Clues might be easier if you tell us some version and install method information :slight_smile:

It occurred to me that while HA startup appears to be frozen, the new updates might actually have caused HA startup to trigger a very lengthy compile or configuration operation that it is waiting on without any indication of what’s going on. I recall some people mentioning that in the threads, and it would certainly take a long time considering that my HA server is running off a memory card. So while I had given it 10 minutes without success, I decided to just let it be, and sure enough after 20 minutes, HA started up with Stream enabled. Now it is starting up promptly again.

But still no good. Now my RTSP stream that was working in the UI no longer works. It just sits there with a blank window. The only error message I see in the log is: “method DESCRIBE failed: 401 Unauthorized” from components/stream/worker.py, with a count that appears to increment every time I request the RTSP stream. But HA is still able to grab the still image from the camera, so obviously the unchanged login credentials are still working. Again, lots of unclear threads on this topic, but I tried adding the credentials to the RTSP url, which wasn’t necessary before, and that appears to solve this problem.

On to the next problem: Error demuxing stream: No dts in packet. Again, lots of threads, no solutions.

This has got to be the most convoluted, frustrating, complicated implementation of a component that I’ve yet found in Home Assistant!

Oh well, not a total loss - I did figure out how to have Node Red take a series of camera snapshots and email them to me when triggered by a separate PIR sensor. I just wish it could be a video clip.

There is a long thread about cameras that do and don’t work with stream. Long reading, but maybe worthwhile.

Thanks. I have read through that list, and it does list my camera - but it doesn’t tell me anything new. My camera was already working in VLC and Home Assistant with those settings for the RTSP stream before I began experimenting with the new Stream component that doesn’t work. VLC still works, but now I can’t stream video any more in Home Assistant, I just get the “No dts in packet” error. It is obviously connecting to the stream, but the new component can’t handle the same stream format that the old component did. Probably some different setting in ffmpeg or something like that, but impossible to guess. I read through many long threads on that specific error message running through many versions of HA, but nobody found a solution.