pcherenkov / udpxy

lightweight network-traffic relay daemon
233 stars 105 forks source link

Packet loss when using multicast renew feature #28

Open fanthos opened 1 year ago

fanthos commented 1 year ago

I am using udpxy on mt7621 router with multicast renew enabled. My iptv provider requires the client send multicast report packet periodicity. After enabling the feature, packet loss causes VLC video lag periodicity. Attached logs from VLC:

main debug: resampling stopped (drift: 485 us)
main debug: picture might be displayed late (missing 4 ms)
ts warning: discontinuity received 0x7 instead of 0x0 (pid=4113)
ts warning: discontinuity received 0x4 instead of 0xe (pid=4113)
main debug: picture might be displayed late (missing 1 ms)
main debug: auto hiding mouse cursor
main warning: picture is too late to be displayed (missing 25 ms)
main warning: picture is too late to be displayed (missing 49 ms)
main debug: picture might be displayed late (missing 9 ms)
main debug: auto hiding mouse cursor
ts warning: discontinuity received 0xc instead of 0x0 (pid=4113)
ts warning: discontinuity received 0x1 instead of 0xf (pid=4352)
main debug: picture might be displayed late (missing 9 ms)
main debug: picture might be displayed late (missing 17 ms)
main debug: auto hiding mouse cursor
main debug: auto hiding mouse cursor
pcherenkov commented 1 year ago

Hello there,

"Multicast renew" is a hack, not a feature. It was added as an experiment, a Q&D patch, and I wholeheartedly discourage anyone using it. If you need it then (most likely) multicast is not configured right in your network.

Sure, packet loss is there, it is supposed to happen since for a few hundred ms (up to a few seconds) we lose connectivity with the source. The way to make it disappear is to introduce a caching mechanism and flush the data cached in right after switching to the new source, and only then disconnect. If you're up to it, feel free to implement it in a separate branch and/or as a patch.

To sum up: 1) mcast renew is not supported as a feature, please do not use it; 2) if you do use it, packet loss is expected; 3) to eliminate the loss feel free to modify udpxy to your liking.

Also, feel free to ask relevant questions in GigaX-discussions chat in Telegram.

Best regards, -pavel

Le lun. 12 déc. 2022 à 04:49, Boyi C @.***> a écrit :

I am using udpxy on mt7621 router with multicast renew enabled. My iptv provider requires the client send multicast report packet periodicity. After enabling the feature, packet loss causes VLC video lag periodicity. Attached logs from VLC:

main debug: resampling stopped (drift: 485 us) main debug: picture might be displayed late (missing 4 ms) ts warning: discontinuity received 0x7 instead of 0x0 (pid=4113) ts warning: discontinuity received 0x4 instead of 0xe (pid=4113) main debug: picture might be displayed late (missing 1 ms) main debug: auto hiding mouse cursor main warning: picture is too late to be displayed (missing 25 ms) main warning: picture is too late to be displayed (missing 49 ms) main debug: picture might be displayed late (missing 9 ms) main debug: auto hiding mouse cursor ts warning: discontinuity received 0xc instead of 0x0 (pid=4113) ts warning: discontinuity received 0x1 instead of 0xf (pid=4352) main debug: picture might be displayed late (missing 9 ms) main debug: picture might be displayed late (missing 17 ms) main debug: auto hiding mouse cursor main debug: auto hiding mouse cursor

— Reply to this email directly, view it on GitHub https://github.com/pcherenkov/udpxy/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJWWS6WMALV2EQNBIJHU4DWM2ABPANCNFSM6AAAAAAS3LMJKQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>