Forums » Tutorial and setups »
IPTV ffmpeg/stream setup (Plex)
Added by Dennip _ over 1 year ago
Hi all,
I have tvheadend set up with my iptv provider and when i play things in VLC everything works ok.
I've loaded the channels into Plex - but they don't play in plex, it tries and errors out. If I open a channel in VLC first and then the same channel in plex it works... It seems like maybe plex isn't giving enough time to tvheadend for the stream to spin up? Of note, the one SD channel i have does load.
1. Is there a way that tvheadend can return an (empty) stream right away while its still spooling up the actual one?
2. How do you use the 'MPEG-TS Spawn' stream profile, i've tried a number of differnt things in the pipe command but all return an error. Is INPUTLINK some kind of envinment variable/placeholder for the stream? I was trying this becuase at one point i thought maybe plex didnt like the 1080i channels, but when first loaded in VLC they play ok.
3. Is there a way to speed up the stream loading - it takes a little while in VLC as well. Extra things that can be turned off etc?
Replies (7)
RE: IPTV ffmpeg/stream setup (Plex) - Added by Dennip _ over 1 year ago
To add to this, opening the iptv streams directly in VLC straight from the provider are near instant - going via tvh is much much slower.
RE: IPTV ffmpeg/stream setup (Plex) - Added by G Kazaroth over 1 year ago
So, TVH has a hard coded 10 second timeout, if no stream is detected and this timeout cannot be changed unless you change it in the code and recompile. I have an appliance. See forum
https://tvheadend.org/boards/5/topics/43052
that will send keep alive ATSC packets to tvh while the stream is coming up to keep it from terminating the connection.
Stream loading can be caused by the time the provider takes to send segments to the client and can vary based on the time of day. The appliance will send as soon as the provider gives a segment.
RE: IPTV ffmpeg/stream setup (Plex) - Added by Dennip _ over 1 year ago
Hi, Thanks for the information.
After more investigating, I think that the issue is actually purely on the plex side - the desktop app is extremely flaky and performs differently each time you open a channel.
The IPTV service provider streams come online quite quickly when used direct, and a little bit slower via tvh but still acceptable.
The problem seems to be that 90% of the time, plex doesn't seem to give tvh any time at all for the connection to come up, but some other times it will wait 5-6 seconds and then play the channel.
I think this is why if the stream is 'Active' already in tvh (via VLC), plex plays happily. (this is why i was interested in tvh sending an empty stream right away)
The Plex Android TV application is much more consistent and reliable.
There are varying reports of this being a more recent bug in the desktop application online, which they have not fixed. The cynic is me thinks they simply don't care, as they only want to support actual tuners not iptv.
Thanks for the link to your project, I will give that a go as i think those keep-alive packets might do the trick.
Thanks!
RE: IPTV ffmpeg/stream setup (Plex) - Added by D M over 1 year ago
G Kazaroth wrote:
So, TVH has a hard coded 10 second timeout, if no stream is detected and this timeout cannot be changed unless you change it in the code and recompile. I have an appliance. See forum
https://tvheadend.org/boards/5/topics/43052
that will send keep alive ATSC packets to tvh while the stream is coming up to keep it from terminating the connection.Stream loading can be caused by the time the provider takes to send segments to the client and can vary based on the time of day. The appliance will send as soon as the provider gives a segment.
Hello. What is the suggested way to use your app with Plex? Do I input my m3U to you app then feed it to tvheadend? I can’t figure out how I should use it. When I feed the m3u to your app, then Plex I have issues with playback abruptly stopping. The stream is hls.
RE: IPTV ffmpeg/stream setup (Plex) - Added by G Kazaroth over 1 year ago
Review
https://github.com/cabernetwork/cabernet/issues/78
To use with TVH, use the info at top of forum to setup TVH with m3u. When you setup TVH with Plex, it will auto pull all the info from everything in TVH to plex. You can also do a direct connection with Plex from Cabernet, which is what I do, since I also am testing with Emby, JellyFin and TVH, so my setup can be confusing at times.
RE: IPTV ffmpeg/stream setup (Plex) - Added by D M over 1 year ago
G Kazaroth wrote:
Review
https://github.com/cabernetwork/cabernet/issues/78
To use with TVH, use the info at top of forum to setup TVH with m3u. When you setup TVH with Plex, it will auto pull all the info from everything in TVH to plex. You can also do a direct connection with Plex from Cabernet, which is what I do, since I also am testing with Emby, JellyFin and TVH, so my setup can be confusing at times.
Is there a way to add pipe command to an m3u to convert the audio when using Cabernet?
RE: IPTV ffmpeg/stream setup (Plex) - Added by xbmc gothm about 1 year ago
Hi Dennip,
Could you share with me what paid iptv provider your using with tvheadend? I am looking for one that is working with tvheadend but its difficult to find these.
Appreciated. :-)