Stream component : unable to display rtsp stream

I just quickly tested the changes locally with my Unifi G3 Flex (in stand alone mode by the way) and the error message changed slight:

2019-03-21 03:42:16 ERROR (stream_worker) [libav.h264] error while decoding MB 103 20, bytestream -16
2019-03-21 03:42:46 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: No dts in packet

The video is also showing green on the bottom half when viewed in Home Assistant

That’s great news, can you confirm the settings used to get the Reolinks working?
I’m currently using 2x RLC-410 and have set them up like this:

camera:
  - platform: generic
    still_image_url: http://192.168.1.xxx/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=randomlettersandnumbers&user=admin&password=secretpasswordhere
    stream_source: rtsp://admin:[email protected]:554//h264Preview_01_sub
    name: Front Garden

…but like others can only get the still image preview back so far (using a picture element lovelace card)

hi, i got a couple of wyze cams and blink xt cameras, are those compatible?

Wyze you can’t( you can but it’s not easy, and to me worth it, you need to proxy it via a android app) . Not yet. but they have said they will be adding RTSP in future releases/.

So I was able to get this to work re-streaming it from BlueIris:

- platform: generic
  still_image_url: "http://192.168.1.x/image/cameraname"
  stream_source: "http://192.168.1.x/h264/cameraname/temp.m3u8"

There is another gotcha though that similar to the problem with TTS streaming to the chromecasts in that the base_url would need to be changed to an internal one in my case. I put in a github issue to mention the case asit stops streaming to Google Home Hubs (and I assume chromecasts too) in my particular config.

2 Likes

I tested the fix for ReoLink in the upcoming 0.90.1 release so the camera will not work until that is out, the configuration can be found here:

1 Like

I would like to say thanks for such a great stream component!
I have an issue for Wyze V2 with custom firmware which enabling rtsp.
RTSP works great via VLC/HA camera generic platform (at least I can see it w/o any issues), but doesn’t when I try to use camera.play_stream service (it’s connecting to the chromecast device, trying to load stream and then just stop activity, so I can’t see stream/loading).

In logs I’ve something like:

Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1162679 >= 1128842

17:17 components/stream/worker.py (ERROR)
error while decoding MB 74 6, bytestream 15439
17:16 components/stream/worker.py (ERROR)
cabac decode of qscale diff failed at 74 6
17:16 components/stream/worker.py (ERROR)
error while decoding MB 20 24, bytestream -15
17:16 components/stream/worker.py (ERROR)

RPi3B, Hassio, v0.90

This error should be fixed in 0.90.1.

2 Likes

I have a few hikvision cameras which are streaming fine via sub-stream (low resolution) and are failing with similar errors via main streams. I’m sure 0.90.1 should fix that. I have also noticed a rather strange behaviour with the very same cameras connected remotely via VPN, which are streaming OK via VLC and are all failing with the following error message:

method SETUP failed: 454 Session Not Found

VLC falls back to TCP if UDP fails. This component only streams via UDP for now. We will have to design a way to configure stream options to allow you to view those remote streams.

The low-res vs high-res stream probably has more to do with the hardware Home Assistant runs on. What hardware are you running?

2 Likes

Thank you, I’ve almost forgotten about UDP. I’m running HA in a Docker on a Synology RS815+ (Intel Atom)

I’m sorry I forgot to say thank you the tremendous work you are doing.

Just thought I’d toss my two cents into the pit as well. I’ve got a couple of D-LINK DCS-4602ev. None of them works with the generic camera setup. I also tried to pass them through my synology by the following:

camera:

But that didn’t work as well. I don’t know if there is a still image url for synology. But I used the URL directly on the camera that I know works. My problem is that I end up with a black screen on my chromecast with a blue loading bar that never shows anything else but this black screen.

I’ll happily try different setups. Please let me know if there is anything I can try so we can get D-link users sorted as well :slight_smile:

did you get any log errors? are you on 0.90.1? if not update once available and try again.

Make sure the camera loads in the front end by clicking on the entity, it shoudl begin playing the video in a new player. If that works then casting should work.

I’m still at 0.90 and my log says:
Error demuxing stream:

Not sure what to make of that though.
Camera does not load up in front-end. It’s the same behaviour. Stuck with a black screen.

if that is all you see then 0.90.1 might actually fix your issue…that was the same error I had with my reolink URL’s. Try again once the hotfix is out for your install method.

I edited my post.
I’m also not able to view the video from the camera in the front end. Get stuck on a black screen.
If i switch back to

  • platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://admin:[email protected]/live1.sdp
    name: Driveway2
    Everything works great in the front end though. So it’s something with the generic camera setup that is not working out for me. I know the rtps URL is correct though. I can open it fine in VLC.

Is dafang working with the stream component?

Yup!
Please see my post here:

I tested casting to my google home hub with a service call to
camera.play_stream with a payload of:

{
  "entity_id": "camera.camera1", "media_player":"media_player.home_hub"
}
2 Likes

This works perfectly for my HikVision cameras thank you! I was using the 2nd stream in MJPEG but now I can use the full primary stream…

So how do I get this to cast/stream to a device like Kodi/Chrome Cast etc please?