Opened 12 years ago

Closed 12 years ago

#1638 closed defect (fixed)

HTTP Cookies support is broken on Windows?

Reported by: happy.neko@… Owned by: r_togni@…
Priority: normal Component: streaming
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

I'm trying to stream videos from gametrailers.com.
This site requires authentication to download files so I pass login/password information in cookies.txt file (Mozilla format). With windows build of mplayer (MPlayer Sherpya-SVN-r30369-4.2.5) on Windows 7 I can't play files. I think mplayer does not provide cookies in HTTP secession and because of that receives "You must be logged in to download movies." instead of media stream. Same message you get when try to access "http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv" in browser without login cookies.

With Linux build (MPlayer SVN-r30302-4.4.1) streaming works perfectly with same cookies.txt. I also tried to convert cookies.txt from Win to UNIX line breaks with the same result. Below are logs from Windows and Linux:

Windows:

mplayer.exe "http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv" -cookies -cookies-file "h:\cookies.txt" -v

MPlayer Sherpya-SVN-r30369-4.2.5 (C) 2000-2009 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 10
CPU: Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz (Family: 6, Model: 15, Stepping: 6)
extended cpuid-level: 8
extended cache-info: 134242368
Detected cache-line size is 64 bytes
Testing OS support for SSE... yes.
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> 'D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/codecs.
conf'
Reading D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/codecs.conf: Can't open 'D:
/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/codecs.conf': No such file or directo
ry
Reading /mingw/etc/mplayer/codecs.conf: Can't open '/mingw/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --extra-cflags=-I/c/Work/mplayer/live --prefix=/mingw --enable-static --enable-md5sum --enable-menu --dis
able-vdpau --disable-vidix --enable-sdl --enable-caca --enable-gl --enable-freetype --enable-png --enable-mng --enable-j
peg --enable-gif --enable-tga --enable-mad --enable-tv --enable-theora --disable-dvb --disable-dvbhead --disable-inet6 -
-enable-runtime-cpudetection
CommandLine: 'http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv' '-cookies' '-cookies-file' 'h:
\cookies.txt' '-v'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> 'D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/fonts'
Using Windows native timing
get_path('input.conf') -> 'D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/input.co
nf'
Parsing input config file D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/input.con
f
Input config file D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/input.conf parsed
: 89 binds
get_path('t_bioshock2_officialseunbox.flv.conf') -> 'D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps
3ms/win32/mplayer/t_bioshock2_officialseunbox.flv.conf'

Playing http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv.
get_path('sub/') -> 'D:/Install/Encoding & Working with AV/Video/PS3 Media Server/svn/ps3ms/win32/mplayer/sub/'
WINSOCK2 init: 0
Filename for url is now http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
Filename for url is now http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
STREAM_HTTP(1), URL: http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
Loading cookie file: h:\cookies.txt
Loading cookie file: h:\cookies.txt
Read is behaving funny.Resolving www.gametrailers.com for AF_INET...
Connecting to server www.gametrailers.com[193.219.28.102]: 80...
--- HTTP DEBUG HEADER --- START ---
protocol: [HTTP/1.0]
http minor version: [0]
uri: [(NULL)]
method: [(NULL)]
status code: [200]
reason phrase: [OK]
body size: [41]
Fields:

0 - Server: Apache/2.0.63 (Unix) PHP/5.2.8
1 - X-Powered-By: PHP/5.2.8
2 - Content-Length: 41
3 - Content-Type: text/html
4 - Expires: Wed, 03 Feb 2010 06:08:59 GMT
5 - Cache-Control: max-age=0, no-cache, no-store
6 - Pragma: no-cache
7 - Date: Wed, 03 Feb 2010 06:08:59 GMT
8 - Connection: close
9 - Set-Cookie: gtsid_vgs=1265177339873680192509321974; expires=Thu, 04-Feb-2010 05:00:00 GMT; path=/; domain=.gametrai

lers.com

10 - Set-Cookie: prefvars_compact=a%3A4%3A%7Bs%3A11%3A%22watchedmovs%22%3Bs%3A0%3A%22%22%3Bs%3A13%3A%22playlist_page%22

%3Bs%3A0%3A%22%22%3Bs%3A11%3A%22movplaylist%22%3Bs%3A0%3A%22%22%3Bs%3A10%3A%22umplaylist%22%3Bs%3A0%3A%22%22%3B%7D; expi
res=Sun, 14-Feb-2010 19:55:38 GMT; path=/; domain=.gametrailers.com

11 - Set-Cookie: akanocache=1; expires=Sun, 14-Feb-2010 19:55:38 GMT; path=/; domain=.gametrailers.com
12 - Set-Cookie: akanocache=0; expires=Fri, 22-Jan-2010 16:22:20 GMT; path=/; domain=.gametrailers.com

--- HTTP DEBUG HEADER --- END ---
Content-Type: [text/html]
Content-Length: [41]
Cache size set to 320 KBytes
STREAM: [null] http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
STREAM: Description: http streaming
STREAM: Author: Bertrand, Albeau, Reimar Doeffinger, Arpi?
STREAM: Comment: plain http
CACHE_PRE_INIT: 0 [0] 0 pre:65536 eof:0
Cache fill: 0.01% (41 bytes)
LAVF_check: no clue about this gibberish!
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv ext: .flv

Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 111
AVS: avs_check_file - attempting to open file http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv

AVS: Avisynth error: Import: couldn't open "D:\Install\Encoding & Working with AV\Video\PS3 Media Server\svn\ps3ms\win32
\http:\www.gametrailers.com\download\61500\t_bioshock2_officialseunbox.flv"
AVS: Init failed
Checking for PVA
Checking for MPEG-TS...
THIS DOESN'T LOOK LIKE AN MPEG-TS FILE!
TRIED UP TO POSITION 0, FOUND ffffff00, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=22895 size=1836413804
LMLM4 Stream Format not found
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 0 p101: 0 p1B6: 0 p12x: 0 sli: 0 a: 0 b: 0 c: 0 idr: 0 sps: 0 pps: 0 PES: 0 MP3: 0, synced: 0

Not MPEG System Stream format... (maybe Transport Stream?)
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 0 p101: 0 p1B6: 0 p12x: 0 sli: 0 a: 0 b: 0 c: 0 idr: 0 sps: 0 pps: 0 PES: 0 MP3: 0, synced: 3

Not MPEG System Stream format... (maybe Transport Stream?)
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFFFFFFFFF !
ds_fill_buffer: EOF reached (stream: video)
LAVF_check: no clue about this gibberish!
demux_aac_probe, failed to detect an AAC stream

WINSOCK2 uninit

Exiting... (End of file)

Linux:

$mplayer "http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv" -cookies -cookies-file "/home/username/src/pms-linux-1.10.5/cookies.txt" -v

MPlayer SVN-r30302-4.4.1 (C) 2000-2009 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 10
CPU: Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz (Family: 6, Model: 15, Stepping: 6)
extended cpuid-level: 8
extended cache-info: 134242368
Detected cache-line size is 64 bytes
Testing OS support for SSE... yes.
Tests of OS support for SSE passed.
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/username/.mplayer/codecs.conf'
Reading /home/username/.mplayer/codecs.conf: Can't open '/home/username/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --confdir=/etc/mplayer --enable-gui
CommandLine: 'http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv' '-v'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/username/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/username/.mplayer/input.conf'
Can't open input config file /home/username/.mplayer/input.conf: No such file or directory
Can't open input config file /etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
get_path('t_bioshock2_officialseunbox.flv.conf') -> '/home/username/.mplayer/t_bioshock2_officialseunbox.flv.conf'

Playing http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv.
get_path('sub/') -> '/home/username/.mplayer/sub/'
Filename for url is now http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
Filename for url is now http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
STREAM_HTTP(1), URL: http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
Loading cookie file: /home/username/src/pms-linux-1.10.5/cookies.txt
Loading cookie file: /home/username/src/pms-linux-1.10.5/cookies.txt
Resolving www.gametrailers.com for AF_INET6...
Couldn't resolve name for AF_INET6: www.gametrailers.com
Resolving www.gametrailers.com for AF_INET...
Connecting to server www.gametrailers.com[193.219.28.102]: 80...
--- HTTP DEBUG HEADER --- START ---
protocol: [HTTP/1.0]
http minor version: [0]
uri: [(null)]
method: [(null)]
status code: [302]
reason phrase: [Moved Temporarily]
body size: [0]
Fields:

0 - Server: Apache/2.0.63 (Unix) PHP/5.2.8
1 - X-Powered-By: PHP/5.2.8
2 - Content-Disposition: attachment; filename="t_bioshock2_officialseunbox.flv"
3 - Location: http://trailers-ak.gametrailers.com/gt_vault/10456/t_bioshock2_officialseunbox.flv
4 - Content-Length: 0
5 - Content-Type: application/octet-stream
6 - Expires: Wed, 03 Feb 2010 05:15:56 GMT
7 - Cache-Control: max-age=0, no-cache, no-store
8 - Pragma: no-cache
9 - Date: Wed, 03 Feb 2010 05:15:56 GMT
10 - Connection: close
11 - Set-Cookie: gtsid_vgs=1265174156190727817015737009; expires=Thu, 04-Feb-2010 05:00:00 GMT; path=/; domain=.gametrailers.com
12 - Set-Cookie: prefvars_compact=a%3A4%3A%7Bs%3A11%3A%22watchedmovs%22%3Bs%3A0%3A%22%22%3Bs%3A13%3A%22playlist_page%22%3Bs%3A0%3A%22%22%3Bs%3A11%3A%22movplaylist%22%3Bs%3A0%3A%22%22%3Bs%3A10%3A%22umplaylist%22%3Bs%3A0%3A%22%22%3B%7D; expires=Sun, 14-Feb-2010 19:02:35 GMT; path=/; domain=.gametrailers.com
13 - Set-Cookie: akanocache=1; expires=Sun, 14-Feb-2010 19:02:35 GMT; path=/; domain=.gametrailers.com
14 - Set-Cookie: akanocache=1; expires=Sun, 14-Feb-2010 19:02:35 GMT; path=/; domain=.gametrailers.com

