Live TV (IPTV Support)

THAT was it… probably from what I was initially setting up the plex server and I didn’t know what I was doing… and I went with bad advice…

Working like a champ now… thank you…!

I’m still seeing one issue and I’m wondering if it’s either my configuration or that I need your specialized version of TVHeadEnd to make this work… recordings will at times fail in Plex and I have to go in, watch and restart. I’ll watch again this morning to see if it happens and what the error messages are but any advice you have (or if you could recommend a solid IPTV provider) would be appreciated…

Would also love to check out your customizations to Tvheadend as well.

I’m not sure about the recordings. I rarely use the DVR in Plex but TVheadend has recording capabilities too you could check out.

If you have access to a compiler (gcc) you could build my docker container from scratch. It’s a modded clone of linuxserver.io with streamlink capabilities.

If you are unable to build the containers from scratch I could build it for you and host it on my dedi. The image will be around 450MB.

Thanks for the tip… one OTHER question… how do you work with IPTV services that have ENORMOUS numbers of channels and their own EPG and distill them down to a subset that won’t kill either xteve or tvheadend?

I just tried a service that touted over 60k channels… and the pull of the M3U did not go over well for TVHeadEnd or xteve at all:stuck_out_tongue: I’ve heard of webgrabplus but not sure I want to license something for only 250 channels.

I’m not sure. I use IPT so it’s easy to select only what is needed. I use guide2go and schedulesdirect for my guide then import into both xTeVe and TVheadend via a socket connection.

Here is my TVheadend mod docker image with streamlink integration:

https://198.50.196.133/tvheadend_mod-streamlink.tar

You can use the same configuration just switch which container you’re pointing to after importing the image.

What you want to do is create a spawn profile:

Go to Configuration - Stream - Stream Profiles then select Add:

Under the type drop down select MPEGTS-Spawn/built-in.
Profile name: spawn
Enabled: checked
Default: checked
Data timeout: 5
Default priority: Normal
Force priority: 0
Restart on error: checked
Continue if descrambling fails: checked
Descrambling timeout: 2000
Switch to another service: checked
Preferred service video type: None
Randomize service selection: checked ← this is your new service randomization function I modded (works with a pass profile too)
Command line: /usr/bin/ffmpeg -hide_banner -loglevel error -i pipe:0 -f lavfi -i anullsrc -c:v copy -c:a ac3 -b:a 640k -ac 6 -shortest -f mpegts pipe:1
Mime type: video/mp2t
Kill timeout: 5
Rewrite service ID: 1 then checkmark everything below this

Go to Configuration - Users - Access Entries:

Select your user
Change Streaming profiles to: spawn

In xTeVe change your playlist URL from profile=pass to profile=spawn. Save and then update.

Now under Status - Subscriptions you should see under the Profile column it now says spawn while streaming instead of pass.

What this spawn profile does is transcode the audio on the fly to Dolby 5.1 so when a stream dies and TVheadend goes to select another service at random and the service happens to have a different audio format than the previous it will transition correctly without glitching the video since the audio will stay the same/synced via the transcode. It also adds a silent audio track if no audio exists.

If you’re interested in getting streamlink working let me know. It allows streaming directly from websites. There’s a lot of plugins for various websites. If you look into it and are interested I’ll explain further. It’s a process getting the plugins into the container that aren’t already included by default and the .m3u file needs to be formatted a certain way.

1 Like

Look how smooth my IPTV streams are using TVheadend as the backend. PERFECT!

1 Like

Can you point to docs or docker compose info for how you set this up? I’ll be checking out your your modded version of TVH once I get EPG dialed in a bit better. I service I use sends me an enormous EPG and documentation on how to distill it via GET API calls is a bit spartan.

Thanks…!

I use guide2go by itself not a Docker image. This is the place I got it from: GitHub - mar-mei/guide2go: Schedules Direct JSON to XML grabber

This is a popular fork of guide2go for Docker: GitHub - alturismo/guide2go: guide2go

How’s your EPG venture going? Did you get it dialed in?

Sorry I missed this… :slight_smile:

I have not tried your build yet… I haven’t tried taking a custom compiled app and adding it to a docker image before… open to suggestions on that… I think it’s just a matter of using the docker compose COPY command and copying over the current executable…

I’ll worry about EPG changes later… right now I’m working ‘well enough’… :slight_smile:

If you have access to the command line you could prolly do this:

docker image ls ← list all installed images
docker load -i tvheadend_mod-streamlink.tar ← import image
docker tag IMAGEID tvheadend_mod-streamlink:latest ← this will name your image

You can untag the original image and tag the imported image to the same name then restart the container.

1 Like

I do have access to the command line (in fact that’s how I run docker on my qnap server - their container manager is hot trash). I’ll see how that goes and keep you posted.

Done and now using your image…

Why hasn’t linuxserver taken this change?? this is far better…!

Dunno. I was thinking about creating a pull request on the tvheadend github for the service randomization but haven’t really got around to do it.

The linuxserver mod just incorporates streamlink and I change the repo from tvheadend to my github fork.

These are the repos with source.

Seeing a strange behavior… I have stream for WGN9 out of Chicago and using spawn seems to create a huge lag between audio and video… I’ll see if for that one pass works better… do you have suggestions on how to adjust?

thanks.

EDIT - it’s not spawn profile… there’s something hinky with that stream and it’s not converting correctly… I’ll track down another source for it…

I usually don’t have issues with audio/video sync using the spawn profile especially when the source switches. I use the Roku app but the Android app gives me way more problems in that regard.

Yea I’m not sure what is going on with this particular channel/stream… using hls with an m3u file or ts for the stream source is the same problem… a huge gap between audio and video… :stuck_out_tongue:

Looks like the issue was at the source. Today the channel streams without an issue… go figure… :slight_smile: