add-ons / add-ons/plugin.video.vrt.nu
Not all playback issues result in onPlayBackError callback
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 125
- Forks
- 27
- Avg merge
- 3h 46m
- Merged PRs (30d)
- 12
Description
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:
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the xbmc.Player.onPlayBackError and onPlayBackStopped entry points around the logged InputStream Adaptive MPD failure, and compare this with the Widevine case referenced through inputstreamhelper#69. Reproduce a playback failure if possible and determine whether the add-on receives an error callback instead of only the stopped event; related issue #307 provides additional context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100