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

Not all playback issues result in onPlayBackError callback #727

Open
dagwieers opened this issue Apr 10, 2020 · 5 comments
Open

Not all playback issues result in onPlayBackError callback #727

dagwieers opened this issue Apr 10, 2020 · 5 comments
Labels
bug Something isn't working inputstream.adaptive Related to the inputstream.adaptive add-on kodi Related to the Kodi media player reported This issue has been reported to upstream project

Comments

@dagwieers
Copy link
Collaborator

Describe the bug

In some cases it is possible for playback to fail without the add-on being able to report back to the user. The user will simply see a busy state followed by nothing because the add-on does not know playback has failed.

The normal flow is that Kodi or InputStream Adaptive performs an xbmc.Player.onPlayBackError callback so the add-on can handle it as expected (i.e. try an alternative playback method like use HLS instead of MPD, or provide a specific error to the user).

Here is an example of this problem:

2020-04-10 02:12:52.074 T:1378874240  NOTICE: [plugin.video.vrt.nu] Access: plugin://plugin.video.vrt.nu/play/id/vid-84618801-4e10-46a2-9403-d444fce53630/pbs-pub-0738b2b8-4242-4783-9686-8edb3f66be79
2020-04-10 02:12:52.106 T:1378874240  NOTICE: [plugin.video.vrt.nu] Got cached token '/storage/.kodi/userdata/addon_data/plugin.video.vrt.nu/tokens/ondemand_vrtPlayerToken.tkn'
2020-04-10 02:12:52.110 T:1378874240  NOTICE: [plugin.video.vrt.nu] URL get: https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/videos/pbs-pub-0738b2b8-4242-4783-9686-8edb3f66be79$vid-84618801-4e10-46a2-9403-d444fce53630?vrtPlayerToken=b10@e5af19407961d59b683f1b2c7384165485b11852a527bf030d3c1dd0f940cca3&client=vrtvideo@PROD
2020-04-10 02:12:52.487 T:1378874240  NOTICE: [plugin.video.vrt.nu] Protocol: mpeg_dash
2020-04-10 02:12:52.700 T:1378874240  NOTICE: [plugin.video.vrt.nu] Play: https://ondemand-cf.lwc.vrtcdn.be/content/vod/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5_nodrm_90b2af9a-63cf-478e-b20b-46e7aec0c0cb.ism/.mpd
2020-04-10 02:12:52.730 T:1937706416  NOTICE: VideoPlayer::OpenFile: plugin://plugin.video.vrt.nu/play/id/vid-84618801-4e10-46a2-9403-d444fce53630/pbs-pub-0738b2b8-4242-4783-9686-8edb3f66be79
2020-04-10 02:12:52.736 T:1432351616  NOTICE: Creating InputStream
2020-04-10 02:12:52.761 T:1465889664  NOTICE: [plugin.video.vrt.nu] [PlayerInfo 9559] Event onPlayBackStarted
2020-04-10 02:12:52.764 T:1465889664  NOTICE: [plugin.video.vrt.nu] URL get: https://vrtnu-api.vrt.be/search?i=video&facets[videoId]=vid-84618801-4e10-46a2-9403-d444fce53630&size=1
2020-04-10 02:12:53.323 T:1432351616   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 415
2020-04-10 02:12:53.323 T:1432351616   ERROR: CCurlFile::Open failed with code 415 for https://ondemand-cf.lwc.vrtcdn.be/content/vod/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5_nodrm_90b2af9a-63cf-478e-b20b-46e7aec0c0cb.ism/.mpd:
2020-04-10 02:12:53.323 T:1432351616   ERROR: AddOnLog: InputStream Adaptive: Cannot download https://ondemand-cf.lwc.vrtcdn.be/content/vod/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5_nodrm_90b2af9a-63cf-478e-b20b-46e7aec0c0cb.ism/.mpd
2020-04-10 02:12:53.323 T:1432351616   ERROR: AddOnLog: InputStream Adaptive: Could not open / parse mpdURL (https://ondemand-cf.lwc.vrtcdn.be/content/vod/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5/vid-84618801-4e10-46a2-9403-d444fce53630-CDN_5_nodrm_90b2af9a-63cf-478e-b20b-46e7aec0c0cb.ism/.mpd)
2020-04-10 02:12:53.324 T:1432351616   ERROR: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.vrt.nu/play/id/vid-84618801-4e10-46a2-9403-d444fce53630/pbs-pub-0738b2b8-4242-4783-9686-8edb3f66be79]
2020-04-10 02:12:53.324 T:1432351616  NOTICE: CVideoPlayer::OnExit()
2020-04-10 02:12:53.382 T:1937706416  NOTICE: CVideoPlayer::CloseFile()
2020-04-10 02:12:53.383 T:1937706416  NOTICE: VideoPlayer: waiting for threads to exit
2020-04-10 02:12:53.383 T:1937706416  NOTICE: VideoPlayer: finished waiting
2020-04-10 02:12:53.403 T:1465889664  NOTICE: [plugin.video.vrt.nu] [PlayerInfo 9559] Event onPlayBackStopped

IIRC this also happens on Widevine playback issues where inputstreamhelper cannot offer to install the Widevine library when playback fails because we do not know. If we did (e.g. through onPlayBackError) we would not have to check everything beforehand everytime. See emilsvennesson/script.module.inputstreamhelper#69

This relates to: #307

To Reproduce

Steps to reproduce the behavior:

  1. Make it fail in a specific way :-)

Expected behavior

