Opened 11 years ago

Closed 10 years ago

Last modified 9 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

Description

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.

eg:

$ ./mplayer -msglevel all=8 ffmpeg://https://chris.ill-logic.com/videos/rocksteady.mp4

Playing ffmpeg://https://chris.ill-logic.com/videos/rocksteady.mp4.
    DEMUX: libavformat version 55.33.100 (internal)
    DEMUX: Configuration: --enable-gpl --enable-postproc
     OPEN: [ffmpeg] Opening https://chris.ill-logic.com/videos/rocksteady.mp4
     OPEN: Failed to open ffmpeg://https://chris.ill-logic.com/videos/rocksteady.mp4.

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 by chris@…, 11 years ago

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 by compn, 10 years ago

Playing ffmpeg://https://chris.ill-logic.com/videos/rocksteady.mp4.
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 by reimar, 10 years ago

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:
config.h:
#define CONFIG_GNUTLS 1
#define CONFIG_HTTPS_PROTOCOL 1
#define CONFIG_TLS_PROTOCOL 1

config.mak:
CONFIG_GNUTLS = yes
CONFIG_HTTPS_PROTOCOL = yes
CONFIG_TLS_PROTOCOL = yes

comment:4 by beastd, 10 years ago

Owner: set to beastd
Status: newopen

comment:5 by beastd, 10 years ago

Resolution: fixed
Status: openclosed

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 by chris@…, 10 years ago

Amazing! Thank you beastd!

comment:7 by curaga, 9 years ago

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 by curaga, 9 years ago

Cc: curaga@… added

comment:9 by curaga, 9 years ago

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

in reply to:  9 comment:10 by beastd, 9 years ago

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
Patch: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20151115/4994b8fe/attachment.patch

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 by curaga, 9 years ago

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.