Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthuisman opened this issue Mar 3, 2024 · 4 comments · May be fixed by #1607
Open

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

matthuisman opened this issue Mar 3, 2024 · 4 comments · May be fixed by #1607

Comments

@matthuisman
Copy link
Contributor

matthuisman commented Mar 3, 2024

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

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

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Mar 3, 2024

looks like for some reason this code dont work

// Check if we leave our current period
double chapterTime{0};
auto pi = m_adaptiveTree->m_periods.cbegin();
for (; pi != m_adaptiveTree->m_periods.cend(); pi++)
{
chapterTime += double((*pi)->GetDuration()) / (*pi)->GetTimescale();
if (chapterTime > seekTime)
break;
}
if (pi == m_adaptiveTree->m_periods.cend())
--pi;
chapterTime -= double((*pi)->GetDuration()) / (*pi)->GetTimescale();
if ((*pi).get() != m_adaptiveTree->m_currentPeriod)
{
LOG::Log(LOGDEBUG, "SeekTime: seeking into new chapter: %d",

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?

@matthuisman
Copy link
Contributor Author

matthuisman commented Mar 5, 2024

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 (997272c) and same issue

@CastagnaIT
Copy link
Collaborator

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

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Jun 14, 2024

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 CastagnaIT linked a pull request Jul 22, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants