New "MagentaTV" SSM Multicast Streams not working with LE-TVHeadend but on Synology-NAS?!

  • Hello!

    I have been using a LibreElec-HTPC-TVHeadend Setup (Server 4.2.8/HTSPClient) with "MagentaTV" Multicast IP-Streams flawlessly since AGES.

    On 01.01.20 my provider started using new SSM multicast addresses and the old ones don't work anymore. Sadly, the new ones don't work either on my LibreElec TVHeadend Server, the addresses aren't recognised. I have a "spare" TVHeadend Server on my Synology NAS (also 4.2.8, like on LibreElec). The addresses are recognised fine and are working there. They also work using VLC on a Mac! The new addresses look like this, for example: "rtp://[email protected]:10000"

    I would like to continue using my TVHeadend Server on the LibreElec HTPC cause it has been working better (much less IPTV Errors)

    I tried to get it to work for hours, and tried nearly everything.

    Anyone had the same issues with the new Telekom-MagentaTV SSM-Streams on LibreElec 9.2?

    Anyone having the new streams working on LE-9.2/TVHeadend?

    Thanks for any hints.

  • Enable FFmpeg Tools first (program addons), then add a MUX to TVHeadend Server via the web interface like this (URL should read like this):

    pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -i rtp://@232.0.10.234:10000?sources=87.141.215.251 -vcodec copy -acodec copy -metadata service_name=ZDF -metadata service_provider=Magenta -mpegts_service_type advanced_codec_digital_hdtv -f mpegts pipe:1.

  • Thanks, but it also doesn‘t work. Scan failed.


    should there be any output if i try it on command-line via SSH (without pipe:) ?
    Because there isn‘t any.

    Edited once, last by ApexDE (January 20, 2020 at 11:03 AM).

  • Yes, indeed. On my end /storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -i rtp://@232.0.10.234:10000?sources=87.141.215.251 -vcodec copy -acodec copy -metadata service_name=ZDF -metadata service_provider=Magenta -mpegts_service_type advanced_codec_digital_hdtv test.mp4 leads to a nice file which could be viewed, e.g., via vlc.

  • I have exactly the same problem:

    On my NUC with libreelec TVHeadend is not working with the new SSM mulicast addresses.

    ffmpeg also not working.

    IPTV-Client is also not working.

    I also have a Synology with working TVHeadend.

    I have searched the internet and found a "solution" in the Kodi Forum Stream address is not recognized

    There is a bug in URL.cpp and DVDDemuxFFmpeg.cpp and also patches available [url] skip parsing username:password@ for udp/rtp streams by phunkyfish · Pull Request #17222 · xbmc/xbmc · GitHub

    So we have to wait for the new Kodi version or compile by our own.

  • Ah OK, then it's not on LibreElec at all ;)

    After reading for many hours i believe it's working on some systems because ffmpeg must be compiled with pthreads-support to work with the new SSM-multicast-streams.

    Code
    fmpeg[2160]: [udp] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)

    Maybe that's also why tvheadend is working on e.g. Synology-NAS' and not on LibreElec?

  • The patches work fine on the Arm devices but when implementing them on a X86-64 build pthreads are not normally supported unless you alter the build system to put one of the typical wrappers around pthreads as windows doesn't natively support it as far as i know.

  • Ah, no, what I've described above runs on an RPi running LE 9.2.0, which could be seen from this file location /storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg. That's the executable location for ffmpeg-tools addon.

  • I have found a solution for LibreELEC 9.2.0 (generic x68_64), but you have to apply patches and compile your own LibreELEC.

    All files and patches mentioned below are in the attached Zip-file.

    Copy the files linux-100-igmp.patch and linux-101-ip_sockglue.patch to http://LibreELEC.tv/packages/linux/patches/default/

    Copy the files kodi-100.26-url.patch and kodi-100.27-ffmpeg.patch to http://LibreELEC.tv/packages/mediacenter/kodi/patches/

    Then compile LibreELEC. => Enjoy :)

    This is what I have done:

    I've written a python test script (SSMTest.py) to connect a socket to the source specific multicast group and close the socket after 2 seconds.

    When you make a tcpdump while running the script, you should see something like the dump below with "allow" and "block" messages and the ssm address.

    You do not need to have MagentaTV to test this.

    With "tcpdump igmp -vv" you should see something like:

    tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 

    14:22:50.972890 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 44, options (RA)) 

    Kodi.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 232.0.10.146 allow { 87.141.215.251 }] 

    14:22:51.872890 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 44, options (RA)) 

    Kodi.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 232.0.10.146 allow { 87.141.215.251 }] 

    14:22:52.976230 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 44, options (RA)) 

    Kodi.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 232.0.10.146 block { 87.141.215.251 }] 

    14:22:53.336227 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 44, options (RA)) 

    Kodi.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 232.0.10.146 block { 87.141.215.251 }]

    But with LibreELEC 9.2.0 (generic x68_64) I do not see the "allow" and "block" messages.

    I searched the history of the linux file net/ipv4/igmp.c and found a fix in the newest version of the file that fixes at least this bug :)

    So I applied this patch and compiled LibreELEC.

    With this new version I was able to see the the "allow" and "block" messages, but I still could not see them whrn i tried the "PVR IPTV Simple Client".

    So I applied some patches from the discussion in the kodi forum, which I already mentioned above.

    After that I can see the the rtp streams with ssm addresses.

    It now works with PVR IPTV Simple Client and TVHeadend 4.3 (not tested with 4.2).

    With TVHeadend 4.3 you have to set Interface to e.g eth0 in the Web-Interface under: "Configuration->DVBInputs->Muxes"