Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4808 closed defect (fixed)

HLS live stream don't use new cookies on future requests

Reported by: Lucas Mindêllo Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: m3u8 hls
Cc: lucas@mindello.com.br Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:
When I try to play a HLS live stream, the setcookie is used on the http response and that cookie isn't set for the future requests.

After 5 minutes the response get error 403.

Here is a HTTP sniffer result:

GET /dvr/m/off24ha/master-playlist.m3u8?h=0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d HTTP/1.1
Range: bytes=0-
User-Agent: Kodi/14.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/14.1-Git:20150129-38e4046
Host: live.hls.globo.com
Accept: */*
Cookie: locksession=
Accept-Charset: UTF-8,*;q=0.8

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Aug 2015 01:19:39 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 573
Connection: keep-alive
Set-Cookie: vssession=cR_S3dMoZipzPbX8eNy0Qw14404658790059058404/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; Expires=Tue, 25 Aug 2015 01:24:39 GMT; Path=/dvr/m/off24ha/;
Vary: Accept-Encoding
Expires: Tue, 25 Aug 2015 01:19:41 GMT
Cache-Control: private, max-age=0, no-cache
Set-Cookie: locksession=8171fe6881c99d4d95b53cd0dcf3acd9; Path=/; Max-Age=300

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=264000
off24ha_264/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=464000
off24ha_464/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=750000
off24ha_750/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1264000
off24ha_1264/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1864000
off24ha_1864/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2564000
off24ha_2564/playlist.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000,CODECS="mp4a.40.2"
off24ha_264/playlist-audio.m3u8

GET /dvr/m/off24ha/off24ha_2564/playlist.m3u8 HTTP/1.1
User-Agent: Kodi/14.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/14.1-Git:20150129-38e4046
Accept: */*
Connection: close
Host: live.hls.globo.com
Cookie: locksession=8171fe6881c99d4d95b53cd0dcf3acd9; vssession=cR_S3dMoZipzPbX8eNy0Qw14404658790059058404/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; locksession=8171fe6881c99d4d95b53cd0dcf3acd9
Icy-MetaData: 1

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Aug 2015 01:23:03 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 750
Connection: close
Set-Cookie: vssession=UPDcUGHKJXpc7LOg8kGzuQ14404660821688619614/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; Expires=Tue, 25 Aug 2015 01:28:02 GMT; Path=/dvr/m/off24ha/;
Vary: Accept-Encoding
Expires: Tue, 25 Aug 2015 01:23:05 GMT
Cache-Control: private, max-age=0, no-cache
Set-Cookie: locksession=8171fe6881c99d4d95b53cd0dcf3acd9; Path=/; Max-Age=300

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:171228
#EXTINF:5.0000,
off24ha_2564-1440465725-148687275600.ts
#EXTINF:5.0000,
off24ha_2564-1440465730-148687725600.ts
#EXTINF:5.0000,
off24ha_2564-1440465735-148688175600.ts
#EXTINF:5.0000,
off24ha_2564-1440465740-148688625600.ts
#EXTINF:5.0000,
off24ha_2564-1440465745-148689075600.ts
#EXTINF:5.0000,
off24ha_2564-1440465750-148689525600.ts
#EXTINF:5.0000,
off24ha_2564-1440465755-148689975600.ts
#EXTINF:5.0000,
off24ha_2564-1440465760-148690425600.ts
#EXTINF:5.0000,
off24ha_2564-1440465765-148690875600.ts
#EXTINF:5.0000,
off24ha_2564-1440465770-148691325600.ts
#EXTINF:5.0000,
off24ha_2564-1440465775-148691775600.ts
#EXTINF:5.0000,
off24ha_2564-1440465780-148692225600.ts


