Page 1 of 1

HLS fails fetching stream chunks from server using basic authentication

Posted: 30 May 2019 15:52
by Funkster
Hi folks,

Have searched here and on the general internet but haven't found anything that resembles a formal bug ticket so I am asking here before creating one.

I have an HLS stream on a server (Apache, HTTPS) that requires basic authentication. It plays fine using VideoJS (https://videojs.com/) within Chrome (MacOS) / Chromium (Linux). When I try to play the stream using VLC by providing the address for the stream.m3u8, it pops up a username/password dialog (twice, strangely) and then uses these credentials to fetch the m3u8 successfully. However, it then tries to fetch the streamXX.ts files without using the credentials, and gets 401:

Code: Select all

main debug: `https://server/dir/stream.m3u8' successfully opened ... adaptive error: Failed reading https://server:443/dir/stream55.ts: HTTP/1.1 401 Authorization Required main debug: no demux modules matched adaptive error: Failed to create demuxer 00000000 TS main debug: EOF reached main debug: removing module "adaptive" main debug: removing module "record" main debug: removing module "prefetch" main debug: removing module "access" main debug: dead input main debug: changing item without a request (current 0/1) main debug: nothing to play qt debug: IM: Deleting the input
Now, I appreciate that this is a bit of a corner case. It's a private stream for testing only so not exactly the sort of thing most people are doing. But I figured if it is able to open the playlist it would seem appropriate for it to be able to use the same auth method to fetch everything that that playlist refers to (from the same realm, anyway)

This is not an internet-facing stream so unfortunately I can't provide anything to test against; however it would be fairly trivial to set up an HTTPS on your localhost with basic auth enabled to replicate the bug.

Same result whether on Windows (10) or Linux (Arch); VLC v3.0.6.

If anyone has any input I would surely appreciate it. If not perhaps I will go ahead and create a ticket?

Thank you for your attention.

Re: HLS fails fetching stream chunks from server using basic authentication

Posted: 01 Jun 2019 18:42
by unidan
Hi, it is being fixed, if not already. Patches came from last week for this, but it might be available only in future 4.0 release.

Re: HLS fails fetching stream chunks from server using basic authentication

Posted: 01 Jun 2019 21:57
by Funkster
Magic, thank you for the intel. I'll keep an eye out for updates.

Re: HLS fails fetching stream chunks from server using basic authentication

Posted: 01 Jun 2019 22:40
by InTheWings
it's not fixed at all..

Re: HLS fails fetching stream chunks from server using basic authentication

Posted: 03 Jun 2019 10:37
by Funkster
Yeah I'm getting the same error on the 4.0.0 nightly build from 20190602-0833