[MPlayer-users] Playing WMV over HTTP fails when Proxy is used

Robert Huitl mplayer-users at huitl.de
Sat Feb 18 20:08:31 CET 2006


Hello,

I use MPlayer through KMPlayer, which sets the http_proxy environment variable 
depending on my Desktop's proxy settings. These are set to a host running 
Privoxy.

When the proxy is used, MPlayer fails to play the movie, because the proxy 
server answers something like "400 - Bad Request". This is caused by the 
"Host: server:0" line (see below), where the port number is set to 0.

I tried to fix that with the attached patch, and the bad-request-error is 
gone. But still the video is not played, MPlayer does nothing and finally 
quits with "end of file" after some seconds:

$ http_proxy="http://homebase:8118" mplayer 
http://media.skoopy.com/vids/vid_00965.wmv
MPlayer 1.0pre7try2-3.3.6 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino (Family: 6,  
Stepping: 2)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
3DNowExt supported but disabled
CPUflags:  MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with the following extensions: MMX 3DNow SSE
85 audio- & 196 video codecs
Playing http://media.skoopy.com/vids/vid_00965.wmv
Resolving homebase.home for AF_INET...
Connecting to server homebase.home[192.168.0.2]:8118 ...
Resolving homebase.home for AF_INET...
Connecting to server homebase.home[192.168.0.2]:8118 ...
Connected to server: media.skoopy.com
=====> ASF Redirector
Leaving... (reached end-of-file.)


Also, I'm wondering why the User-Agent reported by MPlayer is different 
depending on whether a proxy is used. That line "ASF Redirector" is not 
printed when no proxy is used. There seems to be some special handling for 
ASF in MPlayer, which is triggered by setting a proxy server.

These are the HTTP requests that MPlayer sends out:

MPlayer, without Proxy:
=======================
GET /vids/vid_00965.wmv HTTP/1.0
Host: media.skoopy.com
User-Agent: MPlayer/1.0pre7try2-3.3.6
Connection: close
 
 
MPlayer, with Proxy (http_proxy="http://proxy:8118" mplayer url):
=================================================================
GET http://media.skoopy.com/vids/vid_00965.wmv HTTP/1.0
Accept: */*
User-Agent: NSPlayer/4.1.0.3856
Host: media.skoopy.com:0
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


Regards,
 Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-http-header-host-field.patch
Type: text/x-diff
Size: 596 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20060218/f94c1184/attachment.patch>


More information about the MPlayer-users mailing list