GET /dvr/m/off24ha/off24ha_2564/off24ha_2564-1440465730-148687725600.ts HTTP/1.1
User-Agent: Kodi/14.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/14.1-Git:20150129-38e4046
Accept: */*
Connection: close
Host: live.hls.globo.com
Cookie: locksession=8171fe6881c99d4d95b53cd0dcf3acd9; vssession=cR_S3dMoZipzPbX8eNy0Qw14404658790059058404/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; locksession=8171fe6881c99d4d95b53cd0dcf3acd9
Icy-MetaData: 1

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Aug 2015 01:23:03 GMT
Content-Type: video/MP2T
Content-Length: 1690308
Connection: close
Set-Cookie: vssession=Psd_ZJE9VB33-uVq-64xew14404660830665574113/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; Expires=Tue, 25 Aug 2015 01:28:03 GMT; Path=/dvr/m/off24ha/;
Expires: Tue, 25 Aug 2015 01:23:02 GMT
Cache-Control: no-cache


GET /dvr/m/off24ha/off24ha_2564/off24ha_2564-1440465735-148688175600.ts HTTP/1.1
User-Agent: Kodi/14.1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/14.1-Git:20150129-38e4046
Accept: */*
Connection: close
Host: live.hls.globo.com
Cookie: locksession=8171fe6881c99d4d95b53cd0dcf3acd9; vssession=cR_S3dMoZipzPbX8eNy0Qw14404658790059058404/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; locksession=8171fe6881c99d4d95b53cd0dcf3acd9
Icy-MetaData: 1

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Aug 2015 01:23:08 GMT
Content-Type: video/MP2T
Content-Length: 1570740
Connection: close
Set-Cookie: vssession=DyJ7qHEcnvYHlzSindzYew14404660881076012996/dvr/m/off24ha/?0411440465697761939438414404691735864119652h6rN-AOOhXZcPlp2UCV8Fg|F|52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d; Expires=Tue, 25 Aug 2015 01:28:08 GMT; Path=/dvr/m/off24ha/;
Expires: Tue, 25 Aug 2015 01:23:07 GMT
Cache-Control: no-cache

I think that the cookie needs to be reset on every response on hls.c at open_input function. But as I'm a shitty C coder, I won't send a PR.

How to reproduce:
Open a HLS stream that setcookie on every .m3u8 and .ts responses

Change History (15)

comment:1 by Lucas Mindêllo, 9 years ago

Cc: lucas@mindello.com.br added

comment:2 by Carl Eugen Hoyos, 9 years ago

Keywords: playlist removed

Please provide the command line that allows to reproduce your issue together with the complete, uncut console output to make this a valid ticket.

comment:3 by Lucas Mindêllo, 9 years ago

You won't be able to reproduce cause it needs multi-step http authentication before running the command line. It would need a dummy server just to reproduce the issue. Anyway, you can check by the http content that the cookie vssession wasn't updated after the first request.

in reply to:  3 comment:4 by Carl Eugen Hoyos, 9 years ago

Replying to lucas.rokam:

You won't be able to reproduce

One more reason that you post the failing command line including the complete, uncut console output.
(I often do it if the OP is unable to.)

comment:5 by Lucas Mindêllo, 9 years ago

Can I help with something else? If I do enable debug, the log doesn't show anything useful except the requests URL.

ffmpeg.exe -i "http://live.hls.globo.com/dvr/spo124ha/master-playlist.m3u8?h=04114406479503526375649144065142943648254570-rlyt_cD5vyWHmEHzz3-Q&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d" -headers "Cookie: WMPTOKEN_52dfc02cdd23810590000f57=173846766e9c8c8dc4c4121176fb2c6c" -c copy "teste.ts"
ffmpeg version N-74645-g4c39892 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 37.100 /  5. 37.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[http @ 0000000004ec0840] No trailing CRLF found in HTTP header.
[aac @ 0000000004f7bd20] element type mismatch 1 != 0
[h264 @ 0000000004ea2d40] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 0000000004ee14e0] No trailing CRLF found in HTTP header.
[aac @ 00000000054d9280] element type mismatch 1 != 0
[h264 @ 0000000004f7ea60] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.
[aac @ 0000000005c08080] element type mismatch 1 != 0
[h264 @ 0000000005c076c0] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 00000000055fa6c0] No trailing CRLF found in HTTP header.
[aac @ 00000000055f9c40] element type mismatch 1 != 0
[h264 @ 00000000055f9460] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 00000000056b6c00] No trailing CRLF found in HTTP header.
[aac @ 00000000054d64c0] element type mismatch 1 != 0
[h264 @ 00000000054d5b20] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[aac @ 00000000054d3e40] element type mismatch 1 != 0
[h264 @ 00000000054d6e60] non-existing SPS 0 referenced in buffering period
    Last message repeated 1 times
