Welcome! Log In Create A New Profile

Advanced

http streaming

Posted by setham 
http streaming
March 23, 2017 05:11PM
Hello,

First thanks in advance for any help.

I am new to Nginx and I am having troubles on how to configure the http block of the configuration file to stream a live working rtmp (debian jessie).

I configured Nginx to accept a live stream through ffmpeg, I can connect VLC to Nginx server using rtmp://server:port/live/stream.

Now I want to be able to open this stream from a browser, so I started to look for options creating a html page and pass the rtmp stream to a js video player.

I use this Guide (https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/) to configure the rtmp section and the http section.. I successfully completed steps 1 to 4, I have a working rtmp, and I can "pass" a live video feed to the server and stream it using rtmp.

When creating an HTML page to "read" the rtmp output to the video player I am lost trying to setup the source.

This is from the link I sent, I think my issue is defining the source "source src="

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Live Streaming</title>
<link href="//vjs.zencdn.net/5.8/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/5.8/video.min.js"></script>
</head>
<body>
<video id="player" class="video-js vjs-default-skin" height="360" width="640" controls preload="none">
<source src="http://localhost:8080/hls/stream.m3u8" type="application/x-mpegURL" />
</video>
<script>
var player = videojs('#player');
</script>
</body>
</html>


Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready