Closed xlash123 closed 11 months ago
\^ That force push was just me rebasing with main
I was messing around locally with InputStream helper (script.module.inputstreamhelper
) and I couldn't get MPD to play without an HTTP server.
Playing an MPD from a local file didn't work either (e.g. saving message.content
as /tmp/stream.mpd
), I noticed this with mpv too and that's why I resorted to the HTTP server in test.py
.
Anyway this works fine, I'll probably just merge your changes and enjoy it for now 🙂 I feel like the HTTP server is a bit overkill, it would be great to just pass the MPD content intead of the URL but I guess that's something to be implemented on the InputSteam Adaptive side.
Thank you!
@xlash123 I merged your changes and created 3 issued with the bug you reported and some minor ones I have found
I was able to get MPEG-Dash working (at least with Grayjay). I took a look at how the YouTube addon does MPEG-Dash. It uses the InputStream Adaptive addon, so I marked that as a requirement in
addon.xml
.For delivering, I chose the same approach as
test.py
, making an HTTP server to deliver the MPD manifest via a URL, which was accepted by InputStream Adaptive.This also fixes a bug with seeking, where if the client sends many seek packets, Kodi would normally freeze up as it tries to process them all. Instead, only the last one send within a 150ms timespan gets through.
There is one bug in this code that I couldn't resolve. When sending a Stop packet from the FCast client, Kodi freezes up for about 30 seconds. I can't see anything in my code that would cause blocking. My guess is it has to do with the HTTP request to the mdp manifest. Some related logs are below, which appear after the stop packet: