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

Subtitles from German live broadcasters are not displayed in Kodi 20 (Nexus) #1109

Closed
6 tasks
werimail opened this issue Jan 24, 2023 · 20 comments · Fixed by #1459
Closed
6 tasks

Subtitles from German live broadcasters are not displayed in Kodi 20 (Nexus) #1109

werimail opened this issue Jan 24, 2023 · 20 comments · Fixed by #1459
Labels
Triage: Confirmed issue has been reproduced by a team member

Comments

@werimail
Copy link

werimail commented Jan 24, 2023

Bug report

Subtitles from German live broadcasters (ARD, ZDF, etc.) are not displayed in Kodi 20 (Nexus), although selected in the OSD

Describe the bug

It shows a single subtitle available: "German - Untertitel deutsch (Standard)" but nothing shows when it is turned on.

Expected Behavior

Subtitles should be displayed on the screen

Actual Behavior

Subtitles are not displayed in Kodi 20 (Nexus), although selected in the OSD

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Call up the stream (using PVR IPTV Simple Client etc.)
  2. Enable subtitles via the OSD menu

Debuglog

The debuglog can be found here:
kodi_debug_nexus.log

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:
Streaming Adresses of German live broadcasters (ZDF):
https://zdf-hls-15.akamaized.net/hls/live/2016498/de/veryhigh/master.m3u8

Your Environment

Used Operating system:

  • [x ] Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: LineageOS 19 based on Android for Raspberry Pi 400

  • Kodi version: 20 (Nexus)

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@CastagnaIT
Copy link
Collaborator

you are using a not official kodi build
kodinerds builds more than once have problems which the official builds do not

please install the official Kodi release build, and then check the problem again

@werimail
Copy link
Author

werimail commented Jan 25, 2023

Thanks @CastagnaIT for the tip. So I have to reproduce the problem again with an official Kodi 20 (Nexus) version. I noticed that the subtitles only appear for a short period of time and then disappear again. I created a new debug.log for this. Greeting Weri

kodi.log

@CastagnaIT
Copy link
Collaborator

i tried verify your logs but there is nothing that can help me to better understand the problem

when you will have tested with the official build,
let me know if the problem its the same

then if the problem its the same also on official build:
please provide at least first three webvtt segmented files,
you can see in the log, the web address that ends with ".webvtt"
i cannot download files by myself because the server denied me the connection
if you are unable to download the files, try ask to the addon developer if can help us

@CastagnaIT
Copy link
Collaborator

I have now seen the new attached log on modified message

so thanks,
try to see if you can provide webvtt files

@rols1
Copy link

rols1 commented Jan 25, 2023

I can reproduce the missing subtitles on the following system with a ARD-Livestream:

  • Kodi 20.0 (20.0.0)
  • Ubuntu 22.04.1 LTS, kernel: Linux x86 64-bit version 5.15.0-58-generic
  • Stream: https://mcdn.daserste.de/daserste/de/master.m3u8
  • Log: kodi_DasErste_Live_Nexus.log
  • Log extract: Can't support the subtitle(uri: master_subs_webvtt.m3u8)

unlike tested by Weri, the subtitles work here on the ZDF stream.
Note: the subtitles-problem with ARD-Streams also exists with Kodi Matrix
kodi_DasErste_Live_Nexus.log

@CastagnaIT
Copy link
Collaborator

thanks for the test stream!

this log Can't support the subtitle(uri: master_subs_webvtt.m3u8) come from ffmpeg dont think is possible do something
iirc ffmpeg atm dont full support webvtt

but this stream can be played with inputstream adaptive addon that can support webvtt with kodi

unfurnately on inputstream adaptive we are currently finding a solution for segmented webvtt
that currently works partially

this stream show to me the problem,
now we can investigate to find a solution also for this use case

@CastagnaIT CastagnaIT added the Triage: Confirmed issue has been reproduced by a team member label Jan 25, 2023
@rols1
Copy link

rols1 commented Jan 25, 2023

I have now seen the new attached log on modified message

so thanks, try to see if you can provide webvtt files

you can find the vtt-link in the master.m3u8-file, in this case: https://zdf-hls-15.akamaized.net/hls/live/2016498/de/cf35f0ec8beb71f263e3017eedcf82f8/4/4.m3u8 (may changed in few hours)

Edit: pardon, that was wrong. Here the right links (from master.m3u8):

Edit: and 3 webvtt-files as pic (file type not supported), sequenz ../8/3434307.webvtt, ./8/3434308.webvtt, ./8/3434309.webvtt :

webvtt

@werimail werimail changed the title Subtitles are not displayed in Kodi 20 (Nexus) Subtitles German from live broadcasters are not displayed in Kodi 20 (Nexus) Jan 26, 2023
@werimail werimail changed the title Subtitles German from live broadcasters are not displayed in Kodi 20 (Nexus) Subtitles from German live broadcasters are not displayed in Kodi 20 (Nexus) Jan 26, 2023
@CastagnaIT CastagnaIT transferred this issue from xbmc/xbmc Jan 31, 2023
@CastagnaIT
Copy link
Collaborator

i transferred the issue to https://github.com/xbmc/inputstream.adaptive/
so where we are working to fix the problem

we are close to a solution when possible we will provide a test build

@glennguy
Copy link
Contributor

glennguy commented Feb 7, 2023

I will try to work on this next.

