n-thumann / IPTV-ReStream

An app to forward source specific multicast streams via HTTP
BSD 3-Clause "New" or "Revised" License
103 stars 36 forks source link

Cannot open Stream, Webinterface available #170

Closed sekuba closed 2 years ago

sekuba commented 2 years ago

Hi! Thanks for the awesome program! I had no trouble setting everything up until i got to the streaming. I can access the web interface via both my local network and through an apache revproxy i set up on a subdomain from the outside. But i can stream from neither my local network nor the outside. I tried the vanilla streaming (without your tool) via vlc with the fritzbox-provided .m3u for magentaTV and it works fine, just sadly not through the restreaming software...

The debug log offers:

> iptv-restream@1.4.7 start
> node dist/app.js

  iptv-restream:config Config loaded: HOST=192.168.188.30, PORT=3000, MCAST_IF=192.168.188.30, XSPF_PROTOCOL=https, XSPF_HOST=XXXXXXX, XSPF_PATH_PREFIX=, ALLOW_UNKNOWN=false +0ms
  iptv-restream:server Listening on port 192.168.188.30:3000... +0ms
  iptv-restream:station Stations loaded +0ms
  iptv-restream:receiver Client requested 87.141.215.251@232.0.10.35:10000. +0ms
  iptv-restream:receiver adding SSM for 87.141.215.251@232.0.10.35:10000 using 192.168.188.30 +1ms

while VLC shows a neverending loading bar. I am using a ubuntu server (22) with nodejs 16 installes via the nodesource repo.

I can also speak german if that helps, didn't know whats better :D

n-thumann commented 2 years ago

Hey πŸ‘‹πŸ» That's odd indeed. The expected output when actually receiving the program should be:

# DEBUG="iptv-restream:*" npm start

> iptv-restream@1.4.7 start
> node dist/app.js

  iptv-restream:config Config loaded: HOST=127.0.0.1, PORT=3000, MCAST_IF=0.0.0.0, XSPF_PROTOCOL=, XSPF_HOST=, XSPF_PATH_PREFIX=, ALLOW_UNKNOWN=false +0ms
  iptv-restream:server Listening on port 127.0.0.1:3000... +0ms
  iptv-restream:station Stations loaded +0ms
  iptv-restream:receiver Client requested 87.141.215.251@232.0.10.35:10000. +0ms
  iptv-restream:receiver adding SSM for 87.141.215.251@232.0.10.35:10000 using 0.0.0.0 +1ms
  iptv-restream:receiver Received program for 87.141.215.251@232.0.10.35:10000: "Sportschau (3/5)" +126ms
  iptv-restream:receiver Received program for 87.141.215.251@232.0.10.35:10000: "Sportschau (3/5)" +1s
  iptv-restream:receiver Received program for 87.141.215.251@232.0.10.35:10000: "Sportschau (3/5)" +1s
  iptv-restream:receiver Received program for 87.141.215.251@232.0.10.35:10000: "Sportschau (3/5)" +1s

Are you running this with or without Docker? Can you run ffprobe "rtp://@232.0.20.234:10000?sources=87.141.215.251" on the same machine for me? This takes a few seconds (~5 sec. for me) and should show something like

[...]
Input #0, rtp, from 'rtp://@232.0.10.35:10000?sources=87.141.215.251':
  Duration: N/A, start: 10344.645078, bitrate: N/A
  Program 28106
    Metadata:
      service_name    : Entertain Das Erste SD
      service_provider: MagentaTV
[...]

Currently, it looks like IPTV-ReStream is not receiving any data after joining the multicast group, so I'd expect ffprobe to not receive anything as well πŸ€”

Feel free to reply in English or German, whatever you prefer :)

sekuba commented 2 years ago

Thank you for the answer :)

After some more testing, thanks to you, i actually found the problem. (which is a weird one):

Just as you expected, ffprobe yielded nothing on the server, but returned fine on my ubuntu laptop connected to the same router (via wifi though). Out of curiosity, i checked a raspi which is connected via ethernet like the server and ffprobe timed out like on the server. So I went to the cellar and switched some cables and found out that somehow one of the switches makes rtp/multicast fail (?????).

Now, with a different switch, it works just fine. Thank you so much for helping me, although your program was not at fault at all :) Your ffprobe helped me figure everything out!

Further info only if interested: The weird switch so far is working fine for everything else except multicast/rtp? (gameservers, webservers, reverse proxy, wireguard...) It is called TL-SG116 by TP-Link. I found a Telekom hilft thread in which someone complains that this switch, although advertising IGMP-snooping, does not work for MagentaTV. That may have been my problem. The user also provided a list of reportedly Meganta-compatible hardware.

Thanks again, its super nice to get support like this, and so quickly :) And your program and you are very cool!

n-thumann commented 2 years ago

Great to hear that it works now! Thank you very much for your kind words! 😊 It indeed looks like that TP-Link sells these switches with IGMP Snooping support even though that (according to the Telekom hilft forum) they don't (or at least not IGMPv3 as needed for MagentaTV).