How to compile ffmpeg with https support

23,771

Solution 1

TL;DR

./configure --enable-gnutls

Open a terminal and follow the commands below:

For Trusty you need a PPA, recommended on the ffmpeg download page

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update

After that

cd
apt-get source ffmpeg
sudo apt-get build-dep ffmpeg

Replace 2.5.7 with your version:

cd ffmpeg-2.5.7
./configure --enable-gnutls
dpkg-buildpackage -rfakeroot -uc -b

After that, install the package in the parent folder (cd ..).

Solution 2

Add --enable-openssl, This is what I use. Make sure the library is inatalled, debian: sudo apt install libssl-dev, or redhat: yum install -y openssl-devel

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-openssl \
  --enable-nonfree
PATH="$HOME/bin:$PATH" make
make install
hash -r
Share:
23,771

Related videos on Youtube

Robin
Author by

Robin

Updated on September 18, 2022

Comments

  • Robin
    Robin almost 2 years

    I have installed both openssl and openssl-dev, with these:

    sudo apt-get install openssl
    sudo apt-get install libssl-dev
    

    And has install ffmpeg by these:

    sudo add-apt-repository ppa:mc3man/trusty-media
    sudo apt-get install ffmpeg
    

    Now I would like to enable https protocol for ffmpeg. I did try these:

    user@user-VirtualBox:~/ffmpeg_sources/ffmpeg$ ./configure --enable-openssl
    

    And its listed in the Enabled protocols list.

    After that ran these commands:

    make
    make install
    

    But with no help. And if check the ffmpeg -protocols, the https protocols is not listed there.

    I am using ubuntu inside a virtualbox, and I not very good at it. If you could please guide me through how to compile openssl with ffmpeg to enable https protocol I would be very thank grateful. Thank you.

    • Wilf
      Wilf almost 9 years
      Try /usr/local/bin/ffmpeg - also what is the output of whereis ffmpeg? Also, what version of ubuntu are you using?
    • doug
      doug almost 7 years
      You weren't actually using that ppa's ffmpeg as https was & continues to be enabled..
  • Robin
    Robin almost 9 years
    There's not apt-get source ffmpeg
  • A.B.
    A.B. almost 9 years
    @Robin what do you mean? ffmpeg is in the standard repositories.
  • Robin
    Robin almost 9 years
    Yes. I have no idea why. It should have been. But its not there.
  • A.B.
    A.B. almost 9 years
    @Robin sorry, not for Trusty askubuntu.com/a/432585/367165
  • A.B.
    A.B. almost 9 years
    Updated my answer
  • Elliott B
    Elliott B over 3 years
    Out of curiosity, why do you prefer gnutls over openssl?
  • Xel Naga
    Xel Naga over 2 years