-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streams limited to around 5fps #83
Comments
the component is generating the basic camera component, is it working for you better in case you are configuring all the cameras manually? thanks |
@craigueh any update? |
i have same issue and i can do some debuging but how to create cameras manualy? |
@craigueh @lsochanowski, @elad-bar, #####################
# ### Blue Iris mjpeg (plays instantly & smoothly but not compatible with HA Stream service)
#####################
# - platform: mjpeg
# mjpeg_url: "http://{username}:{password}@{bi_address:port}/mjpg/{cam-short-name}/video.mjpg"
# name: "HA Name"
#####################
- platform: mjpeg
mjpeg_url: "http://BiAdminHA:sup3rS3kr3t@192.168.1.23:81/mjpg/dahua/video.mjpg"
name: "Dahua MJPEG"
#####################
#####################
### Blue Iris m3u8 (compatible with HA Stream service but incurs 10+ sec delay due to HLS streaming)
#####################
# - platform: ffmpeg
# input: "http://{username}:{password}@{bi_address:port}/h264/{cam_short_name}/temp.m3u8"
# name: "HA Name"
#####################
- platform: ffmpeg
input: "http://BiAdminHA:sup3rS3kr3t@192.168.1.23:81/h264/dahua/temp.m3u8"
name: "name: "Dahua FFMPEG"
#####################
##################### |
Is it working without delay with the ffmpeg component? |
I believe this delay on the FFMPEG camera is 100% due to how the 'stream' component of Home Assistant works. It seems to buffer input so you can start a recording from before when motion was detected.. they call it lookback I do not think that has anything to do with the low fps of the cameras created by this custom_component. |
This custom component just generates generic or mjpeg camera component, i did not implement a camera component by myself, i will check the ffmpeg later this weekend, thanks |
I would not recommend spending time investigating ffmpeg cameras in HA, there is a huge delay (~10s) due to the stream component and, from what I have found in various threads, it is working 'as designed'.
I guess that is where things get strange. I can open two browsers, right next to each other, and have the camera created by this custom_component and the exact same Blue Iris camera created using yaml, as shown in the examples, and the difference is clear to see. The camera created by this component plays very choppy at a very low framerate, I'd guess ~1-3 fps, whereas the camera created in yaml plays smoothly, at what I would guess is the full 15 fps as configured in Blue Iris. Inside
then I deleted the integration through the UI, restarted Home Assistant, and re-added the integration through the UI. I'm not super familiar with python but it looks like that line is setting the frame interval to a fraction of whatever is configured in Blue Iris. I don't know if arbitrarily setting all cameras to 15fps (frame_interval) is a good, or bad, idea... I do know that is what is generally recommended as the sweet-spot for Blue Iris cameras, as noted at ipcamtalk. Perhaps that could be configurable, per-camera, at some point in the future but for now I think arbitrarily setting them to 15 is probably the way to go. |
thanks for the detailed explination, it assisted me to get to the solution. Before the fix, I set the FPS to 2 hard coded and as result it had just 0.5 seconds interval 1 / 2, in general, frame interval is the number of seconds between each frame, meaning 15fps = 0.06 seconds, therefore the calculation should remain as is. please note that Stream component still creates huge delay because of the implmentation of HA for streaming (make sure you are unticking the Stream component in the BI integration's settings) thanks |
It seems that the cameras imported into Homeassistant are limited to a very low frame rate, around 5fps.
I've played with every setting I can find in the Blueiris backend but nothing seems to change it. Viewing cameras in the BI Windows app or via web browser all show 30fps but not Homeassistant.
Update. I've discovered that the h264 stream doesn't seem to be working and the addon seems to fall back to mjpeg. However, the mjpeg stream is somehow generating about 200Mbps traffic when streaming from BlueIris server.
Not sure what's going on here at all...
The text was updated successfully, but these errors were encountered: