How to perform HLS network streaming?
Video Capture SDK .Net and Video Edit SDK .Net can stream live videos or convert them to HLS files for future streaming.
HLS based on HTTP, and you need to install an HTTP server.
Windows have IIS available as part of OS, but usually, it's not installed by default. Also, you can use any alternative HTTP server, but you'll need to handle .m3u8 and .ts files correctly.
- Install IIS if required. Open the "Turn Windows feature on or off" dialog and select the IIS checkbox.
Create c:\inetpub\wwwroot\hls folder to store video files and playlists.
Upload web.config file to this folder to configure file routing.
Start Video Capture SDK / Video Edit SDK Main Demo. Select the Network streaming tab for live streaming or HLS output format to save video files for future streaming. By default, video files will be saved to c:/inetpub/wwwroot/hls for network streaming. Select this folder for HLS output format manually.
Now, we need to create an HTML page with a player to play live stream or converted video files. You should see playlist.m3u8 and several .ts files in the output folder. You can use this player. We have a custom version with a player set to play out the playlist.m3u8 file. Unzip player to the output folder.
Open playback URL in a browser. You can use alternative players or HTTP servers or play on Android / iOS devices.
- Base redist
- SDK redist
Visit our GitHub page to get more code samples.