Welcome to World of IPTV

With

+23k members
+11k threads
+106k posts

we are the most popular IPTV community on the web. 

IMPORTANT NOTE:
WE HAVE RECENTLY NOTICED THAT TOO MANY DOUBLE FAKE ACCOUNTS ARE CREATED IN THE PAST.
TO PREVENT THIS ISSUE THE DECISION WAS MADE THAT IN THE FUTURE A ANNUALLY FEE 20 EURO WILL BE RAISED FOR NEW MEMBERSHIPS.

Join now to the World of IPTV

Forum Rules

Before you start, check out the forum rules first

Account upgrade

Upgrade your account to get access to full features

Advertising

Would you like to place your advertisement with us ?

Resources Manager

Hundreds of IPTV scripts and apps are available for download

Tutorial Encode and share your own HLS IPTV channel using VLC, Debian 10 and FFMPEG

kimbrasil

Extended Member
Ext. Member
Joined
Apr 21, 2020
Messages
11
Reaction score
67
Points
14
Location
Brazil
This is a basic and simple tutorial to stream your own channel to the world using HLS streaming (.m3u8), using my own recent experience.

In this case I'll be using one computer (in my home) to generate the source using VLC and other (Cloud VM) as server to distribute the content, due to low bandwidth in the generator side,

I'm using Debian GNU/Linux 10 as example in the server side, but you can adapt to use in any other OS. I'm presuming who will use this tutorial already know at least the basics of Debian (or Ubuntu) and VLC. Check the local and server machine have full access to the internet and the desired ports open and forwarded, in this example I'm using HTTP port (80) in the web server and 30000 port in my home.

Firts, install Apache 2 HTTP server and FFMPEG in your Debian server side

$ sudo su # apt update # apt install apache2 ffmpeg

Now start the apache 2 server, go to your server http root, create a subfolder folder that we'll use for stream your live channel, make permissions.

# service apache2 start # cd /var/www/html # mkdir myiptv # chmod 775 myiptv -R

Install VLC in your home computer (I'm using Windows here) and open it, Go to Media > Stream

KnMwNF1.jpg


You can use capture devices like Webcam, Tuner Card, Network source, local file, or a Disc devices. I'm using my webcam in Windows side in this tutorial.

a5C4NB6.jpg


Press Next in the source and when in Destination Setup screen select HTTP and click on Add

SlujxIE.jpg


I'd changed the port to 30000 because my ISP blocks to serve lower ports usage.

BdGqHww.jpg


Change the profile to H.264 + MP3 TS and click in the tool icon

kdO9F06.jpg


Use H.264 as default video codec with desired bitrate

oE6oTVc.jpg


Use AC3 as default audio codec with desired bitrate, "Save"

dHY45iS.jpg


click on "Next" and on "Stream".

Check your Home PC address to the internet, in this example I'll use 123.45.67.89 , If your PC is behind a NAT, forward the port in your router to your PC.

Get back to the server and run the FFMPEG to re-stream your content in HLS format:

$ ffmpeg -i http://123.45.67.89:30000 -c:v copy -c:a copy -f hls -hls_time 10 -hls_list_size 6 -hls_wrap 10 /var/www/html/myiptv/stream.m3u8

As the FFMPEG is not encoding in this example, just restreaming the content, there is no extra CPU usage.

Now you can access the URL from your server in your browser, in the example I'll use 198.76.54.32 as the server IP

E4LRW93.jpg

Now it's running and UP! Now you are able to share your HLS URL "http://198.76.54.32/myiptv/stream.m3u8" with the world!

After this you can learn more about FFMPEG and how to use some of your hardware features to decode and use less CPU, stream more substreams, etc... how to configure other Apache2 features and automatize your server side to run the FFMPEG when start and try to reconnect when have disconnection.
 
Last edited:

dishjuarez

Extended Member
Ext. Member
Joined
Dec 3, 2019
Messages
53
Reaction score
261
Points
64
Location
el paso
very good tutorial, I will practice it, if it works I let you know right here, thanks
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

kimbrasil

Extended Member
Ext. Member
Joined
Apr 21, 2020
Messages
11
Reaction score
67
Points
14
Location
Brazil
https://prnt.sc/s3mlyv

I did it and if it works very well, will there be a way to transmit more channels from the same server?
Yes, it's possible if you have enough bandwidth! Only need to create more subfolders and FFMPEG instances


$ chmod /var/www/html/myiptv0 $ chmod /var/www/html/myiptv1 $ chmod /var/www/html/myiptv2


$ su #nano /opt/mystreams.sh
PHP:
ffmpeg -i http://123.45.67.89:30000 -c:v copy -c:a copy -f hls -hls_time 10 -hls_list_size 6 -hls_wrap 10 /var/www/html/myiptv0/stream.m3u8 &
ffmpeg -i http://123.45.67.89:30001 -c:v copy -c:a copy -f hls -hls_time 10 -hls_list_size 6 -hls_wrap 10 /var/www/html/myiptv1/stream.m3u8 &
ffmpeg -i http://123.45.67.89:30002 -c:v copy -c:a copy -f hls -hls_time 10 -hls_list_size 6 -hls_wrap 10 /var/www/html/myiptv2/stream.m3u8
# chmod 777 /opt/mystreams.sh #./opt/mystreams.sh
 

dishjuarez

Extended Member
Ext. Member
Joined
Dec 3, 2019
Messages
53
Reaction score
261
Points
64
Location
el paso
a question friend, does the "xteve" program have the same function?
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

delta1372

If it moves, compile it!
Banned
Ext. Member
Joined
Jun 17, 2020
Messages
90
Reaction score
1,584
Points
194
Location
A Blackhole
You should write some error checking into these scripts though.

They will not auto restart if / when they die and simply running the main start script wont work as it will create dupes and spawn zombies.

I would suggest only using this as a framework to exand and code more functions into the work flow. Do NOT use this in a production setup.

Nice starting blocks though.
 

peezy

Extended Member
Ext. Member
Joined
Oct 2, 2019
Messages
56
Reaction score
255
Points
44
Location
The Woods
There might be a post like this already


I like to watch out for that hammer xD
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Top
AdBlock Detected

We know, ad-blocking software do a great job at blocking ads. But our site is sponsored by advertising. 

For the best possible site experience please take a moment to disable your AdBlocker.
You can create a Account with us or if you already have account, you can prefer an Account Upgrade.

I've Disabled AdBlock