In this video I stream live TV from a SiliconDust HDHomeRun Extend to a web browser using ffmpeg. The video is served using nginx web browser set up on Ubuntu linux.
<!DOCTYPE html>
<html><head><title>Live Cam</title></head>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<body>
<!-- Use this if you only support Safari!!
<div id="player">
<video id="video" autoplay="true" controls="controls">
<source src="http://ip-address-of-web-server/live/mystream.m3u8" />
Your browser does not support HTML5 streaming!
</video>
</div>
-->
<video id="video" autoplay="true" controls="controls"></video>
<script>
if (Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
// bind them together
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
console.log("video and hls.js are now bound together !");
hls.loadSource("http://<ip-address-of-web-server>/live/mystream.m3u8");
hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
console.log("manifest loaded, found " + data.levels.length + " quality level");
});
});
}
</script>
</body>
</html>