Opened 5 months ago

Last modified 5 months ago

#7223 new defect

ffmpeg fails to get https over http proxy

Reported by: flaisob Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: http
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl

---

ffmpeg fails to CONNECT through http proxy for https urls when using -http_proxy command line.

It does try to use the proxy when setting the http_proxy environment variable. But, then it fails.

My use case is to get get https m3u8 files and the https segment urls through the proxy, but here are simple examples:

Works without proxy:
ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico

ffmpeg -i "https://twitter.com/favicon.ico" t.ico

Doesn't use proxy for https, it gets the file but not through the proxy:

ffmpeg -http_proxy http://127.0.0.1:3135 -i "https://twitter.com/favicon.ico" t.ico

Uses proxy for https but fails:

export http_proxy=http://127.0.0.1:1234

ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico
segmentation fault (core dumped)

ffmpeg -i "https://twitter.com/favicon.ico" t.ico
[tls @ 0x2d4a4c0] error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
https://twitter.com/favicon.ico: Input/output error

Those urls work with curl using the same proxy.

Works:
curl -x http://localhost:1234 "https://twitter.com/favicon.ico"

Attachments (1)

gdb-valgrind.txt (18.2 KB) - added by flaisob 5 months ago.
gdb valgrind log

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 months ago by cehoyos

  • Keywords http added

Please test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 follow-up: Changed 5 months ago by flaisob

uncut console output, for lastest ffmpeg stable release:

export http_proxy=http://127.0.0.1:1234
ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100

zsh: segmentation fault (core dumped) ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico"

comment:3 in reply to: ↑ 2 Changed 5 months ago by ryonsabouni

See how it says "ffmpeg version 4.0 Copyright...." That means that you are on version 4.0 and not on git head. Disclaimer: Git head may also yield the same results.

Replying to flaisob:

uncut console output, for lastest ffmpeg stable release:

export http_proxy=http://127.0.0.1:1234
ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100

zsh: segmentation fault (core dumped) ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico"

comment:4 follow-up: Changed 5 months ago by flaisob

export http_proxy=​http://127.0.0.1:1234
./ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico

ffmpeg version N-91146-gfe84f70 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 19.102 / 58. 19.102
libavformat 58. 16.100 / 58. 16.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 24.100 / 7. 24.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100

zsh: segmentation fault (core dumped) ./ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico"

comment:5 in reply to: ↑ 4 Changed 5 months ago by cehoyos

Replying to flaisob:

export http_proxy=​http://127.0.0.1:1234
./ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico" f.ico

ffmpeg version N-91146-gfe84f70 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
  configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 19.102 / 58. 19.102
  libavformat    58. 16.100 / 58. 16.100
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 24.100 /  7. 24.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
zsh: segmentation fault (core dumped)  ./ffmpeg -i "https://img-prod-cms-rt-microsoft-com.akamaized.net/favicon.ico"

Please provide backtrace, disassembly and register dump (and / or valgrind output, it isn't known in advance which is more useful) as explained on https://ffmpeg.org/bugreports.html

Changed 5 months ago by flaisob

gdb valgrind log

Note: See TracTickets for help on using tickets.