--- HTTP DEBUG HEADER --- END ---
Filename for url is now http://trailers-ak.gametrailers.com/gt_vault/10456/t_bioshock2_officialseunbox.flv
Resolving trailers-ak.gametrailers.com for AF_INET6...
Couldn't resolve name for AF_INET6: trailers-ak.gametrailers.com
Resolving trailers-ak.gametrailers.com for AF_INET...
Connecting to server trailers-ak.gametrailers.com[193.219.28.112]: 80...
--- HTTP DEBUG HEADER --- START ---
protocol: [HTTP/1.0]
http minor version: [0]
uri: [(null)]
method: [(null)]
status code: [200]
reason phrase: [OK]
body size: [1102]
Fields:

0 - Server: Apache/2.0.63 (Unix) PHP/5.2.8
1 - Last-Modified: Tue, 02 Feb 2010 21:32:58 GMT
2 - ETag: "b5ce7c-22e25e4-47ea4d8731680"
3 - Accept-Ranges: bytes
4 - Content-Length: 36578788
5 - Content-Type: video/x-flv
6 - Cache-Control: max-age=2592000
7 - Expires: Fri, 05 Mar 2010 05:15:56 GMT
8 - Date: Wed, 03 Feb 2010 05:15:56 GMT
9 - Connection: close

--- HTTP DEBUG HEADER --- END ---
Content-Type: [video/x-flv]
Content-Length: [36578788]
Cache size set to 320 KBytes
STREAM: [null] http://www.gametrailers.com/download/61500/t_bioshock2_officialseunbox.flv
STREAM: Description: http streaming
STREAM: Author: Bertrand, Albeau, Reimar Doeffinger, Arpi?
STREAM: Comment: plain http
CACHE_PRE_INIT: 0 [0] 0 pre:65536 eof:0
Cache fill: 0.00% (0 bytes)
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xa34c0e0]max_analyze_duration reached
==> Found video stream: 0
[lavf] Video stream found, -vid 0
======= VIDEO Format ======

biSize 89
biWidth 480
biHeight 360
biPlanes 0
biBitCount 24
biCompression 875967048='H264'
biSizeImage 518400

Unknown extra header dump: [1] [4d] [40] [16] [ff] [e1] [0] [22] [67] [4d] [40] [16] [96] [73] [83] [c1] [7f] [cb] [80] [a0] [40] [0] [2] [ee] [c0] [0] [af] [c8] [d] [18] [1] [e8] [80] [4] [c4] [d7] [bd] [f0] [78] [44] [22] [8f] [1] [0] [4] [68] [de] [3c] [80]
===========================
==> Found audio stream: 1
[lavf] Audio stream found, -aid 1
======= WAVE Format =======
Format Tag: 20557 (0x504D)
Channels: 2
Samplerate: 44100
avg byte/sec: 16002
Block align: 1
bits/sample: 16
cbSize: 5
Unknown extra header dump: [12] [10] [56] [e5] [0]
==========================================================================
LAVF: 1 audio and 1 video streams found
LAVF: build 3419648
VIDEO: [H264] 480x360 24bpp 29.970 fps 992.8 kbps (121.2 kbyte/s)
[V] filefmt:35 fourcc:0x34363248 size:480x360 fps:29.970 ftime:=0.0334
Clip info:

major_brand: mp42
minor_version: 1
compatible_brands: isommp41avc1

get_path('sub/') -> '/home/username/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1680x1050 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
Disabling DPMS
DPMSDisable stat: 1
[VO_XV] Using Xv Adapter #0 (ATI Radeon AVIVO Video)
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 4096x4096
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
dec_audio: Allocating 6144 bytes for input buffer.
dec_audio: Allocating 65536 + 65536 = 131072 bytes for output buffer.
FAAD: Decoder init done (0Bytes)!
FAAD: Negotiated samplerate: 44100Hz channels: 2
FAAD: got 128kbit/s bitrate from MP4 header!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16002->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying every known audio driver...
ao2: 44100 Hz 2 chans s16le
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags: 16/16 (4096 bytes/frag) free: 65536
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 65536
[h264 @ 0x8a5dca0]no picture
[ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 480 x 360 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 2)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (480x360->480x360,flags=0,'MPlayer',0x32315659)
VO: [xv] 480x360 => 480x360 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@…> and others
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
using Xvideo port 131 for hw scaling
* [vo] Exporting mp_image_t, 480x360x12bpp YUV planar, 259200 bytes
Unicode font: 5025 glyphs.
Unicode font: 5025 glyphs.
Uninit audio filters... 0.000 ct: 0.023 0/ 0 4% 0% 0.4% 1 0 1%
[libaf] Removing filter dummy
Uninit audio: faad
FAAD: Closing decoder!
Uninit video: ffmpeg
Successfully enabled DPMS
vo: uninit ...

Exiting... (Quit)

Change History (1)

comment:1 by reimar, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in SVN r30496.
It was broken on all systems where SEEK_SET != 0 (due to arguments being in the wrong order).

Note: See TracTickets for help on using tickets.