M3U IPTV Closing Connections Automatically

I can't figure this out: I have the server on a powerful windows machine but a IPTV list I'm feeding this keeps cutting out about ~10 seconds in. My Xfinity TVE account plays just fine, it's only the IPTV source. When it comes to TiviMate, it plays the list just fine on multiple devices. However Channels DVR doesn't seem to like it.

I did run this list for Channels DVR through M3u4u dot com to pair down the list to 200 channels. Guide is importing just fine. Again, it plays initially then cuts out. HLS doesn't work so it's on MPEG. I tried software encoding on the Desktop because it was spitting out Remux messages repeatedly and hanging on Chrome. When on software encoding, it loads but hangs then if I initiate play it appears to play just fine, but is delayed. When using hardware, I checked the logs and all I see are the connections to the IPTV channels being closed.

Here are some of my logs:

2022/06/27 14:50:23.103859 [ERR] Failed to clean up \\server\Multimedia\DVR\Streaming\ch9013-dANY-ip127.0.0.1-3802867080: remove \\server\Multimedia\DVR\Streaming\ch9013-dANY-ip127.0.0.1-3802867080\cache: The directory is not empty.
2022/06/27 14:51:26.393881 [TNR] Opened connection to M3U-TV for ch9037 US| SAMPLE HD
2022/06/27 14:51:26.408240 [HLS] Starting live stream for channel 9037 from 127.0.0.1 (bitrate=0)
2022/06/27 14:51:26.672955 [HLS] ffmpeg: ch9037-dANY-ip127.0.0.1-remux:  [h264 @ 00000000016e9e00] non-existing SPS 0 referenced in buffering period
2022/06/27 14:51:26.771292 [HLS] ffmpeg: ch9037-dANY-ip127.0.0.1-remux:      Last message repeated 1 times
2022/06/27 14:51:26.771823 [HLS] ffmpeg: ch9037-dANY-ip127.0.0.1-remux:  [hls @ 00000000016ee340] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2022/06/27 14:51:26.826206 [HLS] Probed live stream in 392.6129ms: h264 1280x720 progressive 6413460bps
2022/06/27 14:51:27.000518 [HLS] Session ch9037-dANY-ip127.0.0.1 started in 1.1682816s
2022/06/27 14:52:50.200938 [HLS] Stopping transcoder session ch9037-dANY-ip127.0.0.1 (out: 1m47.854711s, finished: false)
2022/06/27 14:52:50.200938 [TNR] Closed connection to M3U-TV for ch9037 US| SAMPLE HD
2022/06/27 14:52:51.647821 [ERR] Failed to clean up \\server\Multimedia\DVR\Streaming\ch9037-dANY-ip127.0.0.1-1923858563: remove \\server\Multimedia\DVR\Streaming\ch9037-dANY-ip127.0.0.1-1923858563\cache: The directory is not empty.

