HTTP Live Stream Setup from DVB Receiver

Live Stream Setup

Requirements

  • Setup Box with HDMI output in 720p
  • HDMI Splitter to remove HDCP Protection (Working Splitter Amazon)
  • Capture Card (a.e Avermedia Broadcast HD)
  • Adobe Flash Live Encoder
  • nginx with RTMP Module
  • VLC
  • Apache2




Installation

Adobe Flash Media Encoder

First make sure that the Capture Card is installed and working right on the Capture PC, check also that the Capture Card is compatible with Adobe Flash Media Live Encoder. Download the Adobe Flash Media Live Encoder from the official Website: http://www.adobe.com/ch_de/products/flash-media-encoder.html and install it on the Capture PC, you need to create an Adobe ID to download it. You need a good CPU, I am using a Intel i7 and CPU load on encoding is around 30%.

Nginx and RTMP Module

On your Linux VPS Server, install nginx and the rtmp module:





Download and install the nginx init Script:

VLC

Make sure that you have configured wheezy-backports on your system: http://backports.debian.org/

Apache2

Configuration

Nginx

Add an include to the bottom of the main nginx configuration file:

Change also the listener to 127.0.0.1:8000

Create a new config file for nginx wiith the rtmp parameters

Start nginx

Now the nginx Daemon is ready to receive RTMP streams to rtmp://0.0.0.0/live/mystreamname, you need to configure this address in the Flash Media Live Encoder.

Setup-Box / DVB Receiver

Make sure that the DVB Receiver is sending the HD output in 720p.

Flash Media Live Encoder

This is a good setup for 720p, in “FMS URL” you need to configure the Stream Address of your nginx setup, a.e rtmp://1.2.3.4/live and in “Stream” name of the Stream, a.e channel name. Now you can start the stream by klicking on “Start”.

Live Encoder Settings Users can watch the channel on the address rtmp://1.2.3.4/live/mystreamname, but we want an HTTP/HTTPS Stream, so we need to configure VLC and Apache2.

You can also use the command line tool of Adobe Media Live Encoder:

HD.xml is the profile file:

VLC

Add a dedicated user, VLC can’t run with root privileges:

This is the command line to get the RTMP stream and redirect it on a HTTP Socket:

–extraintf telnet: opens the telnet interface

–telnet-password “vlc”: set the password for telnet to vlc

–telnet-port 9090: telnet interface listen on port 9090

rtmp://127.0.0.1/live/mystreamname: stream input

–sout ‘#standard{access=http,dst=127.0.0.1:8090/mystreamname.flv}’: create http socket mux the stream as flv and send stream to http://127.0.0.1:8090/mystreamname.flv

You can also work with screen and start the command with root:

You can connect to the telnet interface with telnet or netcat to manage the stream.

Apache2

Enable proxy module:

Configure proxy access in Apache2:

Reload Apache2

Now users can access with http://1.2.3.4/ABC123Key/channelname.ch to the stream, https is also working (if you have configured SSL in Apache).

For security reasons make sure that only port 80 and 443 is accessible from the WAN.