HLS distribution mini HowTo


FBE200 is just an encoder, it can only serve directly only a small number of clients.
For encoder models supporting HLS protocol direclty, it’s very easy and cost effective to multiply the stream to big number of users. All you need is a standard web-server (like Apache HTTPD server which is free and open source) and the simple hls-proxy application from https://github.com/Viblast/hls-proxy.
hls-proxy will get the stream from the encoder with a single connection, and mirror it to your server. All the clients will connect to the server, who will do the hard work instead of the encoder.

I recommend using Ubuntu server. Simply install an instance of Ubuntu Server 16.04 which is also officially free. During setup, when “tasksel” appears, select to install “SSH Server” so you can log in to it remotely via SSH console (from Windows you can use PuTTY client).
Basic Linux knowledge is required, but even with zero knowledge, searching the Internet gives very simple solutions to these easy steps (hint: you can install “mc” with sudo apt install mc to have a Norton-Commander-like interface to manage files)
After installation log in to the new server, and simply install Apache web server:

sudo apt update
sudo apt install apache2

That will install the Apache HTTP server on the system and you will have HTML pages served from directory /var/www/html. Prepare a new subfolder for your HLS stream:

sudo mkdir /var/www/html/hls

Now it’s time to install hls-proxy prerequisites. Install them:

sudo apt install python
sudo apt install python-zope.interface

Download hls-proxy:

wget https://github.com/Viblast/hls-proxy/archive/master.zip

and unzip it to a directory of your choice on the server. To run hls-proxy, all you need to do is (from the directory where you unzipped it):

./start-proxy.sh http://ip.address.of.encoder:8080/hls/show.m3u8 -o /var/www/html/hls

Now just go with a web browser to http://ip.address.of.server/hls, and click on “stream.m3u8”. Open in VLC or whatever…

To run hls-proxy at boot, just add the command to the file /etc/rc.local:

/path/of/where/unzipped/start-proxy.sh http://ip.address.of.encoder:8080/hls/show.m3u8 -o /var/www/html/hls > /dev/null &
(note the “> /dev/null &” part at the end of the command!)

You can distribute that URL to all the clients:

You can secure installation by using an Ubuntu server with public internet address, adding firewall, etc, but keep the encoder on private IP address - there are several ways to do this, but this is not part of this topic.

Rtsp unicast proxy

If you want to reduce hard drive stress on the server, stop the hls-proxy, delete the /var/www/html/ hls folder created above, and add this to /etc/fstab file:

tmpfs /var/www/html/hls tmpfs nodev,nosuid,noatime,mode=1777,size=10M 0 0

then reboot the server.
After reboot, a 10MB RAM disk will be placed in /var/www/html/hls path, and the proxied content will not be written to disk at all, it will spin only inside RAM! This to serve clients faster and to prolonge SSD/HDD disk lifetime!


how many connecter will it work?


That only depends on the Ubuntu server with Apache, and the network capacity, it’s totally independent of the encoder. Apache can be set up to be redundant and serve hundreds of thousands of clients: http://www.devside.net/articles/apache-performance-tuning

But you can use not only Apache, there are many other HTTP servers which are compatible: https://en.wikipedia.org/wiki/Comparison_of_web_server_software


With this, you can embed the HLS live stream into your webpage (no plugins needed), works from mobile devices too:


Hello Robert:

Thank you for the information.
Do you know how to build the server of Ubuntu streaming server using cloud like aws.amazon.com
We want to build a service for our customers for testing and share.

Have a good day


With HLS, you can only make such a server if you set up an encoder of your own on the public internet, and encode a demo video stream at your premises. That’s because HLS works the other way around, it’s not like YouTube or Ustream where the encoder pushes the stream up to the server. hls-proxy has to connect from the server to the encoder to pull the stream from it, that means the server has to have access to the encoder. That’s also the reason why customers can’t really test it, because each customer has a different network environment, which amazon cloud server can’t see inside.

You could probably set up a demo server with some RTMP functions, but I don’t see the reason, anybody can test for free straight on YouTube.


We need to do some Audio streaming for the live broadcast ,not Video. Just like the icecast.com



Hi Robert,
can I do with centos 6.9 or 7?



In theory yes, you should use centos-specific commands to install packages instead of debian ones I posted.


Hi Robert,
thanks. oops sorry I can’t try this. because my Fm200 not support m3u8 :frowning:


Hi, I have the he FBE200-H264-LAN.
Is there another way for me to use this model and convert RSTP or HTTP from Access to a M3U8 address?
Thank you


Do you have HLS version of the encoder? Can you play your URL http://MyServerIPNumbers:8080/hls/show.m3u8 in VLC?

Also make sure you enabled HLS properly: Custom m3u8 Address