@ -1,5 +1,6 @@
#
# 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.
@ -8,14 +9,15 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
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
@ -224,7 +226,8 @@ include $(INCLUDE_DIR)/package.mk
d e f i n e P a c k a g e / f f m p e g / D e f a u l t
TITLE:= FFmpeg
URL:= http://ffmpeg.mplayerhq.hu/
URL:= https://ffmpeg.org/
DEPENDS += +libpthread
e n d e f
d e f i n e P a c k a g e / f f m p e g / D e f a u l t / d e s c r i p t i o n
@ -238,7 +241,7 @@ $(call Package/ffmpeg/Default)
SECTION:= multimedia
CATEGORY:= Multimedia
TITLE += program
DEPENDS += +libpthread +lib ffmpeg-full
DEPENDS += +libffmpeg-full
VARIANT:= full
e n d e f
@ -270,7 +273,7 @@ $(call Package/ffserver/Default)
SECTION:= multimedia
CATEGORY:= Multimedia
TITLE += streaming server
DEPENDS += +libpthread +lib ffmpeg-full
DEPENDS += +libffmpeg-full
VARIANT:= full
e n d e f
@ -285,7 +288,7 @@ $(call Package/ffmpeg/Default)
SECTION:= libs
CATEGORY:= Libraries
TITLE += libraries
DEPENDS += @BUILD_PATENTED +libpthread +zlib +libbz2
DEPENDS += +libpthread +zlib +libbz2
PROVIDES:= libffmpeg
e n d e f
@ -294,8 +297,9 @@ define Package/libffmpeg-custom
$( 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
e n d e f
@ -314,6 +318,7 @@ endef
d e f i n e P a c k a g e / l i b f f m p e g - a u d i o - d e c
$( call Package /libffmpeg /Default )
TITLE += ( audio)
DEPENDS += @BUILD_PATENTED
VARIANT:= audio-dec
e n d e f
@ -327,10 +332,16 @@ endef
d e f i n e P a c k a g e / l i b f f m p e g - f u l l
$( 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
e n d e f
d e f i n e P a c k a g e / l i b f f m p e g - f u l l / d e s c r i p t i o n
$( call Package /ffmpeg /Default /description )
.
@ -341,6 +352,7 @@ endef
d e f i n e P a c k a g e / l i b f f m p e g - m i n i
$( call Package /libffmpeg /Default )
TITLE += ( mini)
DEPENDS += @BUILD_PATENTED
VARIANT:= mini
e n d e f
@ -363,15 +375,11 @@ FFMPEG_CONFIGURE:= \
--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 \
@ -415,18 +423,13 @@ FFMPEG_CONFIGURE += \
e l s e i f n e q ( $( findstring arm ,$ ( CONFIG_ARCH ) ) , )
FFMPEG_CONFIGURE += \
--disable-runtime-cpudetect
# XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
e l s e i f n e q ( $( findstring powerpc ,$ ( CONFIG_ARCH ) ) , )
FFMPEG_CONFIGURE += \
--disable-altivec
e n d i f
i f n e q ( $( CONFIG_YASM ) , y )
FFMPEG_CONFIGURE += \
--disable-yasm
e n d i f
#selectibly disable optimizations according to arch/cpu type
# selectively disable optimizations according to arch/cpu type
i f n e q ( $( findstring arm ,$ ( CONFIG_ARCH ) ) , )
ifeq ( ,$( findstring vfp,$( CONFIG_TARGET_OPTIMIZATION) ) )
FFMPEG_CONFIGURE += \
@ -439,11 +442,28 @@ ifneq ($(findstring arm,$(CONFIG_ARCH)),)
e n d i f
i f n e q ( $( CONFIG_YASM ) , y )
FFMPEG_CONFIGURE += \
--disable-yasm
e n d i f
i f e q ( $( BUILD_VARIANT ) , f u l l )
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
e n d i f
i f e q ( $( BUILD_VARIANT ) , c u s t o m )
@ -453,6 +473,26 @@ 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 \
@ -471,23 +511,32 @@ ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
FFMPEG_CONFIGURE += \
--enable-decoder= adpcm_ima_wav \
--enable-decoder= adpcm_ima_qt \
--enable-decoder= adpcm_ms \
--enable-decoder= adpcm_ms
e n d i f
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_libfdk -aac ) , y )
FFMPEG_CONFIGURE += \
--enable-libfdk-aac --enable-encoder= libfdk_aac
e n d i f
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_libmp 3lame ) , y )
FFMPEG_CONFIGURE += \
--enable-libmp3lame --enable-encoder= libmp3lame
e n d i f
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_libopus ) , y )
FFMPEG_CONFIGURE += \
--enable-libopus --enable-decoder= libopus
--enable-libopus --enable-decoder= libopus --enable-encoder= libopus
e n d i f
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_x 264 ) , y )
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_libshine ) , y )
FFMPEG_CONFIGURE += \
--enable-libx264
--enable-libshine --enable-encoder= libshine
e n d i f
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_mp 3lame ) , y )
i f e q ( $( CONFIG_FFMPEG_CUSTOM_SELECT_libx 264 ) , y )
FFMPEG_CONFIGURE += \
--enable-libmp3lame
--enable-libx264 --enable-encoder= libx264
e n d i f
e n d i f
@ -500,6 +549,9 @@ ifeq ($(BUILD_VARIANT),audio-dec)
)
FFMPEG_CONFIGURE += \
--enable-small \
--enable-gpl \
\
--disable-programs \
--disable-avfilter \
--disable-postproc \
@ -522,6 +574,8 @@ ifeq ($(BUILD_VARIANT),mini)
)
FFMPEG_CONFIGURE += \
--enable-small \
\
--disable-programs \
--disable-avdevice \
--disable-avfilter \
@ -531,8 +585,7 @@ ifeq ($(BUILD_VARIANT),mini)
--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) )
e n d i f
i f n e q ( $( CONFIG_TARGET_x 86) , )
@ -558,13 +611,19 @@ define Build/InstallDev/custom
$( CP) $( PKG_INSTALL_DIR) /usr/lib/pkgconfig/lib{ avcodec,avdevice,avformat,avutil} .pc $( 1) /usr/lib/pkgconfig/
e n d e f
# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
d e f i n e B u i l d / I n s t a l l D e v / f u l l
$( 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/
i f n e q ( $( 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/
e n d i f
e n d e f
d e f i n e B u i l d / I n s t a l l D e v / m i n i
@ -622,9 +681,13 @@ define Package/libffmpeg-custom/install
$( CP) $( PKG_INSTALL_DIR) /usr/lib/lib{ avcodec,avdevice,avformat,avutil} .so.* $( 1) /usr/lib/
e n d e f
# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
d e f i n e P a c k a g e / l i b f f m p e g - f u l l / i n s t a l l
$( 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/
i f n e q ( $( CONFIG_SOFT_FLOAT ) , y )
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libpostproc.so.* $( 1) /usr/lib/
e n d i f
e n d e f
d e f i n e P a c k a g e / l i b f f m p e g - m i n i / i n s t a l l