FFMPEG cannot stream and decode with MPEG-DASH.

  • The inputstream.ffmpegdirect cannot decode sources of hifi audio streaming over MPEG-DASH, and instead this addon has to stream over https. This leads to higher bandwidth, and inability to play some hires audio. Is there any chance that this will be added?

    Here, scroll to the bottom of this page to see more information about it and why this matters: https://github.com/arnesongit/plugin.audio.tidal2

    Also, here is a workaround this person found, but will not work with libreelec, since it requires apt. https://github.com/arnesongit/plu…/README-Dash.md

  • I've asked one of the ffmpegdirect maintainers if he can decipher the request; because the Tidal2 repo you've linked to only shows how to compile the add-on. It contains no mention of what technical change is required somewhere.

  • if you scroll down to the bottom of the repo, they say

    "I found out that the imputstream.ffmpegdirect addon for Linux platforms isn't able to play MPEG-Dash streams.

    The Dash demultiplexer seems not to be compiled into this addon."

    I'm not sure either why it is not working in libreelec, but I have a new system with nothing else that would effect it. the only annoying thing about this issue is that to troubleshoot it will need a tidal subscription/free trial or a way to stream audio to yourself.

    also thank you for linking that, emveepee! I tried that out, and was unable to get that to work with the 21.2 aarch64 version, which should work well on my pi. it would just be great if this issue could be fixed with the default addon.

  • LE builds ffmpeg for Kodi "externally" i.e. we roll our own instead of allowing Kodi to build it. We do not explicitly enable "--enable-demuxer=dash" in the config as per the ffmpegdirect recipe, but we set "--enable-demuxers" which should be the superset of all demuxers. See https://github.com/LibreELEC/Libr…package.mk#L201

    This is the list of demuxers from current LE (taken from the compile log): https://pastebin.com/raw/b0LuUrec

    This is the list with "--enable-demuxer=dash" set: https://pastebin.com/raw/a9cQstDw

    If you diff the output, they are identical.

    nasawyer7 what hardware are you trying to use this on? .. and did you configure the Tidal add-on with "supports dash"?

  • chewitt You missed:

    WARNING: Disabled dash_demuxer because not all dependencies are satisfied: libxml2

    With the following patch ffmpeg is building dash demuxer (still with --enable-demuxers). Only build tested.

    Same is required for ffmpegx addon.

  • Thank you! I put the .tar in that folder and rebooted. Here is my log when attempting to stream hifi.

  • Sorry about that! I just created a new install of kodi to test this, in case anything else was influencing it. I applied your update, and then enabled logging correctly this time.

    Here is the log file: https://paste.kodi.tv/ovijaxahat

    For the last track I played the MQA version, and it played. Not all tracks have MQA, and MQA is getting phased out of tidal, so this is not a good solution. And MQA is a proprietery compression algorithm built for better DRM, but thats another debate. Anyways, every other version of a track (high res, flac) would not play.

    Here is another log file with content-specific logging enabled for ffmpeg. https://paste.kodi.tv/qeweqojica

    I'm not sure if this will be useful, but I hope it is! The last track again is an MQA, which successfully played.

  • I guess it did't work because the tidal2 add-on depends upon inputstream.ffmpegdirect and not the native ffmpeg version used by Kodi that we patched in the image; so the patch is still effectively missing.

    mglae submitted changes to make changes to ffmpeg and ffmpegdirect earlier, which are now merged, so if you wait patiently for 24-48 hours those changes will have arrived in the latest LE13 nightly and updated add-ons in the LE13 add-on repo.

  • nasawyer7

    2024-06-16 14:06:13.155 T:1453     info <general>: AddOnLog: inputstream.ffmpegdirect: inputstream.ffmpegdirect property: inputstream.ffmpegdirect.manifest_type = hls
    2024-06-16 14:06:13.155 T:1453     info <general>: AddOnLog: inputstream.ffmpegdirect: inputstream.ffmpegdirect property: inputstream.ffmpegdirect.open_mode = ffmpeg
    2024-06-16 14:06:13.155 T:1453     info <general>: AddOnLog: inputstream.ffmpegdirect: Stream mimetype: application/vnd.apple.mpegurl

    The tidal plugin is requesting a HLS stream which is failing with 403 Forbidden. IMO no dash involved.

    The second stream is played directly without any inputstream addon.

    chewitt With a new image I can play a FTA live dash stream using inputstream.ffmpegdirect without rebuilding the addon. (And the stream can even be played with kodi directly).