Opened 2 years ago

#2250 new defect

mplayer cannot handle redirects for HLS content

Reported by: sam_albuquerque Owned by: beastd
Priority: normal Component: undetermined
Version: unspecified Severity: blocker
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Summary of the bug:
2 Servers have been set. Server A only performs a HTTP 302 redirect to Server B which has the actual HLS content. There is no content on server A. When mplayer fetches the URL of A, it manages to detect the redirect and access the m3u8 file for the HLS stream from B. However, instead of using the final URL from Server B as the reference for the subsequent fetches of the sub stream playlists, it uses Server A as reference and tries to fetch the sub streams from server A instead and gets a HTTP 404 error.

This setup is playable on FFMpeg

How to reproduce:
Setup 2 servers as described in the summary.

Now try to play the stream:

% mplayer -v ffmpeg://http://172.16.27.1:19000/oatsService/redirect
MPlayer 20150721-4.9.3 (C) 2000-2015 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 13
CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz (Family: 6, Model: 58, Stepping: 9)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1 SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/sam/.mplayer/codecs.conf'
Reading optional codecs config file /home/sam/.mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /etc/mplayer/codecs.conf: No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/sam/.mplayer/fonts'
Configuration: --prefix=/usr --mandir=/usr/man --confdir=/etc/mplayer --enable-gui --enable-menu --enable-vdpau --disable-arts --disable-bitmap-font --codecsdir=/usr/lib64/codecs --language=en,de,es,fr --extra-cflags=-I/usr/include/openmj2-2.1/ --enable-runtime-cpudetection --disable-mp3lame --disable-mp3lame-lavc --disable-libopencore_amrnb --disable-libopencore_amrwb
CommandLine: '-v' 'ffmpeg://http://172.16.27.1:19000/oatsService/redirect'
Using nanosleep() timing
get_path('input.conf') -> '/home/sam/.mplayer/input.conf'
Reading optional input config file /home/sam/.mplayer/input.conf: No such file or directory
Reading optional input config file /etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('redirect.conf') -> '/home/sam/.mplayer/redirect.conf'

Playing ffmpeg://http://172.16.27.1:19000/oatsService/redirect.
get_path('sub/') -> '/home/sam/.mplayer/sub/'
libavformat version 56.36.100 (internal)
Configuration: --enable-gpl --enable-postproc
[ffmpeg] Opening http://172.16.27.1:19000/oatsService/redirect
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
[http @ 0x55c30adc4940]request: GET /oatsService/redirect HTTP/1.1
User-Agent: Lavf/56.36.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 172.16.27.1:19000
Icy-MetaData: 1


Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
[http @ 0x55c30adc4940]request: GET /media/test_media/QA%20Share/iPlayerHLS/Panorama_-_Hacking_Power_Corruption_and_Lies_b049ffld_default/playlist.m3u8 HTTP/1.1
User-Agent: Lavf/56.36.100
Accept: */*
Range: bytes=0-
Connection: close
Host: zorro.oregan
Icy-MetaData: 1


STREAM: [ffmpeg] ffmpeg://http://172.16.27.1:19000/oatsService/redirect
STREAM: Description: FFmpeg
STREAM: Author: 
STREAM: Comment: 
LAVF_check: Apple HTTP Live Streaming
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename ffmpeg://http://172.16.27.1:19000/oatsService/redirect ext: .1:19000/oatsService/redirect
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 69
Checking for PVA
Checking for MPEG-TS...
COULDN'T READ ENOUGH DATA, EXITING TS_CHECK
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
[http @ 0x55c30adc4940]request: GET /media/test_media/QA%20Share/iPlayerHLS/Panorama_-_Hacking_Power_Corruption_and_Lies_b049ffld_default/playlist.m3u8 HTTP/1.1
User-Agent: Lavf/56.36.100
Accept: */*
Range: bytes=0-
Connection: close
Host: zorro.oregan
Icy-MetaData: 1


Checking for LMLM4 Stream Format
LMLM4 Stream Format not found
MPEG Stream reached EOF
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
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?)
ds_fill_buffer: EOF reached (stream: video)  
LAVF_check: Apple HTTP Live Streaming
libavformat file format detected.
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
[http @ 0x55c30adc4940]request: GET /oatsService/bitrate_4096k/playlist_4096.m3u8 HTTP/1.1
User-Agent: Lavf/56.36.100
Accept: */*
Connection: close
Host: 172.16.27.1:19000
Icy-MetaData: 1


[http @ 0x55c30adc4940]HTTP error 400 Bad Request
LAVF_header: av_open_input_stream() failed
demux_aac_probe, failed to detect an AAC stream

[AVIOContext @ 0x55c30ae0c5c0]Statistics: 886 bytes read, 1 seeks
vo: x11 uninit called but X11 not initialized..

Exiting... (End of file

Change History (0)

Note: See TracTickets for help on using tickets.