authentication errors stream working on VLC but not on Kodi
#1
Hi,

My streams has the authentication in form of a hash string i.e http://url.com/channel?t=xxxxxxxxxxxxxxxx. These streams are working perfectly fine on VLC but on itpv simple client as soon as i start a stream i get the following error:

19:46:59 T:16464 NOTICE: DVDPlayer: Opening: http://url.com/channel?t=xxxxxxxxxxxxxxxx
19:46:59 T:16464 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
19:46:59 T:7428 NOTICE: Creating InputStream
19:47:00 T:7428 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 401
19:47:00 T:7428 ERROR: CCurlFile::Open failed with code 401 for http://url.com/channel?t=xxxxxxxxxxxxxxxx
19:47:00 T:7428 ERROR: XFILE::CFileCache::Open - failed to open source <http://url.com/channel?t=xxxxxxxxxxxxxxxx>
19:47:00 T:7428 ERROR: CDVDPlayer::OpenInputStream - error opening [http://url.com/channel?t=xxxxxxxxxxxxxxxx

It looks like authentication problems but the strange thing is that my credential are valid and the streams are working on VLC and Perfect player.

/M
Reply
#2
No one experienced the same thing?

/M
Reply
#3
What version of Kodi are you using?

Enable debug logging, run the channel, and check the log again.
HTPC Server - Windows 8.1 + XBMC Helix | Intel QuadCore, 4GB RAM, 4 TB SATA
Intel NUC D54250WYK - Windows 8.1 + XBMC Helix | Logitech Harmony 750
Samsung UE8005 | Bluetooth keyboard & mousepad
Reply
#4
Hi Maniac and thanks for the response,

I'am running Kodi 16.1, debug logging is enabled and this is what the log says:

13:24:34 T:2728 DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
13:24:34 T:2728 DEBUG: Radio UECP (RDS) Processor - new CDVDRadioRDSData::CDVDRadioRDSData
13:24:34 T:2728 NOTICE: DVDPlayer: Opening: pvr://channels/tv/All channels/pvr.iptvsimple_909049023.pvr
13:24:34 T:2728 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
13:24:34 T:2728 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
13:24:34 T:23220 DEBUG: Thread DVDPlayer start, auto delete: false
13:24:34 T:23220 NOTICE: Creating InputStream
13:24:34 T:23220 DEBUG: PVRManager - PVR::CPVRManager::OpenLiveStream - opening live stream on channel 'channel1'
13:24:34 T:23220 DEBUG: opening live stream on url 'http://url.com/channel1?t=xxxxx'
13:24:34 T:23220 DEBUG: PVRFile - XFILE::CPVRFile::Open - playback has started on filename pvr://channels/tv/All channels/pvr.iptvsimple_909049023.pvr
13:24:34 T:23220 INFO: XCURL:Big GrinllLibCurlGlobal::easy_aquire - Created session to http://url.com
13:24:34 T:2728 DEBUG: ------ Window Init (DialogBusy.xml) ------
13:24:35 T:23220 DEBUG: CCurlFile::GetMimeType - http://url.com/channel1?t=xxxxx -> audio/mpeg
13:24:35 T:23220 DEBUG: CFileCache::Open - opening <Bein_Sports_1_HD> using cache
13:24:35 T:23220 DEBUG: CurlFile::Open(0A52E960) http://url.com/channel1?t=xxxxx
13:24:35 T:2728 DEBUG: ------ Window Init (Pointer.xml) ------
13:24:35 T:23220 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 401
13:24:35 T:23220 ERROR: CCurlFile::Open failed with code 401 for http://url.com/channel?t=xxxxx
13:24:35 T:23220 ERROR: XFILE::CFileCache::Open - failed to open source <http://url.com/channel1?t=xxxxx>
13:24:35 T:23220 ERROR: CDVDInputStreamPVRManager::Open - error opening [http://url.com/channel1?t=xxxxx]
13:24:35 T:23220 ERROR: CDVDPlayer::OpenInputStream - error opening [pvr://channels/tv/All channels/pvr.iptvsimple_909049023.pvr]
13:24:35 T:23220 NOTICE: CDVDPlayer::OnExit()
13:24:35 T:23220 DEBUG: CDVDInputStreamPVRManager::Close - stream closed
13:24:35 T:23220 DEBUG: CApplication::OnPlayBackStopped: play state was 1, starting 1
13:24:35 T:23220 DEBUG: Thread DVDPlayer 23220 terminating
13:24:35 T:2728 DEBUG: CApplication::OnPlayBackStopped: play state was 3, starting 0
13:24:35 T:2728 DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
13:24:35 T:2728 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
13:24:35 T:2728 NOTICE: CDVDPlayer::CloseFile()
13:24:35 T:2728 NOTICE: DVDPlayer: waiting for threads to exit
13:24:35 T:2728 NOTICE: DVDPlayer: finished waiting
13:24:35 T:2728 NOTICE: CDVDPlayer::CloseFile()
13:24:35 T:2728 NOTICE: DVDPlayer: waiting for threads to exit
13:24:35 T:2728 NOTICE: DVDPlayer: finished waiting

/M
Reply
#5
Yeah it's a authentication error. I've seen this before, streams work on other players but not in Kodi. Some providers explicitly block the Kodi user-agent.

You can try and see if this helps. In your .m3u8 playlist add the following for each channel:

#EXTINF:-1 tvg-id="Channel ID" group-title="Group Name",Channel Name
#EXTVLCOPT:http-user-agent=VLC
http://url.com/channel1?t=xxxxx

The bold line, you can add anything here, I just used "VLC" as an example.
HTPC Server - Windows 8.1 + XBMC Helix | Intel QuadCore, 4GB RAM, 4 TB SATA
Intel NUC D54250WYK - Windows 8.1 + XBMC Helix | Logitech Harmony 750
Samsung UE8005 | Bluetooth keyboard & mousepad
Reply
#6
Hi againe,

Unfortunately what you suggested did not work. I used VLC as you example. How do you determine which user agent that should be used?

/M
Reply
#7
It was just a guess, since you mentioned that it worked in VLC I just presumed that a user-agent containing "Vlc" would work. but this does not seem to be the case...
HTPC Server - Windows 8.1 + XBMC Helix | Intel QuadCore, 4GB RAM, 4 TB SATA
Intel NUC D54250WYK - Windows 8.1 + XBMC Helix | Logitech Harmony 750
Samsung UE8005 | Bluetooth keyboard & mousepad
Reply
#8
Thanks a lot for your support Maniac, I really appreciate it. I'am trying different user-agents and hoping to find something working. Smile

/M
Reply
#9
Hello Mimo_424

How did you resolve this in the end? Did you resolve this?
I have the exact same problem here on kodi 16.1 and 17b5 on osmc on raspberry pi 3.
I keep getting:
ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 401

On the other hand on an ubuntu 16.04 laptop I have been able to get it to work with kodi 15.2 and an 0.18 nightly build (haven't been able to install anything in between:-(

Any advice is welcome.

Bert
Reply
#10
Hi,

I have the same issue with my kodi on osmc with iptv playlist (curl 401 error).

Did anyone manage to solve this?

Is it really a user-agent issue?

I've read somewhere that it was that the curl library was not up-to-date in osmc.

Thanks

Gabriel
Reply
#11
Any Updates please?
I tested with 15.2, 16.1, 17 and the latest nightly build for 17 they all return error 401 ... the same url works perfectly in VLC

736 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 401
14:42:14 T:41736 ERROR: CCurlFile::Open failed with code 401 for http://URL:8000/live/UNAME/PWORD/249.ts
14:42:14 T:41736 ERROR: XFILE::CFileCache::Open - failed to open source <http://URL:8000/live/UNAME/PWORD/249.ts>
Reply

Logout Mark Read Team Forum Stats Members Help
authentication errors stream working on VLC but not on Kodi0