mplayer
以下のコマンドを使ってネットワーク上のメディアを再生した場合
>mplayer.exe http://192.168.12.1:8080/ MPlayer Redxii-SVN-r37594-4.9.3 (x86_64) (C) 2000-2016 MPlayer Team FFmpeg version: N-77758-g6e24946 Build date: 2016-01-09 01:52:26 EST Playing http://192.168.12.1:8080/. Connecting to server 192.168.12.1[192.168.12.1]: 8080... Read failed. STREAM_ASF, URL: http://192.168.12.1:8080/ Connecting to server 192.168.12.1[192.168.12.1]: 8080... read: No error Failed, exiting. Connecting to server 192.168.12.1[192.168.12.1]: 8080... Read failed. No stream found to handle url http://192.168.12.1:8080/ Exiting... (End of file)
以下のリクエストが送られる
$ nc.openbsd -vv -k -l 192.168.12.1 8080; Listening on [192.168.12.1] (family 0, port 8080) Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50614) GET / HTTP/1.0 Host: 192.168.12.1:8080 User-Agent: MPlayer Redxii-SVN-r37594-4.9.3 (x86_64) Icy-MetaData: 1 Connection: close Connection closed, listening again. Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50615) GET / HTTP/1.0 Accept: */* User-Agent: NSPlayer/4.1.0.3856 Host: 192.168.12.1:8080 Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278} Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=0:0,request-context=1,max-duration=0 Connection: Close Connection closed, listening again. Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50616) GET / HTTP/1.0 Host: 192.168.12.1:8080 User-Agent: MPlayer Redxii-SVN-r37594-4.9.3 (x86_64) Icy-MetaData: 1 Connection: close Connection closed, listening again.
ユーザエージェントの切り替えには対応していない様子。
>mplayer.exe --user-agent "hoge" http://192.168.12.1:8080/ Unknown option on the command line: --user-agent Error parsing option on the command line: --user-agent MPlayer Redxii-SVN-r37594-4.9.3 (x86_64) (C) 2000-2016 MPlayer Team FFmpeg version: N-77758-g6e24946 Build date: 2016-01-09 01:52:26 EST
mpv
以下のコマンドを使ってネットワーク上のメディアを再生した場合
>mpv.com --no-ytdl --network-timeout 10 http://192.168.12.1:8080/ Playing: http://192.168.12.1:8080/ Failed to open http://192.168.12.1:8080/. Exiting... (Errors when loading file)
以下のリクエストが送られる
$ nc.openbsd -vv -k -l 192.168.12.1 8080; Listening on [192.168.12.1] (family 0, port 8080) Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50597) GET / HTTP/1.1 User-Agent: mpv 0.11.0-git-f8c5743 Accept: */* Range: bytes=0- Connection: close Host: 192.168.12.1:8080 Icy-MetaData: 1 Connection closed, listening again.
mpv はユーザエージェントの切り替えに対応。
>mpv.com --no-ytdl --user-agent "hoge" --network-timeout 10 http://192.168.12.1:8080/ Playing: http://192.168.12.1:8080/ Failed to open http://192.168.12.1:8080/. Exiting... (Errors when loading file)
この場合以下のリクエストが送られる。
$ nc.openbsd -vv -k -l 192.168.12.1 8080; Listening on [192.168.12.1] (family 0, port 8080) Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50635) GET / HTTP/1.1 User-Agent: hoge Accept: */* Range: bytes=0- Connection: close Host: 192.168.12.1:8080 Icy-MetaData: 1 Connection closed, listening again.
mpv + youtube-dl
mpvとyoutube-dlを組み合わせて使う
>mpv.com --ytdl --ytdl-raw-options=socket-timeout=10 --network-timeout 10 http://192.168.12.1:8080/ Playing: http://192.168.12.1:8080/ [ytdl_hook] ERROR: Unable to download webpage: timed out (caused by timeout('timed out',)) [ytdl_hook] youtube-dl failed, trying to play URL directly ... Failed to open http://192.168.12.1:8080/. Exiting... (Errors when loading file)
この場合以下のリクエストが送られる。
$ nc.openbsd -vv -k -l 192.168.12.1 8080; Listening on [192.168.12.1] (family 0, port 8080) Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50655) HEAD / HTTP/1.1 Host: 192.168.12.1:8080 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/44.0 (Chrome) Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: close Connection closed, listening again. Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50656) GET / HTTP/1.1 Host: 192.168.12.1:8080 Accept-Language: en-us,en;q=0.5 Accept-Encoding: * Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/44.0 (Chrome) Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: close Connection closed, listening again. Connection from [192.168.12.2] port 8080 [tcp/http-alt] accepted (family 2, sport 50657) GET / HTTP/1.1 User-Agent: mpv 0.11.0-git-f8c5743 Accept: */* Range: bytes=0- Connection: close Host: 192.168.12.1:8080 Icy-MetaData: 1 Connection closed, listening again.