mirror of
https://gitee.com/bianbu-linux/spacemit-openwrt-feeds
synced 2025-04-18 20:05:00 -04:00
add ffmpeg package
This commit is contained in:
parent
e5ac7b57a7
commit
4b0770c141
2 changed files with 1248 additions and 0 deletions
487
ffmpeg/Config.in
Normal file
487
ffmpeg/Config.in
Normal file
|
@ -0,0 +1,487 @@
|
|||
config FFMPEG_X86ASM
|
||||
bool "Compile x86 ASM"
|
||||
depends on (x86_64 || (i386 && !(TARGET_x86_geode || TARGET_x86_legacy)))
|
||||
help
|
||||
This compiles ffmpeg with x86 assembly optimizations. This option is needed as NASM is
|
||||
totally broken with CPU_TYPE=pentium.
|
||||
default y
|
||||
|
||||
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_MINIDLNA_SUPPORT
|
||||
bool "Include support for minidlna"
|
||||
select FFMPEG_CUSTOM_DECODER_aac
|
||||
select FFMPEG_CUSTOM_DECODER_ac3
|
||||
select FFMPEG_CUSTOM_DECODER_flac
|
||||
select FFMPEG_CUSTOM_DECODER_h264 if (BUILD_PATENTED)
|
||||
select FFMPEG_CUSTOM_DECODER_hevc if (BUILD_PATENTED)
|
||||
select FFMPEG_CUSTOM_DECODER_jpegls
|
||||
select FFMPEG_CUSTOM_DECODER_mp2
|
||||
select FFMPEG_CUSTOM_DECODER_mp3
|
||||
select FFMPEG_CUSTOM_DECODER_mpeg1video
|
||||
select FFMPEG_CUSTOM_DECODER_mpeg2video
|
||||
select FFMPEG_CUSTOM_DECODER_mpeg4
|
||||
select FFMPEG_CUSTOM_DECODER_mpegvideo
|
||||
select FFMPEG_CUSTOM_DECODER_png
|
||||
select FFMPEG_CUSTOM_DECODER_opus
|
||||
select FFMPEG_CUSTOM_DECODER_vc1 if (BUILD_PATENTED)
|
||||
select FFMPEG_CUSTOM_DECODER_vorbis
|
||||
select FFMPEG_CUSTOM_DECODER_wmav1
|
||||
select FFMPEG_CUSTOM_DECODER_wmav2
|
||||
select FFMPEG_CUSTOM_DEMUXER_avi
|
||||
select FFMPEG_CUSTOM_DEMUXER_flac
|
||||
select FFMPEG_CUSTOM_DEMUXER_matroska
|
||||
select FFMPEG_CUSTOM_DEMUXER_mov
|
||||
select FFMPEG_CUSTOM_DEMUXER_mp3
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpegps
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpegts
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpegvideo
|
||||
select FFMPEG_CUSTOM_DEMUXER_ogg
|
||||
select FFMPEG_CUSTOM_PROTOCOL_file
|
||||
|
||||
config FFMPEG_CUSTOM_AUDIO_DEC_SUPPORT
|
||||
bool "Include support for most audio decoding requirements"
|
||||
select FFMPEG_CUSTOM_DECODER_aac
|
||||
select FFMPEG_CUSTOM_DECODER_aac_latm
|
||||
select FFMPEG_CUSTOM_DECODER_ac3
|
||||
select FFMPEG_CUSTOM_SELECT_adpcm
|
||||
select FFMPEG_CUSTOM_DECODER_alac
|
||||
select FFMPEG_CUSTOM_DECODER_amrnb
|
||||
select FFMPEG_CUSTOM_DECODER_amrwb
|
||||
select FFMPEG_CUSTOM_DECODER_ape
|
||||
select FFMPEG_CUSTOM_DECODER_atrac3 if (BUILD_PATENTED)
|
||||
select FFMPEG_CUSTOM_DECODER_flac
|
||||
select FFMPEG_CUSTOM_DECODER_mp2
|
||||
select FFMPEG_CUSTOM_DECODER_mp3
|
||||
select FFMPEG_CUSTOM_DECODER_mpc7
|
||||
select FFMPEG_CUSTOM_DECODER_mpc8
|
||||
select FFMPEG_CUSTOM_DECODER_opus
|
||||
select FFMPEG_CUSTOM_DECODER_pcm_s16be
|
||||
select FFMPEG_CUSTOM_DECODER_pcm_s16le
|
||||
select FFMPEG_CUSTOM_DECODER_vorbis
|
||||
select FFMPEG_CUSTOM_DECODER_wavpack
|
||||
select FFMPEG_CUSTOM_DECODER_wmav1
|
||||
select FFMPEG_CUSTOM_DECODER_wmav2
|
||||
select FFMPEG_CUSTOM_DECODER_wmalossless
|
||||
select FFMPEG_CUSTOM_DECODER_wmapro
|
||||
select FFMPEG_CUSTOM_DECODER_zlib
|
||||
select FFMPEG_CUSTOM_DEMUXER_aac
|
||||
select FFMPEG_CUSTOM_DEMUXER_ac3
|
||||
select FFMPEG_CUSTOM_DEMUXER_aiff
|
||||
select FFMPEG_CUSTOM_DEMUXER_amr
|
||||
select FFMPEG_CUSTOM_DEMUXER_ape
|
||||
select FFMPEG_CUSTOM_DEMUXER_avi
|
||||
select FFMPEG_CUSTOM_DEMUXER_flac
|
||||
select FFMPEG_CUSTOM_DEMUXER_ffm
|
||||
select FFMPEG_CUSTOM_DEMUXER_matroska
|
||||
select FFMPEG_CUSTOM_DEMUXER_mp3
|
||||
select FFMPEG_CUSTOM_DEMUXER_mov
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpc
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpc8
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpegts
|
||||
select FFMPEG_CUSTOM_DEMUXER_ogg
|
||||
select FFMPEG_CUSTOM_DEMUXER_rm
|
||||
select FFMPEG_CUSTOM_DEMUXER_rtsp
|
||||
select FFMPEG_CUSTOM_DEMUXER_rtp
|
||||
select FFMPEG_CUSTOM_DEMUXER_sdp
|
||||
select FFMPEG_CUSTOM_DEMUXER_wav
|
||||
select FFMPEG_CUSTOM_DEMUXER_wv
|
||||
select FFMPEG_CUSTOM_PROTOCOL_file
|
||||
select FFMPEG_CUSTOM_PROTOCOL_http
|
||||
select FFMPEG_CUSTOM_PROTOCOL_rtp
|
||||
select FFMPEG_CUSTOM_PROTOCOL_tcp
|
||||
select FFMPEG_CUSTOM_PROTOCOL_udp
|
||||
|
||||
config FFMPEG_CUSTOM_PROGRAMS
|
||||
bool "Include ffmpeg command-line utilities"
|
||||
select PACKAGE_ffmpeg-custom
|
||||
select PACKAGE_ffprobe-custom
|
||||
|
||||
comment "External Libraries"
|
||||
|
||||
config FFMPEG_CUSTOM_SELECT_libfdk-aac
|
||||
bool "Fraunhofer FDK AAC encoding library (libfdk-aac)"
|
||||
depends on FFMPEG_CUSTOM_NONFREE
|
||||
depends on PACKAGE_fdk-aac
|
||||
|
||||
config FFMPEG_CUSTOM_SELECT_libmp3lame
|
||||
bool "Libmp3lame"
|
||||
depends on PACKAGE_lame-lib
|
||||
select FFMPEG_CUSTOM_DECODER_mp3
|
||||
select FFMPEG_CUSTOM_MUXER_mp3
|
||||
select FFMPEG_CUSTOM_DEMUXER_mp3
|
||||
|
||||
config FFMPEG_CUSTOM_SELECT_libopus
|
||||
bool "Libopus"
|
||||
|
||||
config FFMPEG_CUSTOM_SELECT_libshine
|
||||
bool "Libshine"
|
||||
|
||||
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
|
||||
select FFMPEG_CUSTOM_DEMUXER_h264
|
||||
|
||||
comment "Encoders"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_ac3
|
||||
bool "AC3"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_jpegls
|
||||
bool "JPEG-LS"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_mpeg1video
|
||||
bool "MPEG-1 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_mpeg2video
|
||||
bool "MPEG-2 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_mpeg4
|
||||
bool "MPEG-4"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_pcm_s16be
|
||||
bool "PCM signed 16-bit big-endian"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_pcm_s16le
|
||||
bool "PCM signed 16-bit little-endian"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_png
|
||||
bool "PNG"
|
||||
select FFMPEG_CUSTOM_ENCODER_zlib
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_vorbis
|
||||
bool "Vorbis"
|
||||
|
||||
config FFMPEG_CUSTOM_ENCODER_zlib
|
||||
bool "Zlib"
|
||||
|
||||
comment "Decoders"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_aac
|
||||
bool "AAC (Advanced Audio Coding)"
|
||||
|
||||
config FFMPEG_CUSTOM_SELECT_adpcm
|
||||
bool "ADPCM (multiple types)"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_ac3
|
||||
bool "AC3"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_alac
|
||||
bool "ALAC"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_amrnb
|
||||
bool "AMR-NB"
|
||||
select FFMPEG_CUSTOM_DEMUXER_amr
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_amrwb
|
||||
bool "AMR-WB"
|
||||
select FFMPEG_CUSTOM_DEMUXER_amr
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_ape
|
||||
bool "APE"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_atrac3
|
||||
bool "ATRAC3"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_flac
|
||||
bool "FLAC"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_gif
|
||||
bool "GIF"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_h264
|
||||
bool "H.264"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_hevc
|
||||
bool "HEVC / H.265 Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_jpegls
|
||||
bool "JPEG-LS"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mp2
|
||||
bool "MP2 (MPEG Audio Layer 2)"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mp3
|
||||
bool "MP3 (MPEG Audio Layer 3)"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpegvideo
|
||||
bool "MPEG Video"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpeg1video
|
||||
bool "MPEG-1 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpeg2video
|
||||
bool "MPEG-2 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpeg4
|
||||
bool "MPEG-4"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpc7
|
||||
bool "Musepack 7"
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpc
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_mpc8
|
||||
bool "Musepack 8"
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpc8
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_opus
|
||||
bool "Opus"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_pcm_s16be
|
||||
bool "PCM signed 16-bit big-endian"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_pcm_s16le
|
||||
bool "PCM signed 16-bit little-endian"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_png
|
||||
bool "PNG"
|
||||
select FFMPEG_CUSTOM_DECODER_zlib
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_vc1
|
||||
bool "VC-1 / WMV9"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_vorbis
|
||||
bool "Vorbis"
|
||||
select FFMPEG_CUSTOM_DEMUXER_ogg
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_wavpack
|
||||
bool "Wavpack"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_wmav1
|
||||
bool "WMAv1"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_wmav2
|
||||
bool "WMAv2"
|
||||
|
||||
config FFMPEG_CUSTOM_DECODER_zlib
|
||||
bool "Zlib"
|
||||
|
||||
comment "Muxers"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_ac3
|
||||
bool "AC3"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_avi
|
||||
bool "AVI"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_h264
|
||||
bool "H.264 Raw Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_hevc
|
||||
bool "HEVC / H265 Raw Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_mp3
|
||||
bool "MP3 (MPEG Audio Layer 3)"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_mp4
|
||||
bool "MP4"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_mpeg1video
|
||||
bool "MPEG-1 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_mpeg2video
|
||||
bool "MPEG-2 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_mpegts
|
||||
bool "MPEG-2 (TS)"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_ogg
|
||||
bool "Ogg"
|
||||
|
||||
config FFMPEG_CUSTOM_MUXER_rtp
|
||||
bool "RTP"
|
||||
|
||||
comment "Demuxers"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_aac
|
||||
bool "AAC"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_avi
|
||||
bool "AVI (Audio Video Interleave)"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_ac3
|
||||
bool "AC3"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_amr
|
||||
bool "AMR"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_ape
|
||||
bool "APE"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_flac
|
||||
bool "FLAC"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_h264
|
||||
bool "H.264 Raw Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_hevc
|
||||
bool "HEVC / H265 Raw Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_matroska
|
||||
bool "Matroska (MKA,MKV)"
|
||||
select FFMPEG_CUSTOM_DECODER_zlib
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mov
|
||||
bool "MOV/MP4/M4A/3GP/3G2/MJ2"
|
||||
select FFMPEG_CUSTOM_DECODER_zlib
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mp3
|
||||
bool "MP3 (MPEG Audio Layer 3)"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mpegvideo
|
||||
bool "MPEG Video (Raw)"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mpegps
|
||||
bool "MPEG-2 (PS)"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mpegts
|
||||
bool "MPEG-2 (TS)"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mpc
|
||||
bool "Musepack"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_mpc8
|
||||
bool "Musepack 8"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_ogg
|
||||
bool "Ogg"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_rm
|
||||
bool "RM"
|
||||
help
|
||||
RealMedia format demuxer
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_rtsp
|
||||
bool "RTSP"
|
||||
select FFMPEG_CUSTOM_DEMUXER_rm
|
||||
select FFMPEG_CUSTOM_DEMUXER_sdp
|
||||
select FFMPEG_CUSTOM_DEMUXER_rtp
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_sdp
|
||||
bool "SDP"
|
||||
select FFMPEG_CUSTOM_DEMUXER_mpegts
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_rtp
|
||||
bool "RTP"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_vc1
|
||||
bool "VC-1 / WMV9 Raw Video"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_wav
|
||||
bool "WAV"
|
||||
|
||||
config FFMPEG_CUSTOM_DEMUXER_wv
|
||||
bool "WV"
|
||||
|
||||
comment "Parsers"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_aac
|
||||
bool "AAC (Advanced Audio Coding)"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_ac3
|
||||
bool "AC3"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_flac
|
||||
bool "FLAC"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_h264
|
||||
bool "H.264"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
select FFMPEG_CUSTOM_DECODER_h264
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_hevc
|
||||
bool "HEVC / H265"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
select FFMPEG_CUSTOM_DECODER_hevc
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_mpegaudio
|
||||
bool "MPEG Audio"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_mpegvideo
|
||||
bool "MPEG Video"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_mpeg4video
|
||||
bool "MPEG-4 Video"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_opus
|
||||
bool "Opus"
|
||||
|
||||
config FFMPEG_CUSTOM_PARSER_vc1
|
||||
bool "VC-1 / WMV9"
|
||||
depends on FFMPEG_CUSTOM_PATENTED
|
||||
select FFMPEG_CUSTOM_DECODER_vc1
|
||||
|
||||
comment "Protocols"
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_file
|
||||
bool "file:"
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_http
|
||||
bool "http:"
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_icecast
|
||||
bool "icecast:"
|
||||
select FFMPEG_CUSTOM_PROTOCOL_http
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_pipe
|
||||
bool "pipe:"
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_rtp
|
||||
bool "rtp:"
|
||||
select FFMPEG_CUSTOM_PROTOCOL_udp
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_tcp
|
||||
bool "tcp:"
|
||||
|
||||
config FFMPEG_CUSTOM_PROTOCOL_udp
|
||||
bool "udp:"
|
||||
|
||||
|
||||
endif
|
761
ffmpeg/Makefile
Normal file
761
ffmpeg/Makefile
Normal file
|
@ -0,0 +1,761 @@
|
|||
#
|
||||
# Copyright (C) 2017-2020 Ian Leonard <antonlacon@gmail.com>
|
||||
# Copyright (C) 2018 Ted Hess <thess@kitschensync.net>
|
||||
#
|
||||
# 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:=6.1.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=bianbu-24.04
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://archive.spacemit.com/openwrt/dl/
|
||||
PKG_HASH:=04e777a00456257664b21649fb9cf076afc375d7b381b6156704e83e3d35ccff
|
||||
|
||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
|
||||
Ian Leonard <antonlacon@gmail.com>
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later LGPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
|
||||
PKG_CPE_ID:=cpe:/a:ffmpeg:ffmpeg
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
FFMPEG_CUSTOM_ENCODERS:= \
|
||||
ac3 \
|
||||
jpegls \
|
||||
mpeg1video \
|
||||
mpeg2video \
|
||||
mpeg4 \
|
||||
pcm_s16be \
|
||||
pcm_s16le \
|
||||
png \
|
||||
vorbis \
|
||||
zlib \
|
||||
|
||||
FFMPEG_CUSTOM_DECODERS:= \
|
||||
aac \
|
||||
ac3 \
|
||||
alac \
|
||||
amrnb \
|
||||
amrwb \
|
||||
ape \
|
||||
atrac3 \
|
||||
flac \
|
||||
gif \
|
||||
h264 \
|
||||
hevc \
|
||||
jpegls \
|
||||
mp2 \
|
||||
mp3 \
|
||||
mpeg1video \
|
||||
mpeg2video \
|
||||
mpeg4 \
|
||||
mpegvideo \
|
||||
mpc7 \
|
||||
mpc8 \
|
||||
pcm_s16be \
|
||||
pcm_s16le \
|
||||
png \
|
||||
vc1 \
|
||||
vorbis \
|
||||
wavpack \
|
||||
wmav1 \
|
||||
wmav2 \
|
||||
zlib \
|
||||
|
||||
FFMPEG_CUSTOM_MUXERS:= \
|
||||
ac3 \
|
||||
avi \
|
||||
ffm \
|
||||
h264 \
|
||||
hevc \
|
||||
mp3 \
|
||||
mp4 \
|
||||
mpeg1video \
|
||||
mpeg2video \
|
||||
mpegts \
|
||||
ogg \
|
||||
rtp \
|
||||
|
||||
FFMPEG_CUSTOM_DEMUXERS:= \
|
||||
aac \
|
||||
ac3 \
|
||||
amr \
|
||||
ape \
|
||||
avi \
|
||||
flac \
|
||||
ffm \
|
||||
h264 \
|
||||
hevc \
|
||||
matroska \
|
||||
mov \
|
||||
mp3 \
|
||||
mpegps \
|
||||
mpegts \
|
||||
mpegvideo \
|
||||
mpc \
|
||||
mpc8 \
|
||||
ogg \
|
||||
rm \
|
||||
rtsp \
|
||||
rtp \
|
||||
sdp \
|
||||
v4l2 \
|
||||
vc1 \
|
||||
wav \
|
||||
wv \
|
||||
|
||||
FFMPEG_CUSTOM_PARSERS:= \
|
||||
aac \
|
||||
flac \
|
||||
ac3 \
|
||||
h264 \
|
||||
hevc \
|
||||
mpegaudio \
|
||||
mpeg4video \
|
||||
mpegvideo \
|
||||
vc1 \
|
||||
|
||||
FFMPEG_CUSTOM_PROTOCOLS:= \
|
||||
file http icecast pipe rtp tcp udp
|
||||
|
||||
FFMPEG_MINI_DECODERS:= \
|
||||
ac3 \
|
||||
flac \
|
||||
jpegls \
|
||||
mp2 \
|
||||
mp3 \
|
||||
mpeg1video \
|
||||
mpeg2video \
|
||||
mpeg4 \
|
||||
mpegvideo \
|
||||
opus \
|
||||
png \
|
||||
vorbis \
|
||||
|
||||
FFMPEG_PATENTED_MINI_DECODERS:= \
|
||||
h264 \
|
||||
hevc \
|
||||
vc1 \
|
||||
|
||||
FFMPEG_MINI_DEMUXERS:= \
|
||||
avi \
|
||||
flac \
|
||||
matroska \
|
||||
mov \
|
||||
mp3 \
|
||||
mpegps \
|
||||
mpegts \
|
||||
mpegvideo \
|
||||
ogg \
|
||||
|
||||
FFMPEG_MINI_PROTOCOLS:= \
|
||||
file
|
||||
|
||||
FFMPEG_AUDIO_DECODERS:= \
|
||||
ac3 \
|
||||
adpcm_* \
|
||||
alac \
|
||||
amrnb \
|
||||
amrwb \
|
||||
ape \
|
||||
atrac3 \
|
||||
flac \
|
||||
mp2 \
|
||||
mp3* \
|
||||
mpc7 \
|
||||
mpc8 \
|
||||
opus \
|
||||
pcm_* \
|
||||
vorbis \
|
||||
wavpack \
|
||||
zlib \
|
||||
|
||||
FFMPEG_AUDIO_DEMUXERS:= \
|
||||
ac3 \
|
||||
aiff \
|
||||
amr \
|
||||
ape \
|
||||
avi \
|
||||
flac \
|
||||
ffm \
|
||||
matroska \
|
||||
mp3 \
|
||||
mov \
|
||||
mpc \
|
||||
mpc8 \
|
||||
mpegts \
|
||||
ogg \
|
||||
rm \
|
||||
rtsp \
|
||||
rtp \
|
||||
sdp \
|
||||
wav \
|
||||
wv \
|
||||
|
||||
FFMPEG_AUDIO_PROTOCOLS:= \
|
||||
file http icecast rtp tcp udp
|
||||
|
||||
FFMPEG_PATENTED_DECODERS:= \
|
||||
atrac3 \
|
||||
h264 \
|
||||
hevc \
|
||||
vc1 \
|
||||
|
||||
FFMPEG_PATENTED_MUXERS:= \
|
||||
h264 \
|
||||
hevc \
|
||||
vc1 \
|
||||
|
||||
FFMPEG_PATENTED_DEMUXERS:=$(FFMPEG_PATENTED_MUXERS)
|
||||
|
||||
FFMPEG_PATENTED_PARSERS:= \
|
||||
h264 \
|
||||
hevc \
|
||||
vc1 \
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_ENCODER_%,$(FFMPEG_CUSTOM_ENCODERS)) \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_DECODER_%,$(FFMPEG_CUSTOM_DECODERS)) \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_MUXER_%,$(FFMPEG_CUSTOM_MUXERS)) \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_DEMUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_PARSER_%,$(FFMPEG_CUSTOM_PARSERS)) \
|
||||
$(patsubst %,CONFIG_FFMPEG_CUSTOM_PROTOCOL_%,$(FFMPEG_CUSTOM_PROTOCOLS))
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ffmpeg/Default
|
||||
TITLE:=FFmpeg
|
||||
URL:=https://ffmpeg.org/
|
||||
DEPENDS+= +libpthread
|
||||
endef
|
||||
|
||||
define Package/ffmpeg/Default/description
|
||||
FFmpeg is a a software package that can record, convert and stream digital
|
||||
audio and video in numerous formats.
|
||||
|
||||
FFmpeg licensing / patent issues are complex. It is the reponsibility of the
|
||||
user to understand any requirements in this regard with its usage. See:
|
||||
https://ffmpeg.org/legal.html for further information.
|
||||
endef
|
||||
|
||||
|
||||
define Package/ffmpeg
|
||||
$(call Package/ffmpeg/Default)
|
||||
SECTION:=multimedia
|
||||
CATEGORY:=Multimedia
|
||||
TITLE+= program
|
||||
DEPENDS+= +libffmpeg-full
|
||||
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)
|
||||
SECTION:=multimedia
|
||||
CATEGORY:=Multimedia
|
||||
TITLE+= CLI media identifier
|
||||
DEPENDS+= +libffmpeg-full
|
||||
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/libffmpeg/Default
|
||||
$(call Package/ffmpeg/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE+= libraries
|
||||
DEPENDS+= +libpthread +zlib +libbz2
|
||||
PROVIDES:= libffmpeg
|
||||
endef
|
||||
|
||||
|
||||
# Package build suppressed when CONFIG_ALL=y
|
||||
define Package/libffmpeg-custom
|
||||
$(call Package/libffmpeg/Default)
|
||||
TITLE+= (custom)
|
||||
DEPENDS+= @!ALL \
|
||||
+FFMPEG_CUSTOM_SELECT_libopus:libopus \
|
||||
+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-custom/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libffmpeg-custom/description
|
||||
$(call Package/ffmpeg/Default/description)
|
||||
.
|
||||
This package contains customized FFmpeg shared libraries.
|
||||
endef
|
||||
|
||||
|
||||
define Package/libffmpeg-audio-dec
|
||||
$(call Package/libffmpeg/Default)
|
||||
TITLE+= (audio)
|
||||
VARIANT:=audio-dec
|
||||
CONFLICTS:=libffmpeg-full
|
||||
endef
|
||||
|
||||
define Package/libffmpeg-audio-dec/description
|
||||
$(call Package/ffmpeg/Default/description)
|
||||
.
|
||||
This package contains FFmpeg shared libraries for audio decoding
|
||||
endef
|
||||
|
||||
|
||||
define Package/libffmpeg-full
|
||||
$(call Package/libffmpeg/Default)
|
||||
TITLE+= (full)
|
||||
DEPENDS+= +alsa-lib +libgnutls +PACKAGE_libopus:libopus \
|
||||
+SOFT_FLOAT:shine \
|
||||
+!SOFT_FLOAT:lame-lib \
|
||||
+PACKAGE_libx264:libx264 \
|
||||
+!PACKAGE_libx264:fdk-aac
|
||||
VARIANT:=full
|
||||
PROVIDES+=libffmpeg-mini libffmpeg-audio-dec
|
||||
endef
|
||||
|
||||
|
||||
define Package/libffmpeg-full/description
|
||||
$(call Package/ffmpeg/Default/description)
|
||||
.
|
||||
This package contains full-featured FFmpeg shared libraries.
|
||||
endef
|
||||
|
||||
|
||||
define Package/libffmpeg-mini
|
||||
$(call Package/libffmpeg/Default)
|
||||
TITLE+= (mini)
|
||||
VARIANT:=mini
|
||||
CONFLICTS:=libffmpeg-full
|
||||
endef
|
||||
|
||||
define Package/libffmpeg-mini/description
|
||||
$(call Package/ffmpeg/Default/description)
|
||||
.
|
||||
This package contains minimal-featured FFmpeg shared libraries.
|
||||
endef
|
||||
|
||||
|
||||
# Strip off FPU notation
|
||||
REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
|
||||
# Fixup cpu types recogized by ffmpeg configure
|
||||
REAL_CPU_TYPE:=$(subst octeonplus,octeon+,$(REAL_CPU_TYPE))
|
||||
|
||||
FFMPEG_CONFIGURE:= \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
./configure \
|
||||
--enable-cross-compile \
|
||||
--cross-prefix="$(TARGET_CROSS)" \
|
||||
--arch="$(ARCH)" \
|
||||
$(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
|
||||
--target-os=linux \
|
||||
--prefix="/usr" \
|
||||
--pkg-config="pkg-config" \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--enable-pthreads \
|
||||
--enable-zlib \
|
||||
--disable-doc \
|
||||
--disable-debug \
|
||||
\
|
||||
--disable-lzma \
|
||||
--disable-vaapi \
|
||||
--disable-vdpau \
|
||||
--disable-outdevs
|
||||
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--disable-altivec \
|
||||
--disable-vsx \
|
||||
--disable-power8 \
|
||||
--disable-armv5te \
|
||||
--disable-armv6 \
|
||||
--disable-armv6t2 \
|
||||
--disable-fast-unaligned \
|
||||
--disable-runtime-cpudetect
|
||||
|
||||
else ifneq ($(findstring arm,$(CONFIG_ARCH))$(findstring aarch64,$(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
|
||||
|
||||
# selectively disable optimizations according to arch/cpu type
|
||||
ifneq ($(findstring arm,$(CONFIG_ARCH)),)
|
||||
FFMPEG_CONFIGURE+= --enable-lto
|
||||
|
||||
ifneq ($(findstring vfp,$(CONFIG_CPU_TYPE)),)
|
||||
FFMPEG_CONFIGURE+= --enable-vfp
|
||||
else
|
||||
FFMPEG_CONFIGURE+= --disable-vfp
|
||||
endif
|
||||
ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-neon \
|
||||
--enable-vfp
|
||||
else
|
||||
FFMPEG_CONFIGURE+= --disable-neon
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(findstring aarch64,$(CONFIG_ARCH)),)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-lto \
|
||||
--enable-neon \
|
||||
--enable-vfp
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
FFMPEG_CONFIGURE+= --enable-lto
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FFMPEG_X86ASM),y)
|
||||
FFMPEG_CONFIGURE += --enable-x86asm
|
||||
else
|
||||
FFMPEG_CONFIGURE += --disable-x86asm
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),full)
|
||||
|
||||
FFMPEG_DISABLE= \
|
||||
$(foreach c, $(2), \
|
||||
--disable-$(1)="$(c)" \
|
||||
)
|
||||
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-gnutls \
|
||||
$(if $(CONFIG_BUILD_PATENTED),, \
|
||||
$(call FFMPEG_DISABLE,decoder,$(FFMPEG_PATENTED_DECODERS)) \
|
||||
$(call FFMPEG_DISABLE,muxer,$(FFMPEG_PATENTED_MUXERS)) \
|
||||
$(call FFMPEG_DISABLE,demuxer,$(FFMPEG_PATENTED_DEMUXERS)) \
|
||||
$(call FFMPEG_DISABLE,parser,$(FFMPEG_PATENTED_PARSERS))) \
|
||||
$(if $(CONFIG_PACKAGE_libopus),--enable-libopus)
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-small \
|
||||
\
|
||||
$(if $(CONFIG_PACKAGE_shine),--enable-libshine)
|
||||
else
|
||||
ifeq ($(ARCH),x86_64)
|
||||
FFMPEG_CONFIGURE+= --enable-hardcoded-tables
|
||||
else
|
||||
FFMPEG_CONFIGURE+= --enable-small
|
||||
endif
|
||||
FFMPEG_CONFIGURE+= $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame)
|
||||
endif
|
||||
# x264 support and fdk-aac support can't coexist and be distributed.
|
||||
# Prioritize x264 over fdk-aac in default builds (maintain status-quo).
|
||||
ifneq ($(CONFIG_PACKAGE_libx264),)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-gpl \
|
||||
--enable-libx264
|
||||
else
|
||||
FFMPEG_CONFIGURE+= $(if $(CONFIG_PACKAGE_fdk-aac),--enable-libfdk-aac)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),custom)
|
||||
|
||||
FFMPEG_ENABLE= \
|
||||
$(foreach c, $(2), \
|
||||
$(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
|
||||
|
||||
ifneq ($(CONFIG_FFMPEG_CUSTOM_PROGRAMS),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--disable-programs \
|
||||
--disable-avfilter \
|
||||
--disable-swresample
|
||||
endif
|
||||
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--disable-swscale \
|
||||
--disable-everything \
|
||||
$(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_CUSTOM_ENCODER) \
|
||||
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_CUSTOM_DECODERS),CONFIG_FFMPEG_CUSTOM_DECODER) \
|
||||
$(call FFMPEG_ENABLE,muxer,$(FFMPEG_CUSTOM_MUXERS),CONFIG_FFMPEG_CUSTOM_MUXER) \
|
||||
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_CUSTOM_DEMUXERS),CONFIG_FFMPEG_CUSTOM_DEMUXER) \
|
||||
$(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
|
||||
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
|
||||
|
||||
ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-decoder=adpcm_ima_wav \
|
||||
--enable-decoder=adpcm_ima_qt \
|
||||
--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-encoder=libopus
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libshine),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-libshine --enable-encoder=libshine
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-libx264 --enable-encoder=libx264
|
||||
else
|
||||
FFMPEG_CONFIGURE+= --disable-postproc
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),audio-dec)
|
||||
|
||||
FFMPEG_ENABLE= \
|
||||
$(foreach c, $(2), \
|
||||
--enable-$(1)="$(c)" \
|
||||
)
|
||||
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-small \
|
||||
--enable-gpl \
|
||||
\
|
||||
--disable-programs \
|
||||
--disable-avfilter \
|
||||
--disable-postproc \
|
||||
--disable-swresample \
|
||||
--disable-swscale \
|
||||
--disable-everything \
|
||||
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
|
||||
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
|
||||
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
|
||||
--disable-decoder=pcm_bluray,pcm_dvd
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mini)
|
||||
|
||||
FFMPEG_ENABLE= \
|
||||
$(foreach c, $(2), \
|
||||
--enable-$(1)="$(c)" \
|
||||
)
|
||||
|
||||
FFMPEG_CONFIGURE+= \
|
||||
--enable-small \
|
||||
\
|
||||
--disable-programs \
|
||||
--disable-avdevice \
|
||||
--disable-avfilter \
|
||||
--disable-postproc \
|
||||
--disable-swresample \
|
||||
--disable-swscale \
|
||||
--disable-everything \
|
||||
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
|
||||
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
|
||||
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS)) \
|
||||
$(if $(CONFIG_BUILD_PATENTED), \
|
||||
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_PATENTED_MINI_DECODERS)))
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_TARGET_x86),)
|
||||
TARGET_CFLAGS+= -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
( cd $(PKG_BUILD_DIR); $(FFMPEG_CONFIGURE) )
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Build/InstallDev/custom
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(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)
|
||||
define Build/InstallDev/full
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(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_PACKAGE_libx264),)
|
||||
$(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
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avformat,avutil} $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
|
||||
|
||||
# XXX: attempt at installing "best" dev files available
|
||||
ifeq ($(BUILD_VARIANT),custom)
|
||||
# XXX: only install "custom" dev files if -full & -mini are not selected
|
||||
ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
|
||||
Build/InstallDev = $(Build/InstallDev/custom)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILD_VARIANT),audio-dec)
|
||||
# XXX: only install "audio-dec" dev files if -full & -mini are not selected
|
||||
ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
|
||||
Build/InstallDev = $(Build/InstallDev/audio-dec)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILD_VARIANT),full)
|
||||
# XXX: always install "full" dev files if -full is selected
|
||||
Build/InstallDev = $(Build/InstallDev/full)
|
||||
endif
|
||||
ifeq ($(BUILD_VARIANT),mini)
|
||||
# XXX: only install "mini" dev files if -full is not selected
|
||||
ifeq ($(CONFIG_PACKAGE_libffmpeg-full),)
|
||||
Build/InstallDev = $(Build/InstallDev/mini)
|
||||
endif
|
||||
endif
|
||||
|
||||
define Package/ffmpeg/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(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/
|
||||
endef
|
||||
|
||||
Package/ffprobe-custom/install = $(Package/ffprobe/install)
|
||||
|
||||
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)
|
||||
define Package/libffmpeg-full/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.so.* $(1)/usr/lib/
|
||||
ifneq ($(CONFIG_PACKAGE_libx264),)
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libffmpeg-mini/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
|
||||
|
||||
$(eval $(call BuildPackage,ffmpeg))
|
||||
$(eval $(call BuildPackage,ffprobe))
|
||||
$(eval $(call BuildPackage,ffmpeg-custom))
|
||||
$(eval $(call BuildPackage,ffprobe-custom))
|
||||
$(eval $(call BuildPackage,libffmpeg-audio-dec))
|
||||
$(eval $(call BuildPackage,libffmpeg-full))
|
||||
$(eval $(call BuildPackage,libffmpeg-mini))
|
||||
$(eval $(call BuildPackage,libffmpeg-custom))
|
Loading…
Add table
Reference in a new issue