[http @ 00000000077404e0] No trailing CRLF found in HTTP header.
[aac @ 00000000054d4320] element type mismatch 1 != 0
[aac @ 0000000005c2e760] element type mismatch 1 != 0
[aac @ 00000000054d7340] element type mismatch 1 != 0
[aac @ 00000000055b25a0] element type mismatch 1 != 0
[aac @ 00000000054d5660] element type mismatch 1 != 0
[aac @ 00000000054d6000] element type mismatch 1 != 0
[aac @ 0000000005cefa60] element type mismatch 1 != 0
[aac @ 0000000005c08840] element type mismatch 1 != 0
[h264 @ 0000000005c2d920] non-existing SPS 0 referenced in buffering period
[h264 @ 0000000005cd3f80] non-existing SPS 0 referenced in buffering period
[h264 @ 00000000054d69a0] non-existing SPS 0 referenced in buffering period
[h264 @ 00000000054d3980] non-existing SPS 0 referenced in buffering period
[h264 @ 0000000005ce5cc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0000000005e20580] non-existing SPS 0 referenced in buffering period
Input #0, hls,applehttp, from 'http://live.hls.globo.com/dvr/spo124ha/master-playlist.m3u8?h=04114406479503526375649144065142943648254570-rlyt_cD5vyWHmEHzz3-Q&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d':
  Duration: N/A, start: 20345.860911, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 264000
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 15 fps, 15 tbr, 90k tbn, 30 tbc
    Metadata:
      variant_bitrate : 264000
    Stream #0:1: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 63 kb/s
    Metadata:
      variant_bitrate : 264000
  Program 1
    Metadata:
      variant_bitrate : 464000
    Stream #0:2: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 15 fps, 15 tbr, 90k tbn, 30 tbc
    Metadata:
      variant_bitrate : 464000
    Stream #0:3: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 63 kb/s
    Metadata:
      variant_bitrate : 464000
  Program 2
    Metadata:
      variant_bitrate : 750000
    Stream #0:4: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 750000
    Stream #0:5: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      variant_bitrate : 750000
  Program 3
    Metadata:
      variant_bitrate : 1264000
    Stream #0:6: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 1264000
    Stream #0:7: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      variant_bitrate : 1264000
  Program 4
    Metadata:
      variant_bitrate : 1864000
    Stream #0:8: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 1864000
    Stream #0:9: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      variant_bitrate : 1864000
  Program 5
    Metadata:
      variant_bitrate : 2564000
    Stream #0:10: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 2564000
    Stream #0:11: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      variant_bitrate : 2564000
  Program 6
    Metadata:
      variant_bitrate : 64000
    Stream #0:12: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 66 kb/s
    Metadata:
      variant_bitrate : 64000
File 'teste.ts' already exists. Overwrite ? [y/N] y
Output #0, mpegts, to 'teste.ts':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 2564000
    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 63 kb/s
    Metadata:
      variant_bitrate : 264000
Stream mapping:
  Stream #0:10 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[hls,applehttp @ 0000000004e99420] No longer receiving playlist 1
[hls,applehttp @ 0000000004e99420] No longer receiving playlist 2
[hls,applehttp @ 0000000004e99420] No longer receiving playlist 3
[hls,applehttp @ 0000000004e99420] No longer receiving playlist 4
[hls,applehttp @ 0000000004e99420] No longer receiving playlist 6
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2934.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2775.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2793.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.4kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2790.6kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2793.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2785.2kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2784.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2786.7kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2788.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2795.4kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2792.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2791.9kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2799.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2796.7kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2795.4kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2797.3kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2802.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2796.8kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2804.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2806.3kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2808.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2801.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2795.3kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2794.0kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2783.3kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2784.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2785.4kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2780.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2780.7kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2782.7kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2783.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2785.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2785.1kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2791.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2788.9kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.0kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2785.4kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2786.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2790.3kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2788.7kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2787.7kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2793.3kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2792.4kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2796.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2795.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2795.5kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2792.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2790.7kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2791.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2791.1kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2793.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2791.8kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2794.0kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2796.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.7kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2797.3kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.3kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2797.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2793.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2787.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2788.0kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2789.6kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2788.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2788.6kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.7kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.4kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2790.1kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.1kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2791.0kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.0kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2789.5kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2792.6kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2791.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2790.8kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.5kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2789.6kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.9kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.ate=2789.7kbits/s
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2789.8kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 0000000005ceff00] No trailing CRLF found in HTTP header.ate=2790.2kbits/s
[http @ 0000000004f7ef00] No trailing CRLF found in HTTP header.
[http @ 00000000085fcf20] HTTP error 403 Forbidden:05:09.33 bitrate=2793.3kbits/s
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden:05:10.01 bitrate=2792.3kbits/s
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 5
[http @ 0000000007976f20] HTTP error 403 Forbidden:05:10.01 bitrate=2792.3kbits/s
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 0
[http @ 0000000007976f20] HTTP error 403 Forbidden
[hls,applehttp @ 0000000004e99420] Failed to reload playlist 5
frame= 9300 fps= 31 q=-1.0 Lsize=  105688kB time=00:05:10.01 bitrate=2792.7kbits/s
video:94550kB audio:2423kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.986708%

comment:6 by Carl Eugen Hoyos, 9 years ago

Status: newopen
Version: unspecifiedgit-master

comment:7 by Carl Eugen Hoyos, 9 years ago

Please test if this issue is a regression since da7759b3

comment:8 by Lucas Mindêllo, 9 years ago

How can I test it?

comment:9 by Carl Eugen Hoyos, 9 years ago

By testing FFmpeg versions da7759b3 and cc1162d7

