Opened 4 years ago
Closed 4 years ago
#8833 closed defect (invalid)
ffprobe doesn't properly follow redirect on remote url
Reported by: | azhelev | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Using ffprobe on remote URL fails when the remote server return 302 redirect to a long URL
- ffprobe <remote url>
- The remote server returns HTTP 302 Found. The Location header in the response contains a rather long URL
- ffprobe tries to follow the redirect, but cuts the URL from the location header and thus requests invalid URL
Full log:
ffprobe started on 2020-07-29 at 19:25:40 Report written to "ffprobe-20200729-192540.log" Log level: 99 Command line: ffprobe -v 9 -loglevel 99 -report "https://player.vimeo.com/play/1582631308?s=378487171_1596078044_379a55560ce10f38feff55c87ed111c8&loc=external&context=Vimeo%5CController%5CApi%5CResources%5CVideoController.&download=1&filename=Pr%25C3%25A1ctica%2Bmirar%2Bla%2Bimagen%2Binstant%25C3%25A1nea%2Ben%2Bla%2Bdistancia%2Bf%25C3%25A1cil%2By%2Bdif%25C3%25ADcil.174.mp4" ffprobe version N-98588-gcbb6ba2e86 Copyright (c) 2007-2020 the FFmpeg developers built with gcc 10.1.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3 libavutil 56. 57.100 / 56. 57.100 libavcodec 58. 97.102 / 58. 97.102 libavformat 58. 49.100 / 58. 49.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 [NULL @ 0x55edbe7aa1c0] Opening 'https://player.vimeo.com/play/1582631308?s=378487171_1596078044_379a55560ce10f38feff55c87ed111c8&loc=external&context=Vimeo%5CController%5CApi%5CResources%5CVideoController.&download=1&filename=Pr%25C3%25A1ctica%2Bmirar%2Bla%2Bimagen%2Binstant%25C3%25A1nea%2Ben%2Bla%2Bdistancia%2Bf%25C3%25A1cil%2By%2Bdif%25C3%25ADcil.174.mp4' for reading [https @ 0x55edbe7aadc0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy' [tcp @ 0x55edbe7ae500] Original list of addresses: [tcp @ 0x55edbe7ae500] Address 151.101.64.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.0.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.192.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.128.217 port 443 [tcp @ 0x55edbe7ae500] Interleaved list of addresses: [tcp @ 0x55edbe7ae500] Address 151.101.64.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.0.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.192.217 port 443 [tcp @ 0x55edbe7ae500] Address 151.101.128.217 port 443 [tcp @ 0x55edbe7ae500] Starting connection attempt to 151.101.64.217 port 443 [tcp @ 0x55edbe7ae500] Successfully connected to 151.101.64.217 port 443 [https @ 0x55edbe7aadc0] request: GET /play/1582631308?s=378487171_1596078044_379a55560ce10f38feff55c87ed111c8&loc=external&context=Vimeo%5CController%5CApi%5CResources%5CVideoController.&download=1&filename=Pr%25C3%25A1ctica%2Bmirar%2Bla%2Bimagen%2Binstant%25C3%25A1nea%2Ben%2Bla%2Bdistancia%2Bf%25C3%25A1cil%2By%2Bdif%25C3%25ADcil.174.mp4 HTTP/1.1 User-Agent: Lavf/58.49.100 Accept: */* Range: bytes=0- Connection: close Host: player.vimeo.com Icy-MetaData: 1 [https @ 0x55edbe7aadc0] header='HTTP/1.1 302 Found' [https @ 0x55edbe7aadc0] http_code=302 [https @ 0x55edbe7aadc0] header='Connection: close' [https @ 0x55edbe7aadc0] header='Content-Length: 0' [https @ 0x55edbe7aadc0] header='Server: nginx' [https @ 0x55edbe7aadc0] header='Content-Type: text/html; charset=UTF-8' [https @ 0x55edbe7aadc0] header='X-Xss-Protection: 1; mode=block' [https @ 0x55edbe7aadc0] header='Content-Security-Policy: default-src 'self'; script-src 'self' https://f.vimeocdn.com; style-src 'self' https://f.vimeocdn.com; img-src 'self' https://i.vimeocdn.com https://f.vimeocdn.com' [https @ 0x55edbe7aadc0] header='X-Content-Type-Options: nosniff' [https @ 0x55edbe7aadc0] header='Strict-Transport-Security: max-age=31536000; includeSubDomains; preload' [https @ 0x55edbe7aadc0] header='Access-Control-Allow-Origin: *' [https @ 0x55edbe7aadc0] header='Location: https://vod-progressive.akamaized.net/exp=1596054341~acl=%2A%2F1582631308.mp4%2A~hmac=02c918822906610d337b7c55f0cb34610641289b911d24faf68d645a218c24d8/vimeo-prod-skyfire-std-us/01/697/15/378487171/1582631308.mp4?download=1&filename=Pr%C3%A1ctica+mirar+la+imagen+instant%C3%A1nea+en+la+distancia+f%C3%A1cil+y+dif%C3%ADcil..mp4' [https @ 0x55edbe7aadc0] header='P3p: CP="This is not a P3P policy! See https://vimeo.com/privacy"' [https @ 0x55edbe7aadc0] header='Expires: Fri, 15 Dec 1985 19:30:00 GMT' [https @ 0x55edbe7aadc0] header='Via: 1.1 varnish' [https @ 0x55edbe7aadc0] header='Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0' [https @ 0x55edbe7aadc0] header='X-Varnish-Cache: 0' [https @ 0x55edbe7aadc0] header='X-VServer: infra-playproxy-a-8' [https @ 0x55edbe7aadc0] header='X-Vimeo-DC: ge' [https @ 0x55edbe7aadc0] header='Accept-Ranges: bytes' [https @ 0x55edbe7aadc0] header='Date: Wed, 29 Jul 2020 16:25:41 GMT' [https @ 0x55edbe7aadc0] header='Via: 1.1 varnish' [https @ 0x55edbe7aadc0] header='Age: 0' [https @ 0x55edbe7aadc0] header='X-Served-By: cache-vie21620-VIE' [https @ 0x55edbe7aadc0] header='X-Cache: MISS' [https @ 0x55edbe7aadc0] header='X-Cache-Hits: 0' [https @ 0x55edbe7aadc0] header='X-Timer: S1596039941.034784,VS0,VE147' [https @ 0x55edbe7aadc0] header='Vary: Accept-Encoding' [https @ 0x55edbe7aadc0] header='' [tcp @ 0x55edbedd0480] Original list of addresses: [tcp @ 0x55edbedd0480] Address 185.46.160.137 port 443 [tcp @ 0x55edbedd0480] Address 185.46.160.136 port 443 [tcp @ 0x55edbedd0480] Address 2a01:9e40:1:7::b92e:a089 port 443 [tcp @ 0x55edbedd0480] Address 2a01:9e40:1:7::b92e:a088 port 443 [tcp @ 0x55edbedd0480] Interleaved list of addresses: [tcp @ 0x55edbedd0480] Address 185.46.160.137 port 443 [tcp @ 0x55edbedd0480] Address 2a01:9e40:1:7::b92e:a089 port 443 [tcp @ 0x55edbedd0480] Address 185.46.160.136 port 443 [tcp @ 0x55edbedd0480] Address 2a01:9e40:1:7::b92e:a088 port 443 [tcp @ 0x55edbedd0480] Starting connection attempt to 185.46.160.137 port 443 [tcp @ 0x55edbedd0480] Successfully connected to 185.46.160.137 port 443 [https @ 0x55edbe7aadc0] request: GET /exp=1596054341~acl=%2A%2F1582631308.mp4%2A~hmac=02c918822906610d337b7c55f0cb34610641289b911d24faf68d645a218c24d8/vimeo-prod-skyfire-std-us/01/697/15/378487171/p4 HTTP/1.1 User-Agent: Lavf/58.49.100 Accept: */* Range: bytes=0- Connection: close Host: vod-progressive.akamaized.net Icy-MetaData: 1 [https @ 0x55edbe7aadc0] header='HTTP/1.1 403 Forbidden' [https @ 0x55edbe7aadc0] http_code=403 [https @ 0x55edbe7aadc0] HTTP error 403 Forbidden https://player.vimeo.com/play/1582631308?s=378487171_1596078044_379a55560ce10f38feff55c87ed111c8&loc=external&context=Vimeo%5CController%5CApi%5CResources%5CVideoController.&download=1&filename=Pr%25C3%25A1ctica%2Bmirar%2Bla%2Bimagen%2Binstant%25C3%25A1nea%2Ben%2Bla%2Bdistancia%2Bf%25C3%25A1cil%2By%2Bdif%25C3%25ADcil.174.mp4: Server returned 403 Forbidden (access denied)
Notice these lines. The URL in the GET request is cut
[https @ 0x55edbe7aadc0] header='Location: https://vod-progressive.akamaized.net/exp=1596054341~acl=%2A%2F1582631308.mp4%2A~hmac=02c918822906610d337b7c55f0cb34610641289b911d24faf68d645a218c24d8/vimeo-prod-skyfire-std-us/01/697/15/378487171/1582631308.mp4?download=1&filename=Pr%C3%A1ctica+mirar+la+imagen+instant%C3%A1nea+en+la+distancia+f%C3%A1cil+y+dif%C3%ADcil..mp4' [https @ 0x55edbe7aadc0] request: GET /exp=1596054341~acl=%2A%2F1582631308.mp4%2A~hmac=02c918822906610d337b7c55f0cb34610641289b911d24faf68d645a218c24d8/vimeo-prod-skyfire-std-us/01/697/15/378487171/p4 HTTP/1.1 User-Agent: Lavf/58.49.100 Accept: */* Range: bytes=0- Connection: close Host: vod-progressive.akamaized.net
How to reproduce:
ffprobe -v 9 -loglevel 99 -report "https://player.vimeo.com/play/1582631308?s=378487171_1596078044_379a55560ce10f38feff55c87ed111c8&loc=external&context=Vimeo%5CController%5CApi%5CResources%5CVideoController.&download=1&filename=Pr%25C3%25A1ctica%2Bmirar%2Bla%2Bimagen%2Binstant%25C3%25A1nea%2Ben%2Bla%2Bdistancia%2Bf%25C3%25A1cil%2By%2Bdif%25C3%25ADcil.174.mp4"
Change History (4)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Hello cehoyos,
the issue is reproducible with ffmpeg too. I have reproduced the case with a file on a web server that i control.
$ ffmpeg -v 9 -loglevel 99 -i "http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4" -f image2 -vframes 1 image%03d.jpg ffmpeg version N-98588-gcbb6ba2e86 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.1.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3 libavutil 56. 57.100 / 56. 57.100 libavcodec 58. 97.102 / 58. 97.102 libavformat 58. 49.100 / 58. 49.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'. Reading option '-i' ... matched as input url with argument 'http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4'. Reading option '-f' ... matched as option 'f' (force format) with argument 'image2'. Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'. Reading option 'image%03d.jpg' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument 9. Successfully parsed a group of options. Parsing a group of options: input url http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4. Successfully parsed a group of options. Opening an input file: http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4. [NULL @ 0x560e9bcf7300] Opening 'http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4' for reading [http @ 0x560e9bcf7e80] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy,data' [tcp @ 0x560e9bcfae00] Original list of addresses: [tcp @ 0x560e9bcfae00] Address 77.238.90.90 port 80 [tcp @ 0x560e9bcfae00] Interleaved list of addresses: [tcp @ 0x560e9bcfae00] Address 77.238.90.90 port 80 [tcp @ 0x560e9bcfae00] Starting connection attempt to 77.238.90.90 port 80 [tcp @ 0x560e9bcfae00] Successfully connected to 77.238.90.90 port 80 [http @ 0x560e9bcf7e80] request: GET /play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Pr%C3%A1ctica+mirar+la+imagen+instant%C3%A1nea+en+la+distancia+f%C3%A1cil+y+dif%C3%ADcil..mp4 HTTP/1.1 User-Agent: Lavf/58.49.100 Accept: */* Range: bytes=0- Connection: close Host: 77.238.90.90 Icy-MetaData: 1 [http @ 0x560e9bcf7e80] header='HTTP/1.1 302 Moved Temporarily' [http @ 0x560e9bcf7e80] http_code=302 [http @ 0x560e9bcf7e80] header='Server: nginx' [http @ 0x560e9bcf7e80] header='Date: Mon, 03 Aug 2020 12:51:47 GMT' [http @ 0x560e9bcf7e80] header='Content-Type: text/html' [http @ 0x560e9bcf7e80] header='Content-Length: 138' [http @ 0x560e9bcf7e80] header='Location: http://77.238.90.90/vimeo-prod-skyfire-std-us/01/697/15/378487171/Pr%C3%A1ctica+mirar+la+imagen+instant%C3%A1nea+en+la+distancia+f%C3%A1cil+y+dif%C3%ADcil..mp4' [http @ 0x560e9bcf7e80] header='Connection: close' [http @ 0x560e9bcf7e80] header='' [tcp @ 0x560e9bcfb380] Original list of addresses: [tcp @ 0x560e9bcfb380] Address 77.238.90.90 port 80 [tcp @ 0x560e9bcfb380] Interleaved list of addresses: [tcp @ 0x560e9bcfb380] Address 77.238.90.90 port 80 [tcp @ 0x560e9bcfb380] Starting connection attempt to 77.238.90.90 port 80 [tcp @ 0x560e9bcfb380] Successfully connected to 77.238.90.90 port 80 [http @ 0x560e9bcf7e80] request: GET /vimeo-prod-skyfire-std-us/01/697/15/378487171/p4 HTTP/1.1 User-Agent: Lavf/58.49.100 Accept: */* Range: bytes=0- Connection: close Host: 77.238.90.90 Icy-MetaData: 1 [http @ 0x560e9bcf7e80] header='HTTP/1.1 404 Not Found' [http @ 0x560e9bcf7e80] http_code=404 [http @ 0x560e9bcf7e80] HTTP error 404 Not Found http://77.238.90.90/play/vimeo-prod-skyfire-std-us/01/697/15/378487171/Práctica+mirar+la+imagen+instantánea+en+la+distancia+fácil+y+difícil..mp4: Server returned 404 Not Found
ffplay is also affected
comment:3 by , 4 years ago
Hello,
it looks like this bug is specific to Linux. This works fine on Mac.
comment:4 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I have a fresh build of ffmpeg/ffprobe and this works on my Arch linux laptop.
It appears to actually be something with the server itself reporting that it doesn't have the asset. I tested with the vimeo link in curl (it is a dead link now, but that is to be expected after weeks) and with the hardcoded ip address link with ffmpeg and I cannot reproduce your error.
I did notice that in the bottom of the first link, it was a 403 indicating that it's not an issue with getting to the material but a matter of authentication not succeeding. With the second potential truncation, that appears to be in the logging as the final line has the full output.
I'm going to close this one as it appears to be in the source material and not FFMPEG, but please feel free to reopen if I'm wrong and you have some more information which I might be missing.
Do I understand correctly that your issue is not reproducible with
ffmpeg
?