I do have a bunch of other recordings happening with XFinity (kids shows which I had on TiVo that I'm trying to catch up on.) Maybe that's kicking me out? There's no other devices live streaming the IPTV channels right now.

Here's the specs:

Gigabyte Technology B550 AORUS PRO AC
Windows Microsoft Windows 11 Pro
*10.0.22000 Build 22000 (kernel: 10.0.22000 Build 22000)*
CPU
24 cores / AMD Ryzen 9 5900X 12-Core Processor
*load averages: 0.02 0.03 0.02*
RAM
31.90 GB
*52.0% free*

It also has a 3080 RTX in it. Spec wise, it should run just fine.

Might have figured something out in case this helps others:

  1. Disabled adaptive streaming.
  2. Lowered Web Player Quality at 1080p from 10mbps to 6mbps.
  3. Disabled Bitdefender firewall (made no difference.)

Not sure if #2 actually makes any difference on a Firestick Max. I’m leaning towards the adaptive streaming for some strange reason causing timeouts/hiccups.

Additional system background information:

  1. I have a 2.5 gigabit network/lan.
  2. 1 gigabit wan although my sources are not likely this fast.
  3. 500 mbps (~350-400) usb Ethernet nic connected to the firestick.
  4. These same issues were also seen on my windows 11 desktops, iPads, and Shield Pro. So not limited to just one device.
  5. My PC DVR Server is connected to my QNap NAS network share which is a newer AMD model running RAID 10, QUTS, and nVME striped caching. So storage is running optimally short of running a 10 gigabit network.
2 Likes

Another update after more testing. Seems like the shows are running longer, but they’re still cutting out after X amount of time. I’m at a loss.

1 Like

If it's after a regular duration every time, it sounds like it may be more of an issue with your IPTV provider.

However, you haven't given very many details, so any additional community help will be minimal and limited to WAGs.

2 Likes

Wags?

2 Likes

Wild-assed guesses. Without actual details, the only help people can offer you are guesses.

From the minimal logs you have provided, it looks like you are feeding an IPTV stream through your Channels server to another client running on the server. It also looks like there is an SMB/CIFS mount involved somewhere, but how that is related is unknown.

Again, wild guesses, and no details. My initial guess is something related to your IPTV provider; my second guess is related to your network.

2 Likes

Various iptv sources -> m3u4u (reduce channels to a reasonable number and fix guide information) -> channels server on windows.

Doesn’t matter which client I use. Server is more than powerful enough.
It may very well be that I have limited connections although I never experienced issues in the past using TiVimate. But then again I can throw every single channel at tivimate vs. the limitation here of 500 max.

Edit: SMB 3 (might be SMB 2 -> 3) NAS protocols. No issues with the internal network talking. I should add that I’ve been involved in networking for 20 years. I also run other services on this PC (WSL Ubuntu, docker, plex, Pihole, Gamestream, Launchbox, various emulators, etc.) and not get any hiccups.

I’m leaning towards your suggestion that it’s a max connection issue and will have to tinker with other sources to see if that’s the culprit.

If you're absolutely positive your IPTV sources are not the problem, then test to eliminate Channels DVR using your NAS for cache and the recording directory (not recommended) as the issue by spinning up a Channels DVR docker container that uses local storage on your WIN 11 PC and add only the IPTV source for testing.

If you get guide data it would help to make recordings to see if they get disconnected/interrupted and the DVR log will provide more information when it's a recording.

Those setting only affect using the DVR webUI player and not any client devices.

2 Likes

Is the cache and recording directory the same location or can you specify different directories?

Same, cannot specify

1 Like

I was just testing it again with logs and activity being monitored. In particular I was trying to see if another stream was being recording at the same time but this was the only item active at the moment and it still cut out/paused, several minutes into watching morning news.

So I can probably rule out multiple streams being the culprit.

I think there’s something happening with the remux of the mpeg stream. He’s doesn’t work. Is there a way to prevent remux from occurring?

Also, could it be a missing system codec issue? This is starting to get into unfamiliar territory.

Are you running through M3u4u by any chance?
I was thinking the site was more or less a simple pass through after feeding it guide and channel data but I’m wondering if this could be an issue. I’m open to other simple means to merge/consolidate and add custom guide data if anyone knows of any other better site or app. The 500 channel limit is what is really doing me in.

I went back to tivimate and tried multiview on my shield. No issues whatsoever opening up 5 connections and playing them all. A couple slight buffering issues depending on the channel bring loaded but it always reconnected.

Only difference is that I’m not using m3u4u to reduce the channels and add some correct epgs.

I can try using the direct m3u link instead of the m3u4u one and see if that makes any difference.

If this doesn’t work, then I’d try a completely different m3u source altogether to see if that makes any difference.

if that doesn’t work, there must be something going on with the actual Channels DVR server not reconnecting/timing out to some of the feeds.

One thing I'll add is that I realize this is all a work in progress and I really appreciate the work you guys have put into this and don't want anyone to think I'm ungrateful - quite the contrary. I realize it's not easy. I'm thankful that you even implemented this as an option. I'm hoping that if it's an issue on my end, that maybe if it can be solved it can help other people.

2 Likes

I'm a little confused. So are you asking:

  1. disconnect the NAS as storage and test only the epg/m3u source on the pc?
  2. Stop the windows channels dvr server and install a docker version on windows and give that a test (while keeping the NAS still disconnected from channels dvr server?)

Would be great if the cache could be local on my PC while I use the NAS as only DVR storage. Let me know if that's how this works or if I need to do something differently with setup. The PC's main nVME is limited in size.

No.
What I meant was to add a second Channels DVR server instance running in a docker container using only your IPTV for source, and using the WIN 11 PC for the recording directory just to test.
Doing a recording will generate more info in the dvr log.

1 Like

Thank you for explaining that. Will try this later and write back in with the results.

You can submit diagnostics after the issue occurs. We will take a look to see if there is an obvious issue on our side, but in general we do not provide support for iptv providers.

1 Like

I totally get that and appreciate your response. I'm trying to isolate if it's something on my end or with the software. As soon as I'm don't with my current work I'm going to install the system on my other work PC which has similar specs without all the other connections (nas, xfinity, etc.) and see if the issue persists.

Update SUCCESS (so far): I disabled the server I had issues with and installed a fresh copy of CDVR on a similar computer. I made sure to keep it to a bare minimum and this time didn't use the NAS as primary storage similar to what @chDVRuser suggested. I was able to actually watch ST TNG for a good 45 minutes without any issues off of my Shield which was a first.

So, I'm now thinking my issue was a connection between the NAS and that initial server, possibly a protocol or even faulty networking cable. I just moved my NAS and Server onto new CAT 8 cables and reconnected everything. I also dropped QNAP NAS SMB versions from 3 Max to 2 Minimum (I'm not sure if SMB has any impact tbh but I used to have it enabled on my old unit.) Testing the server again with the new cables and so far it's running smoothly. I'm going to let it run for a while and hopefully it doesn't cut out.

I'd feel really stupid for wasting everyone's time if it all came down to a simple ethernet cable issue but that's much better than the alternative which is a 32TB NAS which is problematic and can't be used for reliable storage. Will report back. I had assumed there would have been some sort of built-in buffering or reloading for spotty connections.

Update success #2: I did eventually have a signal cut out on me with the new cables to the NAS, but it lasted a lot longer than previous attempts.

So I decided to relocate everything over to a local drive on the server. It’s not a lot of space but I have extra failover drives including externals. I’d still like to eventually use the NAS as storage but I feel the cache should at least be localized if the devs can implement this.

Ever since having everything local, the IPTV channels are coming in fine. In fact, so far I’m seeing far less hiccups and buffering on this setup than I do with my Tivimate on my shield pro which I wasn’t at all expecting to see. I thought the previous hiccups on tivimate for the past few months was mostly due to iptv server lag but I may have been wrong all along.

Anyways will continue to monitor it. I’m disappointed that my NAS even on a 2.5gb connection acts intermittently. Not sure if this has anything to do with flow rate, maybe I’d need to specify a wins address, etc. I’m open to networking suggestions/practices.

1 Like