comment:10 by Lucas Mindêllo, 9 years ago

With da7759b3 I can't send the cookie in the command line at all. It doesn't matter.

ffmpeg_da7759b3.exe -loglevel verbose -i "http://live.hls.globo.com/dvr/off24ha/master-playlist.m3u8?h=0411442891217912335161314428946923777029123A2Mm6u-p63_r3AR4Ji3mlg&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d" -headers "Cookie: WMPTOKEN_52dfc02cdd23810590000f57=173846766e9c8c8dc4c4121176fb2c6c" -c copy "teste.ts"
ffmpeg version N-62196-gda7759b Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 21 2015 23:52:30 with gcc 5.2.0 (GCC)
  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/xbmc/ffmpeg_sources/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --disable-w32threads --enable-gpl --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-decklink --extra-libs=-loleaut32 --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libgme --enable-dxva2 --enable-avisynth --enable-gray --extra-libs=-lpsapi --extra-cflags= --enable-static --disable-shared --prefix=/home/xbmc/ffmpeg_sources/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-runtime-cpudetect
  libavutil      52. 74.100 / 52. 74.100
  libavcodec     55. 57.101 / 55. 57.101
  libavformat    55. 36.101 / 55. 36.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[http @ 04ac6880] HTTP error 403 Forbidden
http://live.hls.globo.com/dvr/off24ha/master-playlist.m3u8?h=0411442891217912335161314428946923777029123A2Mm6u-p63_r3AR4Ji3mlg&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d: Input/output error

When I check the Wireshark, the cookie "WMPTOKEN_52dfc02cdd23810590000f57=173846766e9c8c8dc4c4121176fb2c6c" isn't sent.

GET /dvr/off24ha/master-playlist.m3u8?h=0411442891217912335161314428946923777029123A2Mm6u-p63_r3AR4Ji3mlg&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d HTTP/1.1
User-Agent: Lavf/55.36.101
Accept: */*
Range: bytes=0-
Connection: close
Host: live.hls.globo.com

HTTP/1.1 403 Forbidden
Server: nginx
Date: Tue, 22 Sep 2015 03:13:10 GMT
Content-Type: text/plain
Content-Length: 0
Connection: close

comment:11 by Lucas Mindêllo, 9 years ago

Maybe I've failed to compile. I'm not a developer, just a user with little knowledge. Can you please help me?

comment:12 by Lucas Mindêllo, 9 years ago

I did fix it with my limited C knowledge. Patch sent to ffmpeg-devel

in reply to:  10 comment:13 by Carl Eugen Hoyos, 9 years ago

Replying to lucas.rokam:

With da7759b3 I can't send the cookie in the command line at all.

To test if this is a regression since da7759b3 (the console output of your first test makes this less likely), you would have to also test cc1162d7
Note that compilation with just --arch=x86 --target-os=mingw32 --cross-prefix=/home/xbmc/ffmpeg_sources/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- is simpler and takes less time.

comment:14 by Lucas Mindêllo, 9 years ago

cc1162d7 doesn't work too. My fix do the job... I was able to retrieve the data for 7 minutes.

ffmpeg_cc1162d7.exe -loglevel verbose -i "http://live.hls.globo.com/dvr/off24ha/master-playlist.m3u8?h=0411442921424640267477014429248989824107785bQjldbkA7NPYY8BiV-kGRw&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d" -headers "Cookie: WMPTOKEN_52dfc02cdd23810590000f57=173846766e9c8c8dc4c4121176fb2c6c" -c copy "teste.ts"
ffmpeg version N-62195-gcc1162d Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 22 2015 00:22:44 with gcc 5.2.0 (GCC)
  configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/xbmc/ffmpeg_sources/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --disable-w32threads --enable-gpl --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-decklink --extra-libs=-loleaut32 --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libgme --enable-dxva2 --enable-avisynth --enable-gray --extra-libs=-lpsapi --extra-cflags= --enable-static --disable-shared --prefix=/home/xbmc/ffmpeg_sources/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-runtime-cpudetect
  libavutil      52. 74.100 / 52. 74.100
  libavcodec     55. 57.101 / 55. 57.101
  libavformat    55. 36.101 / 55. 36.101
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[http @ 04d8e560] HTTP error 400 Bad Request
http://live.hls.globo.com/dvr/off24ha/master-playlist.m3u8?h=0411442921424640267477014429248989824107785bQjldbkA7NPYY8BiV-kGRw&k=html5&a=F&u=52dfc02cdd23810590000f57_605fd6ba-6320-4a5a-b10f-065e5363421d: Input/output error

comment:15 by Lucas Mindêllo, 9 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: openclosed
Last edited 9 years ago by Carl Eugen Hoyos (previous) (diff)
Note: See TracTickets for help on using tickets.