We should get an xbmc.Player.onPlayBackError call.

Additional context

  • Operating system: LibreELEC v9.2.1
  • Kodi version: 18.6
  • Addon version: 2.3.2
  • Using a VPN: no
  • Country you are using the addon from: BE
@dagwieers dagwieers added bug Something isn't working kodi Related to the Kodi media player inputstream.adaptive Related to the inputstream.adaptive add-on labels Apr 10, 2020
@dagwieers
Copy link
Collaborator Author

cc @peak3d

@dagwieers
Copy link
Collaborator Author

dagwieers commented Apr 11, 2020

Below is an example where an update of inputstream.adaptive causes playback issues until Kodi has been restarted. It would be very useful if the add-on would get an onPlayBackError call so we can advise the user to restart Kodi, rather than failing to playback and returning to the menu.

Everytime there is an inputstream.adaptive update we have users that report issues with the add-on or with Kodi (and do not know they have to restart Kodi, or even were aware IA was updated).

2020-04-11 03:25:32.763 T:1305469824  NOTICE: [plugin.video.vrt.nu] Access: plugin://plugin.video.vrt.nu/play/id/vid-335d7118-7eff-4fd7-a9be-670ee4495f5a/pbs-pub-68f789d5-b834-4dd7-aac9-f1ec6ee8bbfe
2020-04-11 03:25:32.780 T:1305469824  NOTICE: [plugin.video.vrt.nu] Got cached token '/storage/.kodi/userdata/addon_data/plugin.video.vrt.nu/tokens/ondemand_vrtPlayerToken.tkn'
2020-04-11 03:25:32.782 T:1305469824  NOTICE: [plugin.video.vrt.nu] URL get: https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/videos/pbs-pub-68f789d5-b834-4dd7-aac9-f1ec6ee8bbfe$vid-335d7118-7eff-4fd7-a9be-670ee4495f5a?vrtPlayerToken=b10@c8c32f84935f37963598f5ba212ff62e68b8545c06ca0e37a6e9ad92f5325386&client=vrtvideo@PROD
2020-04-11 03:25:33.059 T:1305469824  NOTICE: [plugin.video.vrt.nu] Protocol: mpeg_dash
2020-04-11 03:25:33.280 T:1305469824  NOTICE: [plugin.video.vrt.nu] Play: https://ondemand-cf.lwc.vrtcdn.be/content/vod/vid-335d7118-7eff-4fd7-a9be-670ee4495f5a-CDN_2/vid-335d7118-7eff-4fd7-a9be-670ee4495f5a-CDN_2_nodrm_921b80ed-1e29-4d73-9925-4b39dd00b9dc.ism/.mpd
2020-04-11 03:25:33.312 T:1937093184  NOTICE: VideoPlayer::OpenFile: plugin://plugin.video.vrt.nu/play/id/vid-335d7118-7eff-4fd7-a9be-670ee4495f5a/pbs-pub-68f789d5-b834-4dd7-aac9-f1ec6ee8bbfe
2020-04-11 03:25:33.314 T:1205859200  NOTICE: Creating InputStream
2020-04-11 03:25:33.315 T:1205859200   ERROR: ADDON: Could not locate inputstream.adaptive.so.2.4.3
2020-04-11 03:25:33.316 T:1205859200   ERROR: IAddonInstanceHandler::CreateInstance: inputstream.adaptive returned bad status "Permanent failure" during instance creation
2020-04-11 03:25:33.316 T:1205859200   ERROR: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.vrt.nu/play/id/vid-335d7118-7eff-4fd7-a9be-670ee4495f5a/pbs-pub-68f789d5-b834-4dd7-aac9-f1ec6ee8bbfe]
2020-04-11 03:25:33.316 T:1205859200  NOTICE: CVideoPlayer::OnExit()
2020-04-11 03:25:33.424 T:1563464576  NOTICE: [plugin.video.vrt.nu] [PlayerInfo 2060] Event onPlayBackStarted
2020-04-11 03:25:33.425 T:1563464576  NOTICE: [plugin.video.vrt.nu] URL get: https://vrtnu-api.vrt.be/search?i=video&facets[videoId]=vid-335d7118-7eff-4fd7-a9be-670ee4495f5a&size=1
2020-04-11 03:25:33.528 T:1937093184  NOTICE: CVideoPlayer::CloseFile()
2020-04-11 03:25:33.529 T:1937093184  NOTICE: VideoPlayer: waiting for threads to exit
2020-04-11 03:25:33.529 T:1937093184  NOTICE: VideoPlayer: finished waiting
2020-04-11 03:25:38.505 T:1563464576  NOTICE: [plugin.video.vrt.nu] [PlayerInfo 2060] Event onPlayBackStopped

What is worse, Kodi even calls onPlayBackStarted and onPlayBackStopped after inputstream.adaptive already has failed.

cc @peak3d

@peak3d
Copy link

peak3d commented Apr 11, 2020

@dagwieers we're trying to reproduce

@dagwieers
Copy link
Collaborator Author

@peak3d I was planning to open an issue upstream, but was not sure whether the cause here is IA or Kodi. Let me know where to open a proper issue with full debug log. 👍

@dagwieers
Copy link
Collaborator Author

I finally reported this upstream at xbmc/inputstream.adaptive#497

@dagwieers dagwieers added the reported This issue has been reported to upstream project label Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inputstream.adaptive Related to the inputstream.adaptive add-on kodi Related to the Kodi media player reported This issue has been reported to upstream project
Projects
None yet
Development

No branches or pull requests

2 participants