curl - 为什么 curl 不能下载 ffmpeg-2.7.ta​​r.bz2?

标签 curl ffmpeg

我正在开发 OS X Yosemite 10.10.2。我想使用 curl 命令下载 ffmpeg-2.7.ta​​r.bz2,如下所示:

curl -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2



它行不通。

但是它适用于其他网址。

添加时提示如下--详细 选项:
$ curl --verbose -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
* Hostname was NOT found in DNS cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 192.190.173.55...
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to ffmpeg.org (192.190.173.55) port 80 (#0)
> GET /releases/ffmpeg-2.7.tar.bz2 HTTP/1.1
> User-Agent: curl/7.37.1
> Host: ffmpeg.org
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 302 Found
< Location: http://211.167.105.70:80/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
< Connection: Close
< 
{ [data not shown]
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
* Closing connection 0

我哪里做错了?

PS:
$ curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz 

最佳答案

您似乎正在使用代理 ( 211.167.105.70:80 ),它返回 302 redirect .

要使 curl 遵循 HTTP 重定向,请使用 --location 选项:

curl --verbose --location -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2

关于curl - 为什么 curl 不能下载 ffmpeg-2.7.ta​​r.bz2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30786023/

相关文章:

php - Google Geo API(纬度 + 经度)

php - 一个视频如何用 ffmpeg 覆盖 2 个不同的视频?

c - FFMPEG使用sws_scale将YCbCr转换为RGB

Ffmpeg 将视频拆分为多个 block ,但持续时间长度不同

audio - omxplayer : audio out of sync

php - 对 CURLOPT_HTTPGET 和 CURLOPT_POST 选项感到困惑

php - 使用 curl 提交/检索表单结果

cmd - ffmpeg encode tiff to h265- error 必须指定至少一个输出文件

json - 为什么curl会截断内容?

curl - 在文件上传中使用curl来处理多部分/表单数据