Setting up Xtream Codes with a CDN
1. First of all, you need to purchase a license from here.
2. Purchase or use a dedicated server. We recommend purchasing a dedicated server from DataPacket.
3. For the Operating System, choose one of the following: Ubuntu 13.x, 14.x, Debian 7.x & CentOS 7.x
4. Once you have purchased the license, log into your CMS panel with the root username and password. Add your main IPTV server on following page:
5. Find the SSH access details of the dedicated server you purchased and enter them into the above form. Leave all options as they are in the above screenshot. When you proceed with this, the main IPTV server will start to install on your dedicated server. This will take a few minutes.
When your main IPTV has finished installing, you can start to set it up.
6. Obtain some stream links which you would like to stream from your Xtream Codes panel and deliver through a CDN.
7. For the purpose of this tutorial, we will add 1 stream. Scroll down on the left side of your Xtream Codes panel until you see the following:
8. Click on “Add New Stream” Enter a name of your choice in the "Stream name". In the "Enter live stream URL" field, enter the link. For HLS stream (.m3u8). Click on “Source”, afterward click on “Main IPTV Panel”.
NOTE: In the future, when adding more servers, you can assign the stream to another.
9. Create a new “Bouquet”, on the left side of the panel, scroll down and click on “Add New Bouquet”.
10. Add streams from the left side to the right. When you are done, click on “Add New Bouquet”.
11. On the left side of the Xtream Codes panel, scroll down to register a new user.
12. Fill in all the fields to register new user. When you have it all filled, click on “Register New User” .
13. Scroll down on the left side of your Xtream Codes Panel. Create a new “Streaming Line”. Streaming lines are used for creating playback URLs for live stream playlists. It is also possible to generate different types of URL’s for different devices through “Streaming Lines”.
14. Enter a username, password and assign the "Streaming Line" to the member you previously registered. For Max Allowed connections, please set it to 0, meaning unlimited. It limits the number of connections connecting to your stream.
In terms of debugging, it is better to set it to unlimited as the stream will be accessible through a different CDN link. At the end of the page, add the streams you previously created the “Bouquet” for. Add them from the left to the right. After you have set this up click on “Create New Line”.
15. Scroll down on the left side of the Xtream Codes panel and click on “Manage Streams”. Click on the play button on the right side of the page.
If this appears, it means that Xtream Codes is restreaming the stream correctly.
16. We will create a playback link which you are able to play, in a program such as VLC or in a web-based player. On the left side of the Xtream Codes panel scroll until you find “Manage Lines”.
17. Click on the green arrow pointing down. Scroll down until you find m3u. You get a link similar to the following:
18. Paste the link into your browser’s URL field, a playlist should be downloaded, it should be titled similarly to: “tv_channels_stream1.m3u”, open up this file in a text editor of your choice.
19. Now sign in to your CDN77 account and Create a new CDN Resource.
NOTE: Don’t forget to specify the port corresponding with the link which "Streaming Line" generated for you.
Now, use the CDN Resource URL in the field of your server’s Origin IP address and from now on everything will be delivered by the CDN.
Without CDN: http://[IP Address]:25461/live/stream1/stream1/3.m3u8
Delivered by CDN: https://123456789.rsc.cdn77.org/live/stream1/stream1/3.m3u8