April 17, 2013

HLS re-streaming mapping setup and usage

In the previous post about new Nimble HTTP Streamer we've got a description of general server functionality for streams re-transmission, or "pseudo-streaming". Now let's see how you can set it up for HLS and Smooth re-streaming.

Installing and operating


All installation steps are described at Nimble Streamer installation page. Basically an admin must do those simple steps:
  1. Install the server software from Debian package.
  2. Register the new installed server in WMSPanel by just 1 command.
  3. Restart the server.
Follow them as described in installation procedure before continuing.

Setting up routes mapping


Once you've installed the server, it will appear in servers list within several seconds:


Now go to server details and click on Edit routes. You can also use Control / Edit Nimble Routes menu.


Here you can see two sets of fields - From, To, Assigned servers and URL for player. See route description below for details.

Nimble Streamer routes list.
To change route settings, click on its name. To create new route click on Add re-streaming route.


Route editing for has 2 field sets.

Where incoming requests are coming. It's "From" column in servers list. Here you need to specify the domain and path where your incoming requests go to. Your server may handle a big number of domains or IPs so the Domain field should have domain or IP with a port number. This field is optional and if you don't fill it in, Nimble will listen to its default port 8081 at all IP addresses available for current server. Path is the path which is requested during the connection. You can set up "/" and it will accept all incoming requests.

Where incoming requests must be redirected. It's "To" column in servers list. Domain is the host where the request from user connection is forwarded to. It's also domain or IP and its port. This is a mandatory field. You must enter some existing host, like "localhost:1935" etc. Path is the path which will be requested at the host which is used for forwarding. All path requests are mapped as /path_from* -> /path_to* so whatever is entered in "Path from", it will be used as is for "Path to".

If your origin stream uses SSL for streaming and your URL has HTTPS in it, you need to check Use SSL checkbox in this dialog.


Enabling SSL support for HLS origins.

Each route may be applied to several servers at the same time. Just use check boxes to select them. You need to select at least one to make it applied. The selected and applied servers name make "Assigned servers" column in servers list.

Applying route to multiple servers.
Adding these simple routes, you will configure the logic you need for you case.

Further usage


Now when mapping is set up, you can start using the server. You may configure your players to request your streams from new server using its IP or domain name and port 8081. You can set up any other port you like in the config here: /etc/nimble/nimble.conf.

For your convenience we show possible base URLs that you can use for your players in "URL for player" column of servers list. Just put your media file after trailing slash and it's ready to go.

For example your Nimble streamer runs on liveshow.nimblestreamer.com and you want it to handle requests for edge.mynetwork.com at port 1935 where you have /live application. So you set the rule as follows.
Domain from: just empty, since Nimble listens to all IPs of your server on port 8081.
Path from: /
Domain to: edge.mynetwork.com:1935
Path to: /live
That's it. Click on Add and several seconds after these rules will be sent to Nimble and processed properly.

OK, so now you can point your players to new URL: http://liveshow.nimblestreamer.com:8081/. Nimble will do everything else.

Nimble Streamer can listen to any other port, check this blog post about running Nimble on privileged ports like port 80.

If you'd like to protect your content on edges from hot-linking you may use hotlinking protection.

You may also use Nimble as origin server for HLS via RTMP to ABR HLS transmuxing,  MPEG-TS UDP conversion to HLS and MP4 transmuxing to HLS VOD streaming.

Contact us if you have any questions regarding this settings procedure or the Nimble Streamer in general. We'll be posting updates on new features and use cases in this blog and Twitter.

Related documentation


Nimble HTTP StreamerTransmuxing RTMP to ABR HLS, MP4 transmuxing to HLS VOD streamingMPEG-TS UDP conversion to HLS with NimbleSmooth Streaming supportNimble configs explainedNimble Streamer HTTP hotlinking protectionNimble Streamer geo-location restriction,  HLS caching for effective re-streamingRunning Nimble on privileged ports

No comments:

Post a Comment