PKG_NAME:=ffmpeg
PKG_VERSION:=3.2.12
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
VARIANT:=full
endef
+define Package/ffmpeg-custom
+$(call Package/ffmpeg/Default)
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE+= program (custom)
+ DEPENDS+= @!ALL libffmpeg-custom
+ VARIANT:=custom
+endef
+
define Package/ffmpeg/description
$(call Package/ffmpeg/Default/description)
.
This package contains the FFmpeg command line tool.
endef
+Package/ffmpeg-custom/description = $(Package/ffmpeg/description)
define Package/ffprobe
$(call Package/ffmpeg/Default)
VARIANT:=full
endef
+define Package/ffprobe-custom
+$(call Package/ffmpeg/Default)
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE+= CLI media identifier (custom)
+ DEPENDS+= @!ALL libffmpeg-custom
+ VARIANT:=custom
+endef
+
define Package/ffprobe/description
$(call Package/ffmpeg/Default/description)
.
This package contains the FFprobe command line tool.
endef
+Package/ffprobe-custom/description = $(Package/ffprobe/description)
define Package/ffserver
$(call Package/ffmpeg/Default)
VARIANT:=full
endef
+define Package/ffserver-custom
+$(call Package/ffmpeg/Default)
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE+= streaming server (custom)
+ DEPENDS+= @!ALL libffmpeg-custom
+ VARIANT:=custom
+endef
+
define Package/ffserver/description
$(call Package/ffmpeg/Default/description)
.
This package contains the FFmpeg streaming server.
endef
+Package/ffserver-custom/description = $(Package/ffserver/description)
+
define Package/libffmpeg/Default
$(call Package/ffmpeg/Default)
SECTION:=libs
FFMPEG_CONFIGURE+= --enable-nonfree
endif
- FFMPEG_CONFIGURE+= \
+ ifneq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y)
+ FFMPEG_CONFIGURE+= \
--disable-programs \
--disable-avfilter \
- --disable-postproc \
- --disable-swresample \
+ --disable-swresample
+ endif
+
+ FFMPEG_CONFIGURE+= \
--disable-swscale \
--disable-everything \
$(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_CUSTOM_ENCODER) \
--enable-libshine --enable-encoder=libshine
endif
-ifneq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),)
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
FFMPEG_CONFIGURE+= \
--enable-libx264 --enable-encoder=libx264
+else
+ FFMPEG_CONFIGURE+= --disable-postproc
endif
endif
$(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avformat,avutil} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/
+ifeq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avfilter,swresample}.{a,so*} $(1)/usr/lib/
+endif
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),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
# Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc)
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
endef
+Package/ffmpeg-custom/install = $(Package/ffmpeg/install)
+
define Package/ffprobe/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
define Package/libffmpeg-custom/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
+endif
+ifeq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avfilter,swresample}.so.* $(1)/usr/lib/
+endif
endef
# Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc)
$(eval $(call BuildPackage,ffmpeg))
$(eval $(call BuildPackage,ffprobe))
$(eval $(call BuildPackage,ffserver))
+$(eval $(call BuildPackage,ffmpeg-custom))
+$(eval $(call BuildPackage,ffprobe-custom))
+$(eval $(call BuildPackage,ffserver-custom))
$(eval $(call BuildPackage,libffmpeg-audio-dec))
$(eval $(call BuildPackage,libffmpeg-full))
$(eval $(call BuildPackage,libffmpeg-mini))