The thing that needs to happen is to be able to make a PTS anchor when the stream starts of what video/audio is at 0:00 on Kodi's timeline. On each playlist refresh we get a new PTS value of what 0:00 is to find the offset since stream start i.e 0:00 is now x microseconds later that when we first hit play. Apply this offset to the subtitles stream.

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Jul 25, 2023

i found something by looking at shakaplayer implementation
seem that to implement EXT-X-PROGRAM-DATE-TIME correctly, we need to find also the base time,
that is the lower time of the first segment with EXT-X-PROGRAM-DATE-TIME between all streams
this sound to me similar to smoothstreaming segments sync that we already have

https://github.com/shaka-project/shaka-player/blob/main/lib/hls/hls_parser.js#L548-L554
https://github.com/shaka-project/shaka-player/blob/main/lib/media/segment_reference.js#L503-L514

the problem is that we download HLS child manifests at kodi request so:
CInputStreamAdaptive::OpenStream >> that call >> AdaptiveStream::start_stream >> that call >> prepareRepresentation to download/parse the manifest

each child manifest is downloaded and parsed separately, then find the base time and adjust Startpts on all segments of each representation its not so easy todo

@rols1
Copy link

rols1 commented Jul 26, 2023

Thanks for the explanation. Doesn't sound like a solution anytime soon, unfortunately. Nevertheless: inputstream.adaptive is a great extension for Kodi.

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Jan 22, 2024

i found the root of problem while investigating on other things more or less related
testing with https://mcdn.daserste.de/daserste/de/master.m3u8 stream subs now works correctly and dont disappears after some time

if you want test and give a feedback:
builds here: https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1459/2/artifacts
--> Kodi 21 only

@werimail
Copy link
Author

werimail commented Jan 22, 2024

Good job @CastagnaIT
With the test version of the inputstream.adptive addon, the subtitles German live broadcasters (ARD, ZDF, etc.) work with Kodi 21 Omega!!

Will there also be a backport for Kodi 20 Nexus?

The only problem for me would be that in some addons (e.g. Zattoo, Prime Video, etc.) the subtitles are skipped. I had already made a log file available here: #1341

Greetings Weri

@CastagnaIT
Copy link
Collaborator

Will there also be a backport for Kodi 20 Nexus?

i will make a try to see if works

@rols1
Copy link

rols1 commented Jan 22, 2024

I've tested the windows-x86_64-build on Windows11 with Kodi Kodi 21.0. The subtitles are available. Great work, thanks!

@CastagnaIT CastagnaIT linked a pull request Jan 22, 2024 that will close this issue
11 tasks
@werimail
Copy link
Author

Will there also be a backport for Kodi 20 Nexus?

i will make a try to see if works

That would be great @CastagnaIT . Most of my systems still run Kodi 20 (Nexus). If you need support with testing, just contact me!

Greetings Weri

@werimail
Copy link
Author

werimail commented Jan 23, 2024

By the way @CastagnaIT , when testing inputstream.adaptive version 21.4.1 with the PR-1459, I noticed that the skipped subtitles problem also occurs with DASH streams (.mpd). I was able to recreate the behavior using the example stream:

http://mcdn.daserste.de/daserste/dash2/manifest.mpd

Maybe it will help with further analysis on this topic.

Greetings Weri

@CastagnaIT
Copy link
Collaborator

Will there also be a backport for Kodi 20 Nexus?

i will make a try to see if works

i tried backport and test subs changes on nexus but dont works nothing
i dont think i will invest time on nexus there are too much missing changes from omega

By the way @CastagnaIT , when testing inputstream.adaptive version 21.4.1 with the PR-1459, I noticed that the skipped subtitles problem also occurs with DASH streams (.mpd). I was able to recreate the behavior using the example stream:

http://mcdn.daserste.de/daserste/dash2/manifest.mpd

Maybe it will help with further analysis on this topic.

Greetings Weri

thanks i will try check

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Jan 25, 2024

i have played http://mcdn.daserste.de/daserste/dash2/manifest.mpd
with this stream on my test playback works for only some seconds then fall in to buffer loading forever
but this behaviour its the same with or without the new PR-1459

playing on Kodi 20 playback seem to works, but instead to get new segments from manifest, insert them manually, but sound strange because there are segments

from what i see also if i try sync in advance the manifest update, its not able to find next segment to be loaded/played and so freeze the playback
atm i havent found the reason of this problem but i dont see realations to the current fix PR so suggest to do separated investigations, would be great if you can open a separate new Issue thread

@werimail
Copy link
Author

werimail commented Jan 25, 2024

i have played http://mcdn.daserste.de/daserste/dash2/manifest.mpd with this stream on my test playback works for only some seconds then fall in to buffer loading forever but this behaviour its the same with or without the new PR-1459

Ditto @CastagnaIT , I also noticed the problem with stopping the stream and subsequent buffering during my test regarding the
subtitles.

playing on Kodi 20 playback seem to works, but instead to get new segments from manifest, insert them manually, but sound strange because there are segments

from what i see also if i try sync in advance the manifest update, its not able to find next segment to be loaded/played and so freeze the playback atm i havent found the reason of this problem but i dont see realations to the current fix PR so suggest to do separated investigations, would be great if you can open a separate new Issue thread

Okay, I'll open a new issue about it. It would be nice if you could add the relevant insights there. Unfortunately, I don't know much about the topic in detail.

Greetings Weri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Confirmed issue has been reproduced by a team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants