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

Embedded Closed Captions in h264 stream not shown in Kodi 19.4 on LE 10.0.3 #22132

Closed
1 of 7 tasks
gedakc opened this issue Nov 12, 2022 · 3 comments · Fixed by #22143
Closed
1 of 7 tasks

Embedded Closed Captions in h264 stream not shown in Kodi 19.4 on LE 10.0.3 #22132

gedakc opened this issue Nov 12, 2022 · 3 comments · Fixed by #22143
Labels
Resolution: Fixed issue was resolved by a code change

Comments

@gedakc
Copy link

gedakc commented Nov 12, 2022

Bug report

Describe the bug

Embedded Closed Captions in h264 stream are not shown in Kodi 19.4 on LE 10.0.3.

Embedded Closed Captions (subtitles) are no longer displayed on Kodi as it exists on LibreELEC 10.0.3 with Kodi 19.4 compiled 2022-10-15. This occurs with an h264 stream using the video addon for Canadian Broadcasting Corporation (CBC) on a Raspberry Pi 3 model B.

The subtitles do display with LibreELEC 10.0.2 with Kodi 19.4 compiled 2022-03-05.

Note that the CBC video addon is geo-restricted to Canada and must be configured with a free user account from watch.cbc.ca. This may prove a challenge for some to reproduce the issue so I have isolated an example URL as mentioned later.

Expected Behavior

Closed caption subtitles should be shown when embedded in the video stream and Kodi is configured to parse and display closed captions.

When Enable parsing for closed captions (see Settings -> Player -> Language) is active in Kodi and closed caption subtitles are enabled in the player (use T key to toggle) then if closed captions are available then these should be displayed on screen while the video plays.

Actual Behavior

Closed caption subtitles are not displayed.

None of the closed caption subtitles available in the video stream are displayed. Pressing the T key toggles between the following two messages:

  • "Subtitles disabled"
  • "Subtitles unknown"

Pressing M to access the Subtitle settings indicates that there are two potential values for Subtitle:

  • Unknown [captions] (1/2)
  • Unknown [captions] (2/2)

Selecting either of these and closing the dialog results in the same response -- namely that closed caption subtitles are not displayed.

Possible Fix

The problem has been reproduced by emveepee and popcornmix who indicate the following two related pull requests:

To Reproduce

Steps to reproduce the behavior:

  1. First enable embedded closed captions.

    • Navigate to Gear icon -> Player -> Language.
    • Navigate to Enable parsing for closed captions and press Enter to toggle to active.
  2. Next begin playback of an h264 video stream or file that contains embedded closed captions.

    If in Canada use CBC video addon (configured with a free account from watch.cbc.ca) to play: Shows/Animation/The Adventures of Napkin Man!/Season 3/Queen of the Fairies

    If not in Canada this sample file URL does not appear to be geo-restricted (should be one long string):

    https://cbcrcott-gem.akamaized.net/7fef7357-e938-46e2-88c7-5fdead95abcc/CBC_KIDSCBC_THEADVENTURESOFNAPKINMAN_SEASON_03_S03E01.ism/desktop_master.m3u8?hdnea=st=1667930958~exp=1667931078~acl=/7fef7357-e938-46e2-88c7-5fdead95abcc/cbc_kidscbc_theadventuresofnapkinman_season_03_s03e01.ism/desktop*~hmac=fa5d0d074d95dc04d6f4d613ecd8ee5abbfc5e701e5999d614ce685a971cb29f

    Updated URL isolated 2022-11-12:

    https://cbcrcott-gem.akamaized.net/7fef7357-e938-46e2-88c7-5fdead95abcc/CBC_KIDSCBC_THEADVENTURESOFNAPKINMAN_SEASON_03_S03E01.ism/desktop_master.m3u8?hdnea=st=1668285748~exp=1668285868~acl=/7fef7357-e938-46e2-88c7-5fdead95abcc/cbc_kidscbc_theadventuresofnapkinman_season_03_s03e01.ism/desktop*~hmac=14b87490ad0fa942e412b73815edeb35654ab9da6d6a4e2ec281b0a85c5493a3

    NOTE: If the sample file URL stops working then let me know. I may be able to isolate another example.

  3. Ensure that closed captions are enabled by either:

    • toggle closed captions on/off with T key
    • access playback menu with M key and ensure closed captions are active in the Subtitle settings menu.

Debuglog

The debug logs can be found here:

Screenshots

Unfortunately when I try to take a screen shot demonstrating the missing closed caption subtitles I only get a black screen with no video image.

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

BACKGROUND DETAILS / HISTORY

Problem reported by me in LibreELEC forum post:

The problem was confirmed by popcornmix and emveepee using the above sample URL and appears related to following commits:

These changes to XBMC were initiated by Kodi forum post:

The change to xbmc is outlined as being based on a videolan/vlc change:

There are at least two other xbmc/inputstream.adaptive related problem reports:

Embedded closed captions do not display on:

  • RPi3B with LE 10.0.3 and Kodi 19.4 compiled 2022-10-15

These same closed captions do display on:

  • RPi3B with LE 10.0.2 and Kodi 19.4 compiled 2022-03-05
  • 2017 NVidia Shield with Kodi 19.3

In summary the problem seems to originate with pull request [subtitles] Fix CC condition for valid captions #21414 which was merged on 2022-05-17.

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: LibreELEC 10.0.3

  • Kodi version: 19.4 compiled 2022-10-15

@CastagnaIT
Copy link
Collaborator

problems on xbmc/inputstream.adaptive Issues are not related to mentioned Kodi PR,
but could be something similar to fix to make all types of CC on xbmc/inputstream.adaptive working,
we have a outdated and incomplete CC parser, a full revamp its many complex

I feel like i have already seen a discussion of this kind somewhere
I think @enen92 is already aware

@enen92
Copy link
Member

enen92 commented Nov 13, 2022

ccextractor is not able to detect the cc the patch tried to solve, however it works fine in ffmpeg. Not sure how is the support for eia-708 nowadays in ffmpeg but maybe the way to go in the future is just to drop the custom decoders we have (and try to contribute what does not work to ffmpeg).
I think our best bet for now, considering the timeline, is just to revert the patch and reopen the original issue

@CastagnaIT
Copy link
Collaborator

yeah if it works it would save us a lot of work
better try this when the new ffmpeg version is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Fixed issue was resolved by a code change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants