kodi-svtplay / xbmc-svtplay

Unofficial addon for watching SVT Play on Kodi
GNU General Public License v3.0
67 stars 34 forks source link

Subtitles not working anymore #257

Closed pedro-araujo closed 4 years ago

pedro-araujo commented 4 years ago

Problem description

I have noticed that I can't enable subtitles with this plugin anymore for any show. I used to be able to it and I can confirm that the subtitles exist for the shows I'm trying to watch. For example this one:

linqcan commented 4 years ago

Thanks for reporting this! I can reproduce the issue in my environment (W10, Kodi 18.5) and will look at this as soon as possible.

linqcan commented 4 years ago

I have investigated this now and have dissapointing news.

SVT has stoppped providing subtitles, for new shows, in a format that Kodi supports. This means that Kodi won't be able to show subtitles fore newer shows.

Unfortunately there is nothing I can do at this time. What need to happen is that the underlying playback component in Kodi, ffmpeg, need to add support for the subtitle format used (WebVTT).

linqcan commented 4 years ago

For reference I tried with the latest ffmpeg snapshot and it can't playback the subtitles SVT use:

ffmpeg-20200124-e931119-win64-static\bin> .\ffplay.exe https://svt-vod-4j.akamaized.net/d0/se/20200124/3f87dce4-1fc4-4ab4-a8e0-c788290e8a74/master.m3u8?alt=https%3A%2F%2Fswitcher.cdn.svt.se%2F3f87dce4-1fc4-4ab4-a8e0-c788290e8a74%2Fmaster.m3u8                                                                                                                                                                                                               ffplay version git-2020-01-24-e931119 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 38.100 / 56. 38.100
  libavcodec     58. 66.100 / 58. 66.100
  libavformat    58. 35.104 / 58. 35.104
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 71.100 /  7. 71.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[hls @ 000001882759b680] Can't support the subtitle(uri: text/closed.m3u8)
pedro-araujo commented 4 years ago

Thanks for the quick response! That is rather unfortunate. I guess it is time to raise the bar for my comprehension of the Swedish language. :)

Is there anything special in the WebVTT format used by SVTPlay that prevents it from being supported by ffmpeg? A quick web search hints me that WebVTT should be supported by ffmpeg.

wader commented 4 years ago

Seems like the support is behind a experimental flag for now :(

Tried some of the HLS examples from apple https://developer.apple.com/streaming/examples/ and it behaved strange, seemed to get stuck in a download loop for so.

$ ffprobe -strict experimental -show_streams -of json -i 'https://svt-vod-4j.akamaized.net/d0/se/20200124/3f87dce4-1fc4-4ab4-a8e0-c788290e8a74/master.m3u8' | jq '.streams[] | select(.codec_type=="subtitle")'
{
  "index": 1,
  "codec_name": "webvtt",
  "codec_long_name": "WebVTT subtitle",
  "codec_type": "subtitle",
  "codec_time_base": "0/1",
  "codec_tag_string": "[0][0][0][0]",
  "codec_tag": "0x0000",
  "r_frame_rate": "0/0",
  "avg_frame_rate": "0/0",
  "time_base": "1/1000",
  "start_pts": 4840,
  "start_time": "4.840000",
  "disposition": {
    "default": 0,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 0,
    "hearing_impaired": 1,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
  },
  "tags": {
    "variant_bitrate": "4720044",
    "language": "sv",
    "comment": "Svenska"
  }
}
linqcan commented 4 years ago

@pedro-araujo I was thinking of WebVTT embedded in HLS. It turns out, after a quick test, that sideloading the WebVTT sub works in Kodi 18.5 😄 (I must have done something wrong the first time)

Will create a fix for this asap!

@wader Yup, but sideloading seems to work so I will fallback to that and hope ffmpeg catches up in the future (VLC can fetch the subs from a HLS stream...)

pedro-araujo commented 4 years ago

@linqcan That is so good to hear! Thank you so much for the quick debugging! :D

I will be eagerly waiting for the fix.

wader commented 4 years ago

@linqcan Aha nice! 👍

linqcan commented 4 years ago

5.1.7 will include a fix for this issue.