從 CLI 在 vlc 中開啟受密碼保護的 http 流

從 CLI 在 vlc 中開啟受密碼保護的 http 流

誰能告訴我如何從 vlc 中的 CLI 開啟受密碼保護的 http 流?

我查看了 --help 和手冊頁,但它們似乎只提供用於打開 ftp、rmt 和 smb pwd 受保護流(和 http 代理)的語法,而不提供 http。或者有一些我沒有想到的解決方案?

我已經嘗試過的:

cvlc http://192.168.1.67/videostream.asf?user=admin&pwd=XXX
cvlc http://user:[email protected]/videostream.asf
cvlc http://192.168.1.67/videostream.asf --http-user 'user' --http-pwd 'XXX'

可能我無法正確閱讀手冊,但對我來說,vlc 文件中的說明確實很難解釋為 cli 命令:

% vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option
2=parameter2}:module2{option1=...,option2=...}:..."

   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}' 

如果我正確地解釋了手冊(到目前為止我想出了 3 或 4 個不同的選項),我需要 module standard、 option access=,然後是 item http:、 item optionsuser=<user name>pwd=<password>。所有的內容放在一起應該閱讀以下其中之一:

vlc http://192.168.1.67/videostream.asf '#standard{access=http:user=admin,pwd=XXX}'
vlc http://192.168.1.67/videostream.asf '#standard{access=http:user=admin},http:pwd=XXX}'
vlc http://192.168.1.67/videostream.asf --sout-standard-access=http:user=admin

(好吧,我沒有在最後一行輸入密碼,但 vlc 甚至沒有選擇user= 用戶名...)。

但沒有任何效果,我什至沒有接近正確地查看產生的輸出。

這確實是厚顏無恥和新手,但如果有人可以分享一個真實的工作範例,那應該是什麼樣子,那將不勝感激。

非常重要 - 我需要命令的客戶端部分來捕獲流......


再說一遍,如果我正確閱讀了手冊,這部分:

http:溪流透過 HTTP。選項有:user= 啟用HTTP 基本認證並設定用戶,pwd= 設定基本認證密碼,mime= 設定伺服器傳回的mime 類型。

是伺服器部分。

答案1

從客戶端運行

vlc http://YOURUSER:[email protected]/videostream.asf

答案2

答案1:

• http:透過 HTTP 進行串流傳輸

透過 Videolan-streaming-howto

專案選項有:
user=<username>啟用 HTTP 基本驗證並設定使用者。
pwd=<password>設定基本認證密碼。
mime=<mime type>設定伺服器回傳的mime類型。


答案2:

• mplayer

通過 man mplayer
如果您願意嘗試其他軟體包,mplayer 是一個替代介面。

對於 mplayer,我們可以使用以下語法:
mplayer [mms[t]|http|http_proxy|rt[s]p|ftp]:// [user:passwd@]URL[:port] [options]

-user <user name>
指定http認證的使用者名稱。

-passwd <password>
指定http 驗證的密碼。

請注意,不幸的是我以前從未在 mplayer 中使用過這些選項。

相關內容