Project

General

Profile

IPTV - buffering, stalls, general drop outs. Settings that resolved things for me.

Added by J Smith over 4 years ago

Figured I'd share this, as I struggled for a long time with IPTV feeds - they would frequently stall, drop out, replay previous 10 seconds or so, etc.

When using the pipe:// method with FFMpeg, everything played flawlessly, making me suspect a setting or two somewhere causing problems when using the 'IPTV Automatic' network and importing an M3U with regular HTTP streams - I'd rather not have edited a number of URLs manually to include pipe:// FFmpeg etc! So I started to twiddle some knobs to try and find a solution....

As a few people seemed to also note, when playing the IPtv feeds with VLC directly they would play flawlessly, adding some weight to the IPTV stream not being at fault. Running 2 instances of TVheadend, they would drop out at completely different times, again adding weight to the IPTV stream itself not being at fault.

I'm running the latest 4.3 unstable release at the time of writing, with OSMC frontends running on Raspi3 (with MPEG2 licenses) Key settings for me, are/were as follows, I can't advise the fall-out of changing these settings, but they seem to have more or less completely resolved my issues with IPtv stalling on TVHeadend, whilst I still see some 'service instance is bad, reason: No input detected' in the logs, the feed reconnects and streams without stalling and without skipping back 10 seconds or so and replaying:

- Configuration
- Stream
- Stream Profiles
- Pass
- Timeout 0 (may need to experiment with between 5-10 second)
- Restart on error, Enabled
- Rewrite Service ID, set to 0
- Disable ALL rewrite options (PMT, PAT, SDT, EIT), these settings had the biggest impact for me.
- Save

- Configuration
- Stream
- Stream Profiles
- HTSP
- Timeout 0 (may need to experiment with between 5-10 second)
- Restart on error, Enabled)
- Save

- Configuration
- General
- Base
- Packet Backlog, enabled
- Save


Replies (57)

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Steve Reid 10 months ago

Troy Boy wrote:

Been working with IPTV & TVHeadend for the past 6 months now & this thread helped me lots to improve the process.

Here is the mux pipe that i am using that has greatly improved my experiences

[...]

The -reconnect arguements have helped greatly as have experieced lots of "end of file" errors where tvheadend would just stall, now ffmpeg reconnects and the stream continues.

The probesize, analyzeduration & fpsprobesize is to speed up the start time of the stream

Thank You!

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Eitan Maodad 8 months ago

Just a quick one for me what resolved all issues was using a proxy (https://www.hls-proxy.com/) that is able to do a lot on the streaming side (buffering and much more) and also deliver to Tvheadend as MPEGTS.

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Jim Grove 8 months ago

I'm struggling with getting hls-proxy to work with TVHeadEnd.

I can't seem to get TVHeadEnd to load the IPTV Playlist that is generated by hls-proxy.

What steps did you take to get it to work?

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Greg H 2 months ago

Hi all,

I've got this working for my HDHR and TvH Client on my Odroid N2 and TvH Server on my NAS, however the zapping time is like 10-11 seconds. This was mentioned by others in the thread but no one mentioned a fix.

Any ideas greatly appreciated.

TIA

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Jay O 2 months ago

Greg H wrote:

Hi all,

I've got this working for my HDHR and TvH Client on my Odroid N2 and TvH Server on my NAS, however the zapping time is like 10-11 seconds. This was mentioned by others in the thread but no one mentioned a fix.

Any ideas greatly appreciated.

TIA

I've also seen very slow channel zapping on Odroids running Kodi TVH client. 15-20 seconds. No problem on RPi3

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Tim Corbeil about 1 month ago

Hello.

I have hls-proxy running with channel links entered into Tvheadend.

The end result is certainly working fine but when in tvheadend, when you select a channel to watch, hls-proxy starts to download it's buffer but it's not fast enough for Tvheadend..

Here's an example of what takes place once you select a channel..

2022-04-25 09:46:51.866 mpegts: Leafs Nation Network 422 in StreamWise Media - tuning on IPTV #1
2022-04-25 09:46:51.866 subscription: 00DC: "HTTP" subscribing on channel "LNN 422", weight: 100, adapter: "IPTV #1", network: "StreamWise Media", mux: "Leafs Nation Network 422", provider: "FFmpeg", service: "Service01", profile="pass", hostname="xxx.xxx.x.x", client="Lavf/58.65.101"
2022-04-25 09:47:01.866 subscription: 00DC: service instance is bad, reason: No input detected
2022-04-25 09:47:01.866 mpegts: Leafs Nation Network 422 in StreamWise Media - tuning on IPTV #2
2022-04-25 09:47:01.868 subscription: 00DC: "HTTP" subscribing on channel "LNN 422", weight: 100, adapter: "IPTV #2", network: "StreamWise Media", mux: "Leafs Nation Network 422", provider: "FFmpeg", service: "Service01", profile="pass", hostname="xxx.xxx.x.x", client="Lavf/58.65.101"

I assume the first attempt is labelled "bad" because hls-proxy really doesn't have enough data yet to provide tvheadend..

Is there a way to tell tvheadend to "wait" on the first connection rather than try the 2nd connection?

RE: IPTV - buffering, stalls, general drop outs. Settings that resolved things for me. - Added by Chris Gregson 24 days ago

Hi guys - Lot's of great info in this thread around IPTV and TVHeadend! - I have a quick question, but not sure it's something TVHeadend can do. On occasion a few channels from my IPTV provider 'loop' the same few seconds over and over. The issue is usually resolved on the provider side eventually.

I have setup service priorities accordingly and mapped multiple services to the same channels, however this doesn't help with the looping issue. Are there any settings I could try that would switch to the next service I have defined in these cases?

Many thanks

(51-57/57)