Packet instability on P2P streaming due to IPTV streaming

Hello everyone,

I’d like to ask a question here about the “packet stability” of the current P2P streaming to get some clarity. I’ve been working for some time on one of the many TS6 manager projects circulating in the forum. The MusicBot can now also stream videos from YouTube HLS sources or local video files—and while I was working on performance optimization and stabilizing the packet pacing, I eventually noticed sporadic packet loss of around 0.07–0.1% while testing in the TS client. That’s, of course, negligible, but you can tell from the video when it has brief glitches. I’ve “smoothed out” the small lags that result from this as best I can using a very, very “tight” GOP, but they’re still visible, of course.

I then started investigating the packet loss and eventually reached a point where I realized it was likely due to my client side or, more likely, my “home network.”

(Just to note, the packet loss also occurs when I watch a friend’s stream—which is why I’ve ruled out an issue with the bot’s packet pipeline).

With other users, the stream runs for 30 minutes (or longer) without a single dropped packet.

I can only achieve 0 dropped packets if, ideally, only my PC has an internet connection.

It’s totally crazy. I notice it most when the TV is on :smiley: (Deutsche Telekom’s MagentaTV via the internet).
The TV box is connected to the router via a switch, just like the PC (wired, of course). When it’s not running, even after watching a stream for about 40 minutes, I didn’t have a single dropped packet and therefore absolutely no “lag” in the video. As a test, I turned on the TV while streaming, and immediately the packet loss rose to about 0.1%, which is unfortunately visible to the naked eye.

What I’m wondering now (since the P2P stream is really the only thing that suffers packet loss through the TV, and no other test showed an “unstable” connection when MagentaTV was running—even a connection test to the server where the stream is running was absolutely stable) is this yet another classic Telekom routing issue, like the Cloudflare situation but on a slightly smaller scale—or is the decoder in the client actually very sensitive to even slight packet delays and discards them immediately?
Because even fluctuations, according to the connection information from the P2P stream, are in the 1–2 ms range (when the bot is streaming)—I haven’t seen anything like that with any “normal client stream” so far; there I often see 20–30 ms fluctuations in the downstream.
(But as I said, whether I’m watching a friend’s stream or the bot’s, I always experience this ultra-sporadic packet loss whenever the TV is on.)

The moment I turn off the TV, the stream suddenly stops losing packets.

Ultimately, I can certainly imagine that this is a Telekom or home network issue, but then the P2P stream from the TeamSpeak 6 client wouldn’t be the only one with this problem, would it? I’d have to experience packet loss in voice calls, for example, or I’d have to see it in other network tests as well, right?

I realize I’m really chasing after the very last “packet” here, but in the case of video streaming, every dropped packet means the decoder has to wait until the next keyframe, and even though I’ve set the stream bot to just 12 frames, you can still see this “mini-stutter.”

Thanks for reading this far.

Take care.

Ginger

With the IPTV i would assume that packet loss is caused by packet priority on the router, usually default configurations of the provider’s router/modem prioritize the IPTV, so it doesn’t have any lag.

1 Like

I searched a bit around the Internet and maybe the problem comes from my desktop switch where I have my PC and the TV-Box attached to - maybe this cheap switch is not capable of proper IGMP-snooping which then maybe causes these problems in packet loss when the TV-Box is running and streaming.

I will dig deeper and maybe I already have the solution.

It really was the IPTV connected to the switch. I’ve now reconnected the TV box directly to the router, and not a single packet is being dropped anymore—even streaming video for an hour via the bot runs completely smoothly now.

Thanks, though, to @RexiikCZ for the tip about the packets with IPTVs.

In conclusion, I would simply advise anyone using Telekom’s MagentaTV not to connect the TV box to an unmanaged switch. At least not if it’s just a cheap 25-euro switch, like in my case.

1 Like

Great that you have found the fix. Buying cheap network devices isn’t usually great idea even for security reasons. Thats why i personally use only Mikrotik devices with lifetime software support.

You’re absolutely right about that. I also have one of those Dell “PowerSwitch” units that I was allowed to take home from the office. That would obviously be much better suited for this. But with its 20mm fans—or whatever it has—it’s not suitable as a “desktop switch”—and I think my cats would give me the finger if I had a thing like that hanging under my desk.
I actually only bought the 25-euro switch so I could quickly and easily let several friends use their PCs at my desk when we have a “mini LAN party” on the weekend—at some point, out of laziness, I hooked up the TV box to it, and I never noticed any problems until I tested streaming on TS.