Can anyone please advise me on how to open a pwd protected http stream from CLI in vlc?

I checked out the --help and man pages, but they seem to offer only syntax for opening ftp, rmt and smb pwd protected streams (and http-proxy), but not http. Or there is some walk around solution I am not thinking of?

What I have tried already:

cvlc http://user:XXX@
cvlc --http-user 'user' --http-pwd 'XXX'

May be I can not read the manuals properly but to me the instructions from vlc docs is really difficult to interpret into cli commands:

% vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option

   You may also use the following syntax :
% vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-
module2-option1=... --sout-module2-option2=... ...

   For example, to transcode a stream and send it, use:
% vlc input_stream --sout '#transcode{options}:standard{options}' 

If I have interpreted the manual correctly (so far I came up with 3 or 4 different options), I need module standard, option access=, then item http:, item options user=<user name> and pwd=<password>. All put together should read one of these:

vlc '#standard{access=http:user=admin,pwd=XXX}'
vlc '#standard{access=http:user=admin},http:pwd=XXX}'
vlc --sout-standard-access=http:user=admin

(ok I did not put in the pwd in the last line but vlc did not even pick up the user= as user's name....).

But nothing works and I do not even get anywhere close to putting it right looking at the output produced.

This is really cheeky and noobish but if someone could share a real working sample how that should look like, that would be greatly appreciated.

VERY IMPORTANT - I need a client part of the commands for capturing the stream...

Again, if I read the manual correctly, this part:

http: streams over HTTP. Item options are: user= to enable HTTP basic authentication and set the user, pwd= to set the basic authentication password, mime= to set the mime type returned by the server.

is re the server part.

  • In your first attempt shouldn't it be ?user=admin&pwd=XXX? – Xweque Jul 2 '14 at 14:39
  • yes, thanks for pointing that out. Unfortunately in was a typo only here, in CLI it was with the right syntax and still not working... – VDV Jul 2 '14 at 14:47

From the client side just run


Answer 1:

• http: streams over HTTP

via Videolan-streaming-howto

Item options are:
user=<username> to enable HTTP basic authentication and set the user.
pwd=<password> to set the basic authentication password.
mime=<mime type> to set the mime type returned by the server.

Answer 2:

• mplayer

via man mplayer
mplayer is an alternative interface if your willing to try other packages.

With mplayer we have the following syntax available:
mplayer [mms[t]|http|http_proxy|rt[s]p|ftp]:// [user:passwd@]URL[:port] [options]

-user <user name>
Specify user name for http authentication.

-passwd <password>
Specify password for http authentication.

Please do note, I've unfortunately never used these options with mplayer before.

  • thanks for pointing me in this direction - but 'access' seems to be a server module from examples available on Videolan docs page (why auth commands though?????) – VDV Jul 2 '14 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.