Project

General

Profile

m3u, m3u8 support like vlc, simple iptv plugin

Added by Raymond Kibsgaard about 8 years ago

why can`t i import m3u files directly like in vlc, simple iptv plugin for kodi.
i have an m3u playlist file with over 3000 channels. it will take years to manual set one by one channel.

can someone help me with this problem, when i tread about this topic on the web. i feel dumber than i was before,
non of the explanations work not even a bit

tanks in advance


Replies (46)

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron about 8 years ago

Current development versions already have this ability. Update your TVH installation.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

I have the same problem but i don't know how to update my TVH installation. I use libreelec 7.0.2 with kodi, rpi3.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

If you're going to be upgrading software on your own, you should switch to a real operating system/distribution. OpenELEC/LibreELEC are basically just 'appliance' systems with what you see is what you get; if you want to modify your software, update it, or install different software, use a real OS.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by K Shea almost 8 years ago

Robert Cameron: Not everyone is, or wants to be, a Linux guru. It would be nice if the long awaited release of version 4.2 would happen sometime in the coming year, but until that happens the "appliance" version is about at the limit of many people's capabilities. Therefore, your comment is not at all helpful.

To the OP - I don't know if ffmpeg is, or can be installed on your system, but check out this thread, it may or may not contain a solution for you:

https://tvheadend.org/boards/4/topics/23907?r=23925

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

Thanks for the reply. Looking around i found HTS Tvheadend 4.1-2369, that should solve the problem, at the same time i installed the last ubuntu on my vm and then TVH 4.1-2399, i have the same problem so i'm going to suppose that those channels have something on the url that don't work... simple iptv and vlc make those links visible... still investigating. I'm noob here but i try to do my best.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

K Shea wrote:

Robert Cameron: Not everyone is, or wants to be, a Linux guru. It would be nice if the long awaited release of version 4.2 would happen sometime in the coming year, but until that happens the "appliance" version is about at the limit of many people's capabilities. Therefore, your comment is not at all helpful.

To the OP - I don't know if ffmpeg is, or can be installed on your system, but check out this thread, it may or may not contain a solution for you:

https://tvheadend.org/boards/4/topics/23907?r=23925

I am not claiming to be a Linux guru, or saying that users need to be.

The comment about "appliance" OSes was directed at the commenter saying they were running LibreELEC. OpenELEC—and by extension, LibreELEC—are self-described "JeOS" systems: "Just enough OS". This essentially means they only include the bare essentials of an operating system to run their provided software.

From LibreELEC's own wiki: "The base system has been designed and built from the ground up to be as efficient as possible – consuming only tiny disk and memory footprints, and providing cutting edge hardware support to deliver a set-top box experience."

This means that OE/LE are not meant to be used as proper operating systems, but rather as an appliance or set-top box type of installation: You turn it on, it does its thing, and nothing more.

Tvheadend provides already has the features that both the OP and the additional commenter have said they are seeking. The OP has not responded (nor provided any details about their hardware, software or anything), so any additional aid that can be given will be quite limited.

As to the other commenter, they have stated that they are used LE 7.0.2. According to LE's site, their supported addon for Tvheadend is for version 4.0. Their support forum is their primary means of support; and after looking at one post in their PVR support subforum I was able to find a link to nightly and development builds of Tvheadend for LE7.

Tvheadend is the software that many packagers ship as the PVR backend, but it is not up to Tvheadend to support those OSes/distributions, but rather the packager/distributor to support them.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

It's a cool software and I know that I'm noob and for sure I'm doing stupid questions but I really want to learn how to use it, for my home and my family. Said this, I got an update:
Update 1
if i correct the extension of the mux url from ".mp4" or ".mkv" to ".ts" and setting again in mux configuration "scan status" in "PEND", the mux "scan result" go OK. Anyone got any idea? Can't correct manually 100 mux every update. Thanks in advance for the help. I tested on my ubuntu in my VM got same result(TVH 4.1-2399). And another noob question, TVH 4.1-2399 in my ubuntu it's the last dev. version? Or i'm wrong?

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

IIRC, the IPTV network type is a subclass of the MPEGTS. The reason this matters is that it means that IPTV muxes must be MPEG transport streams. There's the workaround about feeding your streams to ffmpeg so it can repackage them into a proper MPEG-TS type, but otherwise your streams of mp4s and MKVs won't work for this reason. (Similarly, this is also why M3U8/HLS streams won't work, because those are just segmented mp4s, not MPEG transport streams.)

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

Thanks very much for the help, I'm going to search the "workaround" :) . I investigated more and i found other mux with ".mkv" as url that, with no reason, got the "scan result"=OK. And now i'm a bit confused ... a bit more than before :) .

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

Nannus Coripot wrote:

Thanks very much for the help, I'm going to search the "workaround" :) . I investigated more and i found other mux with ".mkv" as url that, with no reason, got the "scan result"=OK. And now i'm a bit confused ... a bit more than before :) .

Well, I would recommend checking the codecs used. MPEG-TS, MP4 and MKV are container formats. They can hold myriad codecs. It could be a mismatch between what TVH is expecting and what is being sent.

Honestly, without details or specifics, any ideas offered are just guesses.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

Robert Cameron wrote:

Nannus Coripot wrote:

Thanks very much for the help, I'm going to search the "workaround" :) . I investigated more and i found other mux with ".mkv" as url that, with no reason, got the "scan result"=OK. And now i'm a bit confused ... a bit more than before :) .

Well, I would recommend checking the codecs used. MPEG-TS, MP4 and MKV are container formats. They can hold myriad codecs. It could be a mismatch between what TVH is expecting and what is being sent.

Honestly, without details or specifics, any ideas offered are just guesses.

i will work on it ty.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by K Shea almost 8 years ago

Nannus Coripot wrote:

Thanks very much for the help, I'm going to search the "workaround" :) . I investigated more and i found other mux with ".mkv" as url that, with no reason, got the "scan result"=OK. And now i'm a bit confused ... a bit more than before :) .

I think this thread may help you with the "workaround":
https://tvheadend.org/boards/4/topics/23907?r=23925

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

Ty, I'm back from christmas holidays, going in again :) .

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Chris Nicholaidis almost 8 years ago

I use an ffmpeg pipe to bring in m3u8 files- here's one for NASA as an example:

pipe:///usr/bin/ffmpeg -i http://nasatv-lh.akamaihd.net/i/NASA_101@319270/master.m3u8 -vcodec copy -acodec copy -f mpegts pipe:1

I've noticed some ts streams need to be ran via a pipe to basically error check the stream first or you can end up with an overflow of errors so something like this:

pipe:///usr/bin/ffmpeg -i http://yourstream -vcodec copy -acodec copy -f mpegts pipe:1

Both work perfectly for me and everything in our TVH is IPTV based, no physical tuners

PS Where it has the pipe bit and path, this needs to be the path to your install of ffmpeg, that's kind of default and we're on Ubuntu 14.04

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

I recommend using the -flags +global_header ; in my experience it seems to alleviate many problems with the generated streams.

Also, as a shortcut, -c copy will set the codec to copy for all streams.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by K Shea almost 8 years ago

Robert Cameron: Good call on the -c copy, I did not know you could do that. I edited my post in the other thread to do it that way.

Just out of curiosity, do you know if it is possible to do -c copy but then have an exception for one type of stream? For example, to copy all streams EXCEPT audio, which you want to modify the format of in some way? If there were, that would be a big help in a couple of situations.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

K Shea wrote:

Robert Cameron: Good call on the -c copy, I did not know you could do that. I edited my post in the other thread to do it that way.

Just out of curiosity, do you know if it is possible to do -c copy but then have an exception for one type of stream? For example, to copy all streams EXCEPT audio, which you want to modify the format of in some way? If there were, that would be a big help in a couple of situations.

Yes, you can copy codecs and then specify an override, such as:

ffmpeg -i file.mkv -c copy -c:a aac file.mp4

That will take an MKV and copy all of the codecs in place except for audio, which it will re-encode into AAC. (I figured that was a decent example, since if you are using MKV you might likely have AC3 audio, which you cannot use with MP4 containers.)

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by K Shea almost 8 years ago

Robert Cameron wrote:

Yes, you can copy codecs and then specify an override, such as:

ffmpeg -i file.mkv -c copy -c:a aac file.mp4

That will take an MKV and copy all of the codecs in place except for audio, which it will re-encode into AAC. (I figured that was a decent example, since if you are using MKV you might likely have AC3 audio, which you cannot use with MP4 containers.)

Great, that's exactly what I wanted to know. Thanks!

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Nannus Coripot almost 8 years ago

Chris Nicholaidis wrote:

I use an ffmpeg pipe to bring in m3u8 files- here's one for NASA as an example:

pipe:///usr/bin/ffmpeg -i http://nasatv-lh.akamaihd.net/i/NASA_101@319270/master.m3u8 -vcodec copy -acodec copy -f mpegts pipe:1

I've noticed some ts streams need to be ran via a pipe to basically error check the stream first or you can end up with an overflow of errors so something like this:

pipe:///usr/bin/ffmpeg -i http://yourstream -vcodec copy -acodec copy -f mpegts pipe:1

Both work perfectly for me and everything in our TVH is IPTV based, no physical tuners

PS Where it has the pipe bit and path, this needs to be the path to your install of ffmpeg, that's kind of default and we're on Ubuntu 14.04

Following this I got new error in TVH with a 120 row log but it's really too much specific for me, can I show it here?

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Bert Haverkamp almost 8 years ago

Hello all,

I've been looking for something similar for a while. I am on the latest development version of tvheadend, but configuring it for my IPTV provider has turned out a more daunting challenge than I expected.

It is clear that tvheadend was originally developed for DVB channels with frequencies, muxes and services.
For IPTV providers, I think it is now common to have a m3u file with several hundred of channels. My provider currently allows only one stream concurrently, and frowns upon quick channel skipping. It blocks your IP address if it suspects abbuse. So scanning them in quicl consession all is not appreciated.

Ideally, like Raymond mentions the configuration could be as easy as in IPTV simple client in Kodi.
Just specify the url for the m3u file. Optionally also for the EPG xml file and for the icons. And a setting for the maximum number of concurrent streams. That is about all the input that is needed.

Is there any development in this direction for IPTV. The "IPTV automatic network" is already a good step in that directions. But IPTV looks like it is the future, so adding this in a user friendly manner would be an great addition.

Regards,

Bert

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Jean Machine almost 8 years ago

Robert Cameron wrote:

Current development versions already have this ability. Update your TVH installation.

Hi,

THANK YOU for this - I installed stable and tried to load an m3u and had it fail on me. I found this while trying to debug the issue.

My issue now is that, while it imports correctly (with an OK) no channels are loaded according to the UI. hitting 'play' on the left of the mux row and importing the m3u into VLC will always play the first channel. Any idea what might cause that?

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

Muxes need to be scanned to discover services. And services need to be mapped to channels.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Jean Machine almost 8 years ago

I don't think I've done the part of mapping services to channels. Thank you! I will try this tonight.

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Jean Machine almost 8 years ago

Robert Cameron wrote:

Muxes need to be scanned to discover services. And services need to be mapped to channels.

I have gone through this process of mapping services to channels, I believe, but I'm probably doing something wrong. Nothing seems different, and I don't see the correct numbers of channels loaded from the m3u.

I would most definitely appricate a sanity check of my current flow. FYI my m3u file has about 20 channels right now. I've confirmed that it is loading fine when I load it in VLC (VLC playlist will show each item in the liste). After install:
1) configuration tab
2) dvb inputs
3) create one network. added a network name
4) go into muxes and add one, with the url of my m3u file being served over http. added a mux name, added a service name. The scan result is OK/
5) Go into services tab (I believe a service was automatically created for me?)
6) Click ont he one service, click on map selected, click on map selected service
7) Pick the correct service with no other changes
8) Click Map services
9) Service mapper tab opens. Now once I actually saw activity here. Going through the same process again (so i copy my steps specifically) doesn't map anything, it seems.
10) Going back into Muxes, it says 1 channel is loaded. There should be 20 (presumably one channel per entry in the m3u?)

Downloading the m3u playlist from the Mux tab (the play button on the left of the row) will load fine in VLC but it will only show the first video in the m3u list. Ideally this should show everything from my m3u list.

I would most definitely appricate any help here!

RE: m3u, m3u8 support like vlc, simple iptv plugin - Added by Robert Cameron almost 8 years ago

Jean Machine wrote:

Robert Cameron wrote:

Muxes need to be scanned to discover services. And services need to be mapped to channels.

I have gone through this process of mapping services to channels, I believe, but I'm probably doing something wrong. Nothing seems different, and I don't see the correct numbers of channels loaded from the m3u.

I would most definitely appricate a sanity check of my current flow. FYI my m3u file has about 20 channels right now. I've confirmed that it is loading fine when I load it in VLC (VLC playlist will show each item in the liste). After install:
1) configuration tab
2) dvb inputs
3) create one network. added a network name
4) go into muxes and add one, with the url of my m3u file being served over http. added a mux name, added a service name. The scan result is OK/
5) Go into services tab (I believe a service was automatically created for me?)
6) Click ont he one service, click on map selected, click on map selected service
7) Pick the correct service with no other changes
8) Click Map services
9) Service mapper tab opens. Now once I actually saw activity here. Going through the same process again (so i copy my steps specifically) doesn't map anything, it seems.
10) Going back into Muxes, it says 1 channel is loaded. There should be 20 (presumably one channel per entry in the m3u?)

Downloading the m3u playlist from the Mux tab (the play button on the left of the row) will load fine in VLC but it will only show the first video in the m3u list. Ideally this should show everything from my m3u list.

I would most definitely appricate any help here!

If your M3U playlist defines only 1 item, then that might work.

Otherwise, M3U playlists are used with the Automatic IPTV Network type. When you create the network you specify the M3U as part of the creation process. Tvheadend then reads the M3U and creates a mux for each item in the playlist.

Your IPTV muxes should be URLs to a specific stream, not to playlists.

The process should be:
  1. Create Automatic IPTV network
  2. While creating network, specify URL of M3U (and optionally, max number of streams allowed) This will create a mux in the network for each item in the M3U
  3. If you have not selected "Scan upon create", after creating the network, force scan it. This will scan and try to open each mux. For each mux it can successfully open, it will create a service.
  4. From the services, map them to channels.

That should get you started. But, if using M3U playlists, you should be using the Automatic IPTV network, which is only in 4.1

(1-25/46)