3 #Uncomment the one you want
8 FFMPEG_HASH
=1e35519fe0b8bbad84641e83d49138152720b544
9 FFMPEG_GITURL
:= http
://git.videolan.org
/git
/ffmpeg.git
10 FFMPEG_LAVC_MIN
:= 57.37.100
13 FFMPEG_HASH
=e5afa1b556542fd7a52a0a9b409c80f2e6e1e9bb
14 FFMPEG_GITURL
:= git
://git.libav.org
/libav.git
15 FFMPEG_LAVC_MIN
:= 57.16.0
18 FFMPEG_BASENAME
:= $(subst .
,_
,$(subst \
,_
,$(subst /,_
,$(FFMPEG_HASH
))))
20 # bsf=vp9_superframe is needed to mux VP9 inside webm/mkv
23 --pkg-config
="$(PKG_CONFIG)" \
25 --disable-encoder
=vorbis \
26 --disable-decoder
=opus \
33 --disable-protocol
=concat \
37 --disable-avresample \
38 --enable-bsf
=vp9_superframe
42 --disable-swresample \
49 --disable-securetransport
53 # Disable VDA on macOS with libav
61 DEPS_ffmpeg
= zlib gsm
66 DEPS_ffmpeg
+= openjpeg
$(DEPS_openjpeg
)
69 # Optional dependencies
71 FFMPEGCONF
+= --disable-network
74 FFMPEGCONF
+= --enable-libmp3lame
75 DEPS_ffmpeg
+= lame
$(DEPS_lame
)
77 FFMPEGCONF
+= --disable-encoders
--disable-muxers
81 ifdef WITH_OPTIMIZATION
83 FFMPEGCONF
+= --enable-small
87 FFMPEGCONF
+= --enable-thumb
91 FFMPEGCONF
+= --optflags
=-Og
94 ifdef HAVE_CROSS_COMPILE
95 FFMPEGCONF
+= --enable-cross-compile
--disable-programs
97 FFMPEGCONF
+= --cross-prefix
=$(HOST
)-
103 FFMPEGCONF
+= --arch
=arm
105 FFMPEGCONF
+= --enable-neon
108 FFMPEGCONF
+= --cpu
=cortex-a8
111 FFMPEGCONF
+= --cpu
=armv6
--disable-neon
116 ifeq ($(ARCH
),aarch64
)
117 FFMPEGCONF
+= --arch
=aarch64
121 ifeq ($(ARCH
),mipsel
)
122 FFMPEGCONF
+= --arch
=mips
124 ifeq ($(ARCH
),mips64el
)
125 FFMPEGCONF
+= --arch
=mips64
130 ifndef HAVE_DARWIN_OS
131 FFMPEGCONF
+= --arch
=x86
136 ifeq ($(ARCH
),x86_64
)
137 ifndef HAVE_DARWIN_OS
138 FFMPEGCONF
+= --arch
=x86_64
144 FFMPEGCONF
+= --arch
=$(ARCH
) --target-os
=darwin
--extra-cflags
="$(CFLAGS)"
146 FFMPEGCONF
+= --disable-lzma
148 ifeq ($(ARCH
),x86_64
)
149 FFMPEGCONF
+= --cpu
=core2
152 FFMPEGCONF
+= --enable-pic
--extra-ldflags
="$(EXTRA_CFLAGS) -isysroot $(IOS_SDK)"
154 FFMPEGCONF
+= --as="$(AS)"
161 FFMPEGCONF
+= --target-os
=linux
--enable-pic
--extra-libs
="-lm"
166 # broken text relocations
167 ifeq ($(ANDROID_ABI
), x86
)
168 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
170 ifeq ($(ANDROID_ABI
), x86_64
)
171 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
177 ifndef HAVE_VISUALSTUDIO
178 DEPS_ffmpeg
+= wine-headers
180 FFMPEGCONF
+= --target-os
=mingw32
181 FFMPEGCONF
+= --enable-w32threads
183 FFMPEGCONF
+= --enable-dxva2
185 FFMPEGCONF
+= --disable-dxva2
188 ifeq ($(ARCH
),x86_64
)
189 FFMPEGCONF
+= --cpu
=athlon64
--arch
=x86_64
191 ifeq ($(ARCH
),i386
) # 32bits intel
192 FFMPEGCONF
+= --cpu
=i686
--arch
=x86
195 FFMPEGCONF
+= --arch
=arm
201 FFMPEGCONF
+= --enable-pthreads
206 ifeq ($(ARCH
),x86_64
)
207 FFMPEGCONF
+= --cpu
=core2
209 FFMPEGCONF
+= --target-os
=sunos
--enable-pic
213 FFMPEGCONF
+=--disable-inline-asm
--disable-asm
--target-os
=linux
218 ifeq ($(call need_pkg
,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale"),)
222 FFMPEGCONF
+= --nm
="$(NM)" --ar="$(AR)" --ranlib
="$(RANLIB)"
224 $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
:
225 $(call download_git
,$(FFMPEG_GITURL
),,$(FFMPEG_HASH
))
227 .sum-ffmpeg
: $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
228 $(call check_githash
,$(FFMPEG_HASH
))
231 ffmpeg
: ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz .sum-ffmpeg
234 $(APPLY
) $(SRC
)/ffmpeg
/armv7_fixup.patch
235 $(APPLY
) $(SRC
)/ffmpeg
/dxva_vc1_crash.patch
236 $(APPLY
) $(SRC
)/ffmpeg
/h264_early_SAR.patch
237 $(APPLY
) $(SRC
)/ffmpeg
/0001-avcodec-dxva2_hevc-add-support-for-parsing-HEVC-Rang.patch
238 $(APPLY
) $(SRC
)/ffmpeg
/0002-avcodec-hevcdec-allow-HEVC-444-8-10-12-bits-decoding.patch
239 $(APPLY
) $(SRC
)/ffmpeg
/0003-avcodec-hevcdec-allow-HEVC-422-10-12-bits-decoding-w.patch
242 $(APPLY
) $(SRC
)/ffmpeg
/libav_gsm.patch
247 cd
$< && $(HOSTVARS
) .
/configure \
248 --extra-ldflags
="$(LDFLAGS)" $(FFMPEGCONF
) \
249 --prefix="$(PREFIX)" --enable-static
--disable-shared
250 cd
$< && $(MAKE
) install-libs install-headers