Video lag in ProtectLivesteam
j4zzcat opened this issue · 4 comments
Describe The Problem:
I'm using the unifi-protect
package to stream the video of a single camera to ffmpeg
and product HLS video (this format is suitable for consuming via a web page). There's a lag of about 15 seconds in the video - is this normal?
To Reproduce:
Followed the docs for listening to the message
events of ProtectLivestream
. I'm feeding these directly into ffmpeg
stdin
(i.e., -i pipe:0
) for transcoding into HLS. I'm watching the transcoded stream with VLC
.
Mea culpa. The lag is introduced by HLS.
There is no lag. It’s used in my homebridge-unifi-protect plugin and it livestreams video with sub-second latency just fine. It’s also used by the native UniFi Protect webUI to show livestreams.
I won’t troubleshoot your FFmpeg challenges (well beyond the scope of support I provide), but your issue is there, not with the API or this library.
Mea culpa. The lag is introduced by HLS.
Enjoy! Glad you tracked it down.
This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.