[FFmpeg-trac] #5358(undetermined:new): ffmpeg doesn't respect user-agent option when requesting EXT-X-MEDIA:TYPE=AUDIO
FFmpeg
trac at avcodec.org
Tue Mar 22 00:10:52 CET 2016
#5358: ffmpeg doesn't respect user-agent option when requesting
EXT-X-MEDIA:TYPE=AUDIO
-------------------------------------+-------------------------------------
Reporter: | Owner:
calvinharris | Status: new
Type: defect | Component:
Priority: normal | undetermined
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by calvinharris):
Command line:
{{{
ffmpeg -user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 "
-i http://localhost/master.m3u8 -loglevel debug
}}}
Complete output:
{{{
λ ffmpeg -user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 "
-i http://localhost/master.m3u8 -loglevel debug
ffmpeg version N-78964-g5061579 Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.3.0 (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-lib
--enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libo
-enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-
libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack
ble-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-
libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 28.100 / 57. 28.100
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.102 / 6. 39.102
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-user-agent' ... matched as AVOption 'user-agent' with
argument 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 '.
Reading option '-i' ... matched as input file with argument
'http://localhost/master.m3u8
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://localhost/master.m3u8.
Successfully parsed a group of options.
Opening an input file: http://localhost.m3u8.
[http @ 00000245bd9abf00] Setting default whitelist
'http,https,tls,rtp,tcp,udp,crypto'
[http @ 00000245bd9abf00] request: GET /master.m3u8 HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Accept: */*
Range: bytes=0-
Connection: close
Host: localhost
[hls,applehttp @ 00000245bd9aaee0] Format hls,applehttp probed with
size=2048 and score=100
[http @ 00000245bd9bee40] request: GET /playlist128k.m3u8 HTTP/1.1
User-Agent: Lavf/57.28.100
Accept: */*
Connection: close
Host: localhost
Icy-MetaData: 1
[http @ 00000245bd9bee40] HTTP error 403 Forbidden
[AVIOContext @ 00000245bd9ae220] Statistics: 6288 bytes read, 0 seeks
http://localhost/master.m3u8: Server returned 403 Forbidden (access
denied)
}}}
The log is misleading though, when checking wireshark, only the call to
playlist128k.m3u8 returns forbidden (because of user-agent).
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5358#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list