if PACKAGE_libffmpeg-custom
+comment "Build Licensing"
+
+config FFMPEG_CUSTOM_GPL
+ bool "Allow use of GPL code"
+ help
+ By default, FFMpeg is licensed under the LGPL. This builds a GPL licensed version.
+ Some software requires this, such as libx264.
+ default y
+
+config FFMPEG_CUSTOM_GPLV3
+ bool "Use (L)GPL v3"
+ help
+ Uses the LPGL v3 if GPL isn't selected, or GPL v3 if it is.
+
+config FFMPEG_CUSTOM_NONFREE
+ bool "Use code with complex licensing requirements; see help"
+ help
+ This sets --enable-nonfree, which in almost all cases, will prohibit redistribution of the resulting package.
+ Use this with care.
+ default n
+
config FFMPEG_CUSTOM_PATENTED
bool "Include patented codecs and technologies"
default BUILD_PATENTED
+comment "Build Properties"
+
+config FFMPEG_CUSTOM_LARGE
+ bool "Build libffmpeg for performance instead of minimizing size on disk"
+ default y if ( x86_64 )
+ default n
+
comment "Profiles"
config FFMPEG_CUSTOM_FFSERVER_SUPPORT
comment "External Libraries"
-config FFMPEG_CUSTOM_SELECT_mp3lame
- bool "MP3 LAME"
+config FFMPEG_CUSTOM_SELECT_libfdk-aac
+ bool "Fraunhofer FDK AAC encoding library (libfdk-aac)"
+ depends on FFMPEG_CUSTOM_NONFREE
+ depends on FFMPEG_CUSTOM_PATENTED
+ depends on PACKAGE_fdk-aac
+
+config FFMPEG_CUSTOM_SELECT_libmp3lame
+ bool "Libmp3lame"
depends on FFMPEG_CUSTOM_PATENTED
depends on PACKAGE_lame-lib
select FFMPEG_CUSTOM_DECODER_mp3
select FFMPEG_CUSTOM_DEMUXER_mp3
config FFMPEG_CUSTOM_SELECT_libopus
- bool "Opus"
+ bool "Libopus"
+
+config FFMPEG_CUSTOM_SELECT_libshine
+ bool "Libshine"
-config FFMPEG_CUSTOM_SELECT_x264
- bool "x264"
+config FFMPEG_CUSTOM_SELECT_libx264
+ bool "Libx264"
depends on FFMPEG_CUSTOM_PATENTED
+ depends on FFMPEG_CUSTOM_GPL
depends on PACKAGE_libx264
select FFMPEG_CUSTOM_DECODER_h264
select FFMPEG_CUSTOM_MUXER_h264
#
# Copyright (C) 2006-2017 OpenWrt.org
+# Copyright (C) 2017 Ian Leonard <antonlacon@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=3.2.2
+PKG_VERSION:=3.2.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_MD5SUM:=e34d1b92c5d844f2a3611c741a6dba18
-PKG_HASH:=3f01bd1fe1a17a277f8c84869e5d9192b4b978cb660872aa2b54c3cc8a2fedfc
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_MD5SUM:=39fd71024ac76ba35f04397021af5606
+PKG_HASH:=6e38ff14f080c98b58cf5967573501b8cb586e3a173b591f3807d8f0660daf7a
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
+ Ian Leonard <antonlacon@gmail.com>
PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
define Package/ffmpeg/Default
TITLE:=FFmpeg
- URL:=http://ffmpeg.mplayerhq.hu/
+ URL:=https://ffmpeg.org/
+ DEPENDS+= +libpthread
endef
define Package/ffmpeg/Default/description
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= program
- DEPENDS+= +libpthread +libffmpeg-full
+ DEPENDS+= +libffmpeg-full
VARIANT:=full
endef
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= streaming server
- DEPENDS+= +libpthread +libffmpeg-full
+ DEPENDS+= +libffmpeg-full
VARIANT:=full
endef
SECTION:=libs
CATEGORY:=Libraries
TITLE+= libraries
- DEPENDS+= @BUILD_PATENTED +libpthread +zlib +libbz2
+ DEPENDS+= +libpthread +zlib +libbz2
PROVIDES:= libffmpeg
endef
$(call Package/libffmpeg/Default)
TITLE+= (custom)
DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \
- +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib
-
+ +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib \
+ +FFMPEG_CUSTOM_SELECT_libshine:shine \
+ +PACKAGE_fdk-aac:fdk-aac
VARIANT:=custom
MENU:=1
endef
define Package/libffmpeg-audio-dec
$(call Package/libffmpeg/Default)
TITLE+= (audio)
+ DEPENDS+= @BUILD_PATENTED
VARIANT:=audio-dec
endef
define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
TITLE+= (full)
- DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus
+ DEPENDS+= @BUILD_PATENTED +alsa-lib +PACKAGE_libopus:libopus
+ ifeq ($(CONFIG_SOFT_FLOAT),y)
+ DEPENDS+= +PACKAGE_shine:shine
+ else
+ DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
+ endif
VARIANT:=full
endef
+
define Package/libffmpeg-full/description
$(call Package/ffmpeg/Default/description)
.
define Package/libffmpeg-mini
$(call Package/libffmpeg/Default)
TITLE+= (mini)
+ DEPENDS+= @BUILD_PATENTED
VARIANT:=mini
endef
--pkg-config="pkg-config" \
--enable-shared \
--enable-static \
- --enable-small \
--enable-pthreads \
--enable-zlib \
--disable-doc \
--disable-debug \
\
- --enable-gpl \
- --enable-version3 \
- \
--disable-dxva2 \
--disable-lzma \
--disable-vaapi \
else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE += \
--disable-runtime-cpudetect
+# XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE += \
--disable-altivec
endif
-ifneq ($(CONFIG_YASM),y)
-FFMPEG_CONFIGURE += \
- --disable-yasm
-
-endif
-
-#selectibly disable optimizations according to arch/cpu type
+# selectively disable optimizations according to arch/cpu type
ifneq ($(findstring arm,$(CONFIG_ARCH)),)
ifeq (,$(findstring vfp,$(CONFIG_TARGET_OPTIMIZATION)))
FFMPEG_CONFIGURE+= \
endif
+ifneq ($(CONFIG_YASM),y)
+FFMPEG_CONFIGURE += \
+ --disable-yasm
+
+endif
+
ifeq ($(BUILD_VARIANT),full)
FFMPEG_CONFIGURE+= \
- --enable-libopus --enable-decoder=libopus \
- $(if $(CONFIG_PACKAGE_libx264),--enable-libx264) \
- $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame)
+ $(if $(CONFIG_PACKAGE_libopus),--enable-libopus)
+ ifeq ($(CONFIG_SOFT_FLOAT),y)
+ FFMPEG_CONFIGURE+= \
+ --enable-small \
+ \
+ $(if $(CONFIG_PACKAGE_shine),--enable-libshine)
+ else
+ FFMPEG_CONFIGURE+= \
+ --enable-small \
+ --enable-gpl \
+ \
+ $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) \
+ $(if $(CONFIG_PACKAGE_libx264),--enable-libx264)
+ endif
endif
ifeq ($(BUILD_VARIANT),custom)
$(if $($(3)_$(c)),--enable-$(1)="$(c)") \
)
+ ifeq ($(CONFIG_FFMPEG_CUSTOM_LARGE),y)
+ FFMPEG_CONFIGURE+= \
+ --enable-hardcoded-tables
+ else
+ FFMPEG_CONFIGURE+= \
+ --enable-small
+ endif
+
+ ifeq ($(CONFIG_FFMPEG_CUSTOM_GPL),y)
+ FFMPEG_CONFIGURE+= --enable-gpl
+ endif
+
+ ifeq ($(CONFIG_FFMPEG_CUSTOM_GPLV3),y)
+ FFMPEG_CONFIGURE+= --enable-version3
+ endif
+
+ ifeq ($(CONFIG_FFMPEG_CUSTOM_NONFREE),y)
+ FFMPEG_CONFIGURE+= --enable-nonfree
+ endif
+
FFMPEG_CONFIGURE+= \
--disable-programs \
--disable-avfilter \
FFMPEG_CONFIGURE+= \
--enable-decoder=adpcm_ima_wav \
--enable-decoder=adpcm_ima_qt \
- --enable-decoder=adpcm_ms \
+ --enable-decoder=adpcm_ms
+endif
+
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libfdk-aac),y)
+ FFMPEG_CONFIGURE+= \
+ --enable-libfdk-aac --enable-encoder=libfdk_aac
+endif
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libmp3lame),y)
+ FFMPEG_CONFIGURE+= \
+ --enable-libmp3lame --enable-encoder=libmp3lame
endif
ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y)
FFMPEG_CONFIGURE+= \
- --enable-libopus --enable-decoder=libopus
+ --enable-libopus --enable-decoder=libopus --enable-encoder=libopus
endif
-ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_x264),y)
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libshine),y)
FFMPEG_CONFIGURE+= \
- --enable-libx264
+ --enable-libshine --enable-encoder=libshine
endif
-ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_mp3lame),y)
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
FFMPEG_CONFIGURE+= \
- --enable-libmp3lame
+ --enable-libx264 --enable-encoder=libx264
endif
endif
)
FFMPEG_CONFIGURE+= \
+ --enable-small \
+ --enable-gpl \
+ \
--disable-programs \
--disable-avfilter \
--disable-postproc \
)
FFMPEG_CONFIGURE+= \
+ --enable-small \
+ \
--disable-programs \
--disable-avdevice \
--disable-avfilter \
--disable-everything \
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
- $(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS)) \
-
+ $(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS))
endif
ifneq ($(CONFIG_TARGET_x86),)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
endef
+# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
define Build/InstallDev/full
$(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swresample,swscale} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swresample,swscale}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale} $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
+ifneq ($(CONFIG_SOFT_FLOAT),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
+endif
endef
define Build/InstallDev/mini
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
endef
+# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
define Package/libffmpeg-full/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swresample,swscale}.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.so.* $(1)/usr/lib/
+ifneq ($(CONFIG_SOFT_FLOAT),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
+endif
endef
define Package/libffmpeg-mini/install