SESEME TECHNOLOGY

Saturday, January 25, 2025

Step-by-Step Guide: Creating and Streaming M3U8 Files



Please check this video if you need to have some ideas on how to create a M3U playlist on a single file and play it on any app that can play M3U files, especially VLC, on any devices, either a computer, smart TV, or smart phone.

We are going to use free software for this tutorial.
We are going to use Notepad++, for adding your playlist of streaming media.

We also going to use Mist server, which is also free software, to get some sample M3u8  streaming media which  is played from OBS

We are going also to use OBS as an encoder to encode the video for using it as a sample in our tutorial.
Lastly, we are going to use VLC Player for checking if our playlist is played or not.
and we will test it on a computer and smart phone.

So let's start.

Open your Notepad plus plus, ready for adding your list.
Just copy the M3U code that I use on it. I also attached the file for easy copying; you can download it from the link below.

That negative 1 you saw is for time; once you put it, it can play a lot without checking time. In other words, you can say unlimited, depending on the length of the clips.

TVG-ID and Name are used for EPG and other table details. If you want to add EPG and other details to your list, these are unique identities to use to allocate these tables.
And last one after a comma is the name of the media that will appear on your playlist.

So after that line of code to be used as format on adding playlist, press enter to start a new line, and then from that is where you can place your link for that where your video is allocated or played from.
For example, if the media is on your PC, you can place the directory of that media, and with the format of that media, for example, if its in MP4 or MP3 format, you can place it like I show it.

So let's start by adding the HLS link to our playlist files.

As I said before,. We are going to generate our own HLS link first by using Mist Server and OBS, both free to use. If your not good with it, please check my tutorial on how to use it.

So open Mist Server first. After it opened and everything went fine, go to the browser to add some settings and monitor our streaming from OBS.

We are going to push the stream on stream name video from OBS encoder.

We are going to use the SRT link to push the stream from OBS to the Mist server. its easy and has a lot of advantages compared with the RTMP link.

So open OBS and paste the SRT link you copied from the Mist server.

The sources for OBS you can put anything you want. for me, I put some source of news channel . that is easy for me to get it.
After that, start your streaming.

Go to your Mistserver to see if your streaming is active.
Perfect. The stream is active and working perfect.

Then go to the protocol stream urls and copy the HLS protocol and paste it on your Notepad++ Playlist.

You can paste as many as the media stream you want.
For today, lets just add only two media to the list.
So I just copy and paste and change some parameter value's.
But for the second one, I am going to use some media from my PC, so for that, I am going to copy the directory of the media locally from the PC.

So we have two media on our playlist, one is from Mistserver, which is an HLS link, and the other is the media from the local PC.

After finishing that, just save your file. Don't forget to add the extension of the file, which is dot M3U.

Go to the saved file and open it with VLC Media player 
and see if you get all the playlist files on it.

Perfect, the file plays well, and as you can see, all two files are shown on the playlist.

The first one is from Mist Server, and the second one is from PC.

Send also the file to your smart phone or smart TV to see if it works fine.
For me, I can send it to my Android phone for this testing.
But on this testing, my PC and smartphone are both on local networks.
So I send the file via Bluetooth.

Then I'm going to open it by VLC media player, which is my favourite player on my mobile phone for the whole time.

perfect it works fine too on  my mobile phone, like you see it.
There is some little bit of delay on the phone compared to the PC, and this is a normal thing on the streaming.

Thank you. I hope you enjoy it. If you found any difficulties, don't hesitate to check me on comment. 

Related Posts:

0 comments:

Post a Comment