inputstream.adaptive icon indicating copy to clipboard operation
inputstream.adaptive copied to clipboard

IA appears to ignore BaseURL in representation in periods after the first

Open matthuisman opened this issue 1 year ago • 4 comments
trafficstars

it doesnt switch the baseurl when going to the next period. Always uses the baseurl from the first period (<BaseURL>exchange219026anubr_219026_1600/hZrPcUpQ4/</BaseURL>)

Log is me playing the 24 hour buffer live stream from the start. It plays ok. I then seek to future periods and start getting 404 due to it still trying to use the first periods baseurl

inputstream.adaptive v21.4.3 (doesnt seem to work on kodi 20 either)

manifest_1709440931.txt kodi.log.txt

matthuisman avatar Mar 03 '24 04:03 matthuisman

looks like for some reason this code dont work

https://github.com/xbmc/inputstream.adaptive/blob/fb6aeadd20bc3df6e5f540911e203b7c88bc3eb0/src/Session.cpp#L1101-L1119

sound like a wrong chapter duration you can see on the kodi GUI time bar the chapters points or not? testing with master (omega) branch its the same?

CastagnaIT avatar Mar 03 '24 08:03 CastagnaIT

different channel with 2x periods. Kodi 21 does show "chapter 1/2" Seek near end then it freezes image manifest_1709624751.txt kodi.log.txt

Just tested with latest master (997272c53758a8b88afd040ead370af65b773017) and same issue

matthuisman avatar Mar 05 '24 07:03 matthuisman

@matthuisman can you test with current last ISA release that i fixed mpd TSB and period start?

CastagnaIT avatar Apr 16 '24 06:04 CastagnaIT

i have no dash multiperiod with so high timeshift time to test, try apply this diff patch to see if improve the situation the last period is missing the duration and i think this is cause of the problem this change should add the duration to the last period (just a test maybe its possible do a more clean change)

diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp
index e6537b4a..ab39e17f 100644
--- a/src/parser/DASHTree.cpp
+++ b/src/parser/DASHTree.cpp
@@ -222,10 +222,8 @@ bool adaptive::CDashTree::ParseManifest(const std::string& data)

   uint64_t totalDuration{0}; // Calculated duration, in ms
   uint64_t mpdTotalDuration = m_mediaPresDuration; // MPD total duration, in ms
-  if (mpdTotalDuration == 0)
-    mpdTotalDuration = m_timeShiftBufferDepth;

-  if (!IsLive())
+  //if (!IsLive())
   {
     for (auto itPeriod = m_periods.begin(); itPeriod != m_periods.end();)
     {
@@ -288,6 +286,9 @@ bool adaptive::CDashTree::ParseManifest(const std::string& data)
     }
   }

+  if (mpdTotalDuration == 0)
+    mpdTotalDuration = m_timeShiftBufferDepth;
+
   if (mpdTotalDuration > 0)
     m_totalTime = mpdTotalDuration;
   else

CastagnaIT avatar Jun 14 '24 12:06 CastagnaIT