plugin.video.vrt.nu
plugin.video.vrt.nu copied to clipboard
Some streams fail with "415 Unsupported Media Type"
Describe the bug
There is an outstanding issue at VRT NU where some episodes do not work when using HLS streams (i.e. when not using Widevine). The problem has been reported a few times to VRT and they have confirmed this general issue. In most cases they will fix the faulty stream by hand when reported, but the root cause is yet unknown and unfixed.
This relates to #308, #311 and #538
To reproduce
Steps to reproduce the behavior:
- Disable Widevine (and restart the add-on)
- Go to program 24 hours in police custody
- Click on episode S04E05
- See error 415 Unsupported Media Type
Fix
- Verify this issue on the VRT NU website (Apple Safari?) or in the VRT NU app (Iphone/Ipad?)
- Report the stream to VRT NU at: https://www.vrt.be/vrtnu/help/
- Do mention the error "415 Unsupported Media Type" and it is related to the HLS stream only.
- Wait for VRT to fix the stream.
Work around
Enable Widevine in the settings so the VRT NU add-on selects te MPEG-DASH stream that is unaffected by this issue.
Additional context
- Operating system: LibreELEC 9.0.2
- Kodi version: Leia 18.2
- Addon version: 1.10.0
- Using a VPN: no
- Country you are using the addon from: Belgium
Log (if available)
This is an example log from an earlier identical issue.
2019-06-14 02:24:56.218 T:1321550704 NOTICE: [plugin.video.vrt.nu] Got cached token '/storage/.kodi/userdata/addon_data/plugin.video.vrt.nu/ondemand_vrtPlayerToken.tkn'
2019-06-14 02:24:56.219 T:1321550704 NOTICE: [plugin.video.vrt.nu] URL get: https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/videos/pbs-pub-cd09cc3c-5178-49c1-9387-715cb9ad98ff$
vid-d0b7cfaa-fd96-448e-9923-281b10261bfa?vrtPlayerToken=b10@b04c02c93691e93774a02025a289e44ce86e4ef8fc3f9d567d427964d37a1c4c&client=vrtvideo
2019-06-14 02:24:56.466 T:1321550704 NOTICE: [plugin.video.vrt.nu] URL get: https://remix-cf-vrt.akamaized.net/remix/18f7b87b-2715-490c-9ac6-8f05fbf5c7e4/remix_aes.ism/.m3u8?hd
2019-06-14 02:24:56.655 T:1321550704 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'urllib2.HTTPError'>
Error Contents: HTTP Error 415: Unsupported Media Type
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.vrt.nu/addon.py", line 13, in <module>
router.router(sys.argv)
File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/router.py", line 70, in router
_vrtplayer.play(params)
File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/vrtplayer.py", line 222, in play
stream = _streamservice.get_stream(params)
File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/streamservice.py", line 245, in get_stream
stream = StreamURLS(*self._select_hls_substreams(manifest_url))
File "/storage/.kodi/addons/plugin.video.vrt.nu/resources/lib/streamservice.py", line 276, in _select_hls_substreams
hls_playlist = urlopen(master_hls_url).read().decode('utf-8')
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
File "/usr/lib/python2.7/urllib2.py", line 435, in open
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
File "/usr/lib/python2.7/urllib2.py", line 473, in error
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
HTTPError: HTTP Error 415: Unsupported Media Type
-->End of Python script error report<--
2019-06-14 02:24:56.679 T:1937156496 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.vrt.nu/?publication_id=pbs-pub-cd09cc3c-5178-49c1-9387-715cb9ad98ff&action=play&video_id=vi
d-d0b7cfaa-fd96-448e-9923-281b10261bfa&video_url=https%3A%2F%2Fwww.vrt.be%2Fvrtnu%2Fa-z%2Fappel-d-urgence%2F2%2Fappel-d-urgence-s2a1%2F]
I saw this also with an episode of Karrewiet. This also occured on the vrt.nu website. I reported this to vrt and they had fixed this.
This might have nothing to do with the add-on...
Indeed, it doesn't play on VRT NU website either: https://www.vrt.be/vrtnu/a-z/appel-d-urgence/2/appel-d-urgence-s2a1/ And this error was reported to VRT NU, but they denied that there was a problem. Unbelievable! https://twitter.com/bertvandepoel/status/1138232737263960064
This problem only occurs with the HLS-stream, the MPEG-DASH stream is working, when you enable inputstream adaptive, the stream plays fine.
@mediaminister ~I did try using inputstream.adaptive though, but maybe something else was wrong. Will try again later.~ It indeed works fine using inputstream.adaptive.
Should we provide a more sensible error to the user? E.g. try again with or without inputstream.adaptive, try running it from VRT NU website and report to VRT.
Thanks everyone.
Okay, I'll "fix" this providing a message to the user. And VRT should fix this problem as explained here: https://docs.unified-streaming.com/documentation/vod/troubleshooting.html#unsupported-media-type
I added a vrtnu
label so we can also track issues that originate at VRT NU. Personally I am a big fan to also track issues here that originate at VRT for the simple reason that we could improve the Kodi plugin (either with a workaround, or with better error messages like we did here).
At some point we will cover most of the common/recurring issues with proper messages so that our users know exactly what to expect (and confidence in our solution stays high despite glitches elsewhere).
I cannot play the first and second episode using the Kodi plugin now, both with and without inputstream.adaptive. I am using the upcoming v2.0.0 (although I doubt this matters).
You should have a recent Widevine CDM binary installed. Appel d'urgence is encrypted. Maybe your Widevine binary is outdated or blacklisted.
@mediaminister Could be, I noticed that on my other "identical" device it did work today.
I first removed some files in .kodi/cdm and in .kodi/cdm/widevine, without success. Then I reinstalled Widevine by first removing the library symlink in .kodi/cdm, also without success.
So one of my devices still gets a HTTP 415 error. (Could be that the time of testing makes a difference too ?)
No, Appel d'urgence should always play fine with inputstream.adaptive and Widevine DRM installed. I tested this in VMWare Player with LibreELEC 9.0.2. Can you double-check if you use the latest inputstream.adaptive version for LibreELEC? You have to install this manually via add-on search.
It is definitely not the latest inputstream.adaptive because LibreELEC (or the official repositories?) only ship 2.3.17.1 for ARM (while I am waiting for https://github.com/peak3d/inputstream.adaptive/pull/259 to be available).
I would also like to add an About section in the settings that shows different things about the plugin (versions, DRM, Widevine version, etc...) and add some information in the Wiki about what is required for proper playback (a moving target).
Inputstream Adaptive 2.3.17.1 is the latest version for LibreELEC and in my test Appel d'urgence just plays fine with this version.
If you keep getting http 415 with Appel d'urgence and you're sure you have Inputstream Adaptive 2.3.17.1 and Widevine installed and enabled, there must be something wrong with the streamservice stream selection.
Can you please test with other Widevine protected streams? Like Netflix or VTM/Stievie. Can you provide a debug log?
If we can't find the cause of this problem, we can't add well-directed info about streaming requirements to the wiki.
Just a few minutes ago I got an inputstream.adaptive update to v2.3.22.1 for my Raspberry Pi and everything failed to work (failed differently then before). I then rebooted my system (which I tried before) and then it magically worked. No Widevine was updated.
I also noticed that the DRM option (advertised for 720p live stream support) also affects playback here. Somehow I assumed that it was only required for live stream support, and the VOD content would automatically use DRM if needed.
So to avoid any confusion, I think we ought to change the text for that option to: "Use DRM (required to play protected content)"
PS The HTTP 415 message could also be related to DRM not being enabled in this case it seems.
Using Widevine DRM is always a free user choice, for livestreaming and for VOD. The cause of your problem was definitely the DRM option, I overlooked that. I improved the stream error message accordingly in: https://github.com/pietje666/plugin.video.vrt.nu/pull/332
Already four episodes of Appel d'urgence are affected and VRT didn't fix this yet...
Okay, VRT NU fixed this yesterday.
I reported another issue related to HLS stream playback (episode S04E05 of 24 hours in police custody) and VRT confirmed they still have intermittent issues related to this that they are trying to get fixed, so it still may happen from time to time...
VRT NU uses Unified Origin and HTTP Error 415 is documented, only VRT NU can fix it: https://docs.unified-streaming.com/documentation/vod/index.html
So we discovered that the VRT Radio2 live stream also suffers from this issue: https://github.com/pietje666/plugin.video.vrt.nu/pull/685#issuecomment-580710059
I opened a dedicated ticket for this at #735
This happened again last night on the latest De Afspraak episode (2020-04-09). https://www.vrt.be/vrtnu/a-z/de-afspraak/2020/de-afspraak-d20200409/
I reported it to VRT NU.
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
This time only the MPEG DASH stream failed, HLS was fine.
This means Inputstream Adaptive detects the HTTP 415 error, but as far as I know there is no interface to catch the error in Python and show an error message to the user...
We cannot easily handle this better. We handed this over to IA and any conceivable way to check playback is worse than the problem IMO.
If xbmc.Player.onPlayBackError
could return http errors, then it would be easy to automatically select the HLS stream if MPEG DASH failed.
Can we make a new ticket for this?
This might also be the right way to handle Widevine issues. There is a missing link there too that we can have add-ons support through inputstreamhelper.
Update: I opened #727 for this. Now we need to report this upstream.