Closed vishalsmart closed 2 weeks ago
Hi @vishalsmart You can't simply use html video tag to play HLS. Generally, you need a JavaScript library like hls.js or video.js.
Hi @josephnhtam it's working fine, but there is very much delay on my local wifi for hls. I am using ffmpeg. It's approx 15-17 seconds delay. Can you suggest best arguments to reduce latency?
The latency primarily depends on the keyframe interval and the client-side buffer time. You can transcode your source video to have a specific keyframe interval using the -g option like this
ffmpeg -re -i "video.mp4" -f flv -c:v libx264 -c:a aac -g 24 rtmp://127.0.0.1:1935/live/demo
As a result, a video with 24fps will have a keyframe interval of 1 second.
@josephnhtam great, it improved performance.
How to reduce this duration using config? -
@vishalsmart This is currently the largest duration of the TS segments in the m3u8 playlist. You can reduce it by reducing the keyframe interval.
@josephnhtam can you please guide how to set keyframe interval?
@vishalsmart Please refer to the comment above
@josephnhtam while using FLV, binding custom certification
Giving error: Hosting failed to start System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified,
My bindings - using var liveStreamingServer = LiveStreamingServerBuilder.Create() .ConfigureServer(options => options.ConfigureSecurity(options => options.ServerCertificate = serverCertificate)) .ConfigureRtmpServer(options => options.AddStandaloneServices().AddFlv()) .ConfigureLogging(options => options.AddConsole()) .Build();
Server certificate (pfx) is valid, working fine.
@vishalsmart
options.ConfigureSecurity(options => options.ServerCertificate = serverCertificate)
only configure the certificate for rtmps.
Have you also configured the certificate for the ASP.Net Core Kestrel server?
@josephnhtam yes, I applied Kestrel and it worked. Thanks!
Hi, Can you guide which HLS url in Video Player. I am trying to use https://localhost:8080/hls/live/test10IMIE.m3u8 as video src url and it's not playing.