I have been working with ffmpeg camera streaming from a xiami rtsp origin, and I am seen that component is transcoding h264 in a mjpeg feed to show in a browser…
Thats suposse a lot of CPU on a RPI, and low framerate.
Can be possible to sacrify a little realtime (5-10 seconds delay) to without reencode, create a HLS h264 feed?
I have good skill in ffmpeg command-line (create m3u and mp4 parts from RTSP feed without CPU charge), but I dont know if a HLS player has been included in lovelace?. I couldnt see any similar.
Thanks…
**PD. **
I have included (here in 4th post), a working scenario with a RPI camera capturing at 1280x720@15fps in H264 (tipically 30~40 kbps in no-moving scenario), and less than 3% of CPU!!!, all avaliable in Home Assistant web server (but not in lovelace cards).
Hello again.
I have now a raspberry pi camera, and I want to have a lovelace picture entity with full rate h264 video. But I can`t figure how to get it. I dont understand what ‘stream’, ‘generic camera’, ‘ffmpeg camera’ componets means, but what I want is not to reencode anything (minimum CPU) and good framerate (>15 fps).
I can easily make a local HLS stream (m3u), and I have read that new lovelace cards support hls.
But I dont know how to make it work.
This create a great quality h264 stream ( with less than 50MB buffer) prepared to HLS stream in any modern web browser (with proper js player), and all with less than 3% CPU on a RPI3.
But my question is: How I ‘config’ to put this stream in a lovelace image card?
Seems that all stuff in home assistant cards are for camera components with still images…
to see if the ffmpeg capture camera has to be initted by HA, but no results at all.
The only thing I could obtain was a little thumbnail associated to the first camera ffmpeg attempt.
Please, any help or orientation could be appreciated.
For those that has a raspberry pi camera, I will show how to use HA web server to serve full rate great quality stream with HLS, with absolute no encoding (CPU<3%).
This is for ‘env’ install under homeassistant user:
You can see the pi camera 720p@15fps on your HA browser, with almost zero CPU!!! on your RPI (and a minimum delay of 5 secs for how HLS works)
Please, take into accout that this is only a proof-of-concept, with no security considerations,etc.
Now, if you like it, follow this post, to see if anybody can help in how to integrate this in lovelace HA (so you can start-stop camera stream automatically when open the camera (to not waste your sdcard), not depend in HLS plugin, etc.)
HLS is a standard for video-stream prior to webm stuff, supported by all browsers with javascript, even Safari (builtin).
It’s working great on VLC but the Chrome extension can’t catch the file, while its working with other URLs (like this one). Chrome simply downloads my m3u8 file.