Correct, but still don’t know why I see a black screen , when stream: is enabled
Can’t get it working with a Hikvision NVR - stream URL below opens fine in VLC. I had to put the user/pass in the stream URL otherwise I see a 401 Unauthorised in the Home assistant logs.
Symptoms are that when I click on a camera I just get the black box, controls and spinning circle. The logs show serving stream and no errors. Still image works fine
Any thoughts?
- platform: generic
still_image_url: http://192.168.0.xxx:80/ISAPI/Streaming/channels/100/picture
stream_source: rtsp://uid:[email protected]:554/Streaming/Channels/102/
name: 'My First Camera'
username: uid
password: pass
authentication: digest
I get working camera Tenvis:
- platform: generic
still_image_url: http://username:[email protected]/tmpfs/auto.jpg
stream_source: rtsp://username:[email protected]:554/11
It show snapshot, show stream, but then HA stops. It is problem with other not supported cameras that I have also-mpjeg,ffmpeg?
Ok made some progress here -
/x02/ on the NVR is the ‘substream’ which is in MJPEG format - it seems that the stream component doesn’t like this today…?
Changed to /x01/ which is a full HD H264 stream and now getting different errors in the logs…
2019-03-22 16:46:35 ERROR (stream_worker) [libav.h264] error while decoding MB 127 0, bytestream -26
2019-03-22 16:46:35 ERROR (stream_worker) [libav.h264] error while decoding MB 50 89, bytestream -5
2019-03-22 16:46:36 ERROR (stream_worker) [libav.h264] error while decoding MB 78 2, bytestream -9
2019-03-22 16:46:38 ERROR (stream_worker) [libav.h264] error while decoding MB 64 25, bytestream -15
And on a different camera on the same NVR…
2019-03-22 16:47:32 INFO (MainThread) [homeassistant.components.http.view] Serving /api/hls/35c61b56226299c59ee9b747b6f75ce961d9cc5b44cbcdb110edabbc542b5049/playlist.m3u8 to 192.168.0.xxx (auth: True)
2019-03-22 16:47:33 ERROR (stream_worker) [libav.h264] Missing reference picture, default is 65562
2019-03-22 16:47:33 ERROR (stream_worker) [libav.h264] Missing reference picture, default is 65564
2019-03-22 16:47:33 ERROR (stream_worker) [libav.h264] error while decoding MB 96 7, bytestream -9
2019-03-22 16:47:34 ERROR (stream_worker) [libav.h264] Missing reference picture, default is 65566
And it does finally load in the front end after a lot of waiting… it’s pretty corrupted tho!!
It worked for me on wifi only, (also dafang hacks) the image is fine, though stream doesn’t seem to work when outside my network. The rtsp stream works fine in vlc outside my network.
Edit: I removed the framerate line, seems to be working now.
Here’s my config that works (obtained the rtsp stream url from Synology):
- platform: generic
stream_source: !secret porch_rtsp_camera_image_url
still_image_url: http://USER:[email protected]/ISAPI/Streaming/channels/101/picture
name: Porch 2
Note that the still_image_url
is directly from Hikvisions (not Synology).
That looks like what I see when putting the pi to work on a 1080p stream. A lower resolution or faster HA platform should help.
-Jan
When you set up rtsp streams on the unifi video nvr you can also setbitrate and framerate in the same dialog.
Thanks Jan - I think I’m coming to the same conclusion.
I’ve dropped all the cameras to 720p and 2M bitrate - they are loading better, still not perfect but at least they are loading now.
Poor Raspberry Pi - it’s days may be numbered!
And what’s the rtsp stream? You have it in secret
Yes, I have the same… Strange
Maybe it depends what the actual camera is, I have those cheap foscam
I keep getting av.AVError: [Errno 825242872] Server returned 401 Unauthorized (authorization failed): 'http://192.168.1.80:81/h264/Cam3/temp.m3u8'
when i have it set user and pass and can confirm stream works with vlc
- platform: generic
still_image_url: http://192.168.1.80:81/image/Cam3
stream_source: http://192.168.1.80:81/h264/Cam3/temp.m3u8
username: !secret blue_iris_camera_stream_usrname
password: !secret blue_iris_camera_stream_pass
name: Number 12 Stream
authentication: basic
maybe try lowercase cam3
? personally I whitelisted the HA server IP in BI webserver and didnt provide auth locally.
i have tried …how did you whitelist
How long did it spin before it came up (even in the corrupted state). I’ve waited a good minute or so, and nothings come up. I’m actually using laview cameras and NVR, but its pretty much the same as the hikvision stuff
Go to BI Settings -> Web Server -> Advanced -> Require from “Non-LAN only” -> text box for limit IP address add ^192.168.1.x
add one for each IP that you want to whitelist, each IP shoudl be on its own line. Shift+enter will go to a new line, enter will close the prompt lol
For dafang/wyzeV2 with custom firmware (which enabling rtsp server) in System -> Video -> Video Format try to set Video format to FixedQp.
It works for me via UI w/o any issues on hassio 0.90.1 (there only small delay 1-3sec, idk is it expected)… also there no errors in console (for other video formats I had a lot of strange errors & stream interruptions).
But still I can’t stream to my chomecast/google home hub using service camera.play_stream… any suggestion to get that feature work as well?
Here is my working configuration with the following Foscams:
- Foscam C1
- Foscam FI9821P
- Foscam FI9821W
I don’t know if it will work with others. It should work with most, but probably not all.
- platform: generic
name: "Camera Name"
stream_source: rtsp://username:password@ipaddress:88/videoMain
still_image_url: http://ipaddress:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=username&pwd=password
username: !secret camera_username
password: !secret camera_password
verify_ssl: false
The username and password lines are probably redundant since its in the url, but I left them in just in case.
and you have a fluent stream on those foscams? especially on that C1