Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#2183 closed defect (fixed)

Enabling ffmpeg HTTPS streaming (via ffmpeg://https://...)

Reported by: chris@… Owned by: beastd
Priority: normal Component: streaming
Version: HEAD Severity: normal
Keywords: https streaming ffmpeg Cc: curaga@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no


Hi guys!

I've been trying to get ffmpeg://https:// to work, but haven't been very successful.

The standaline ffmpeg can play https streams if it's built with --enable-gnutls, but mplayer's statically linked ffmpeg isn't able to handle them.

I tried enabling ffmpeg's gnutls during mplayer's build process by adding -lgnutls to the Makefile, and #define ENABLE_GNUTLS 1 to the config.h; mplayer builds properly, but playing ffmpeg://https:// does the same thing -- it terminates immediately with an error, without trying to connect.


$ ./mplayer -msglevel all=8 ffmpeg://

Playing ffmpeg://
    DEMUX: libavformat version 55.33.100 (internal)
    DEMUX: Configuration: --enable-gpl --enable-postproc
     OPEN: [ffmpeg] Opening
     OPEN: Failed to open ffmpeg://

Is there something else that needs to be done to make the ffmpeg://https:// protocol work?

Thanks for your time!
-- Chris

Change History (11)

comment:1 Changed 6 years ago by chris@…

I should mention that ffmpeg HTTP support *does* work (mplayer ffmpeg://http://...).

In theory, it shouldn't be difficult to make ffmpeg://https:// work as well. It seems like it just has to do with how ffmpeg is being compiled.

comment:2 Changed 6 years ago by compn

Playing ffmpeg://
libavformat version 55.30.100 (internal)
https protocol not found, recompile with openssl or gnutls enabled.

so have to compile ffmpeg against gnutls or openssl.

comment:3 Changed 6 years ago by reimar

This should be much less messy if it's just enabled in configure.
However it works for me, the things that need to be enabled are:


comment:4 Changed 6 years ago by beastd

  • Owner set to beastd
  • Status changed from new to open

comment:5 Changed 6 years ago by beastd

  • Resolution set to fixed
  • Status changed from open to closed

Should be working now without manual actions if you have GnuTLS and development files installed.

You can use ffmpeg://https://... as well as only https://....

The relevant commit is SVN r37294.

comment:6 Changed 6 years ago by chris@…

Amazing! Thank you beastd!

comment:7 Changed 5 years ago by curaga

I see ffmpeg also supports openssl, which is still more common than gnutls. Is it possible to do the same for openssl? Should I open a separate ticket?

comment:8 Changed 5 years ago by curaga

  • Cc curaga@… added

comment:9 follow-up: Changed 5 years ago by curaga

No reply, so I filed a new ticket, #2268.

comment:10 in reply to: ↑ 9 Changed 5 years ago by beastd

Replying to curaga:

No reply, so I filed a new ticket, #2268.

Sorry, for the late reply.

Not so long ago I posted a patch on the mplayer-dev-eng ML to allow using ffmpeg https via SChannel on Windows:

Subject: [MPlayer-dev-eng] [PATCH 3/3] configure: Detect SChannel and enable FFmpeg https

Technically I supporting OpenSSL too should look similarly to that patch or r37294 which added support for ffmpeg GnuTLS, but I am rather short on time these days.

Do you have some specific environment where you need support for OpenSSL specifically?

BTW if you build against external FFmpeg, it should work with whatever TLS support that was compiled with, e.g. OpenSSL.

comment:11 Changed 5 years ago by curaga

Well, you could say it's a preference, since my systems do not have gnutls nor schannel installed, but do have openssl - no point in having more than one lib for the same thing. I build with the included ffmpeg.

If it's really that simple, no code changes needed, I might do the patch myself later on.

Note: See TracTickets for help on using tickets.