diff options
-rw-r--r-- | README.rst | 6 | ||||
-rwxr-xr-x | scripts/ffmpeg-config | 15 |
2 files changed, 17 insertions, 4 deletions
@@ -57,8 +57,10 @@ Essential dependencies (incomplete list): - Audio output development headers (libasound, pulseaudio) - fribidi, freetype, fontconfig development headers (for libass) - libjpeg +- OpenSSL or GnuTLS development headers if you want to open https links + (this is also needed to make youtube-dl interaction work) - youtube-dl (at runtime) if you want to play Youtube videos directly - (also requires ytdl=yes in ~/.config/mpv/mpv.conf) + (a builtin mpv script will call it) - libx264/libmp3lame/libfdk-aac if you want to use encoding (you have to add these options explicitly to the ffmpeg options, as ffmpeg won't autodetect these libraries; see next section) @@ -83,8 +85,6 @@ example, to enable some dependencies needed for encoding: echo --enable-libfdk-aac >> ffmpeg_options - echo --enable-nonfree >> ffmpeg_options - Do this in the mpv-build top-level directory (the same that contains the build scripts and this readme file). It must be done prior running ./build or ./rebuild. diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config index d82d638..7ff138f 100755 --- a/scripts/ffmpeg-config +++ b/scripts/ffmpeg-config @@ -7,7 +7,7 @@ USER_OPTS="$@" if test -f "$BUILD"/ffmpeg_options ; then USER_OPTS="$(cat "$BUILD"/ffmpeg_options) $USER_OPTS" fi -OPTIONS="--enable-gpl --disable-debug --disable-doc" +OPTIONS="--enable-gpl --enable-nonfree --disable-debug --disable-doc" if "$BUILD"/scripts/test-libmpv ; then OPTIONS="$OPTIONS --enable-pic" @@ -15,6 +15,19 @@ fi OPTIONS="$OPTIONS $USER_OPTS" +# Do FFmpeg's job. +if ! ( echo "$OPTIONS" | grep -e --enable-openssl ) && + ! ( echo "$OPTIONS" | grep -e --enable-gnutls ) ; +then + if pkg-config openssl ; then + OPTIONS="$OPTIONS --enable-openssl" + echo "Auto-enabling OpenSSL (creates a non-redistributable binary)." + elif pkg-config gnutls ; then + OPTIONS="$OPTIONS --enable-gnutls" + echo "Auto-enabling GnuTLS." + fi +fi + echo Using ffmpeg options: $OPTIONS mkdir -p "$BUILD"/ffmpeg_build |