3 #Uncomment the one you want
8 FFMPEG_HASH
=eaff5fcb7cde8d1614755269773d471d3a3d1bfc
9 FFMPEG_SNAPURL
:= http
://git.videolan.org
/?p
=ffmpeg.git
;a
=snapshot
;h
=$(FFMPEG_HASH
);sf
=tgz
10 FFMPEG_GITURL
:= http
://git.videolan.org
/git
/ffmpeg.git
11 FFMPEG_LAVC_MIN
:= 57.37.100
14 FFMPEG_HASH
=e171022c24c42b1e88a51bb3b4c27f13c87c85cb
15 FFMPEG_SNAPURL
:= http
://git.libav.org
/?p
=libav.git
;a
=snapshot
;h
=$(FFMPEG_HASH
);sf
=tgz
16 FFMPEG_GITURL
:= git
://git.libav.org
/libav.git
17 FFMPEG_LAVC_MIN
:= 57.16.0
20 FFMPEG_BASENAME
:= $(subst .
,_
,$(subst \
,_
,$(subst /,_
,$(FFMPEG_HASH
))))
22 # bsf=vp9_superframe is needed to mux VP9 inside webm/mkv
25 --pkg-config
="$(PKG_CONFIG)" \
27 --disable-encoder
=vorbis \
28 --disable-decoder
=opus \
35 --disable-protocol
=concat \
38 --disable-avresample \
39 --enable-bsf
=vp9_superframe
43 --disable-swresample \
50 --disable-videotoolbox \
51 --disable-securetransport
55 DEPS_ffmpeg
= zlib gsm
60 DEPS_ffmpeg
+= openjpeg
63 # Optional dependencies
65 FFMPEGCONF
+= --disable-network
68 FFMPEGCONF
+= --enable-libmp3lame
--enable-libvpx
--disable-decoder
=libvpx_vp8
--disable-decoder
=libvpx_vp9
70 FFMPEGCONF
+= --disable-decoder
=libvpx
72 DEPS_ffmpeg
+= lame
$(DEPS_lame
) vpx
$(DEPS_vpx
)
74 FFMPEGCONF
+= --disable-encoders
--disable-muxers
78 ifdef WITH_OPTIMIZATION
80 FFMPEGCONF
+= --enable-small
84 FFMPEGCONF
+= --enable-thumb
88 FFMPEGCONF
+= --optflags
=-O0
91 ifdef HAVE_CROSS_COMPILE
92 FFMPEGCONF
+= --enable-cross-compile
--disable-programs
94 FFMPEGCONF
+= --cross-prefix
=$(HOST
)-
100 FFMPEGCONF
+= --arch
=arm
102 FFMPEGCONF
+= --enable-neon
105 FFMPEGCONF
+= --cpu
=cortex-a8
108 FFMPEGCONF
+= --cpu
=armv6
--disable-neon
113 ifeq ($(ARCH
),aarch64
)
114 FFMPEGCONF
+= --arch
=aarch64
118 ifeq ($(ARCH
),mipsel
)
119 FFMPEGCONF
+= --arch
=mips
121 ifeq ($(ARCH
),mips64el
)
122 FFMPEGCONF
+= --arch
=mips64
127 ifndef HAVE_DARWIN_OS
128 FFMPEGCONF
+= --arch
=x86
133 ifeq ($(ARCH
),x86_64
)
134 ifndef HAVE_DARWIN_OS
135 FFMPEGCONF
+= --arch
=x86_64
141 FFMPEGCONF
+= --arch
=$(ARCH
) --target-os
=darwin
143 FFMPEGCONF
+= --disable-lzma
145 ifeq ($(ARCH
),x86_64
)
146 FFMPEGCONF
+= --cpu
=core2
149 FFMPEGCONF
+= --enable-pic
--extra-ldflags
="$(EXTRA_CFLAGS)"
151 FFMPEGCONF
+= --as="$(AS)"
158 FFMPEGCONF
+= --target-os
=linux
--enable-pic
--extra-libs
="-lm"
163 # broken text relocations
164 ifeq ($(ANDROID_ABI
), x86
)
165 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
167 ifeq ($(ANDROID_ABI
), x86_64
)
168 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
171 ifeq ($(ANDROID_ABI
), armeabi-v7a
)
172 FFMPEGCONF
+= --as='gas-preprocessor.pl -as-type clang -arch arm $(CC)'
179 ifndef HAVE_VISUALSTUDIO
181 ifndef HAVE_MINGW_W64
182 DEPS_ffmpeg
+= directx
185 FFMPEGCONF
+= --target-os
=mingw32
186 FFMPEGCONF
+= --enable-w32threads
188 FFMPEGCONF
+= --enable-dxva2
190 FFMPEGCONF
+= --disable-dxva2
193 ifeq ($(ARCH
),x86_64
)
194 FFMPEGCONF
+= --cpu
=athlon64
--arch
=x86_64
196 ifeq ($(ARCH
),i386
) # 32bits intel
197 FFMPEGCONF
+= --cpu
=i686
--arch
=x86
200 FFMPEGCONF
+= --arch
=arm
206 FFMPEGCONF
+= --enable-pthreads
211 ifeq ($(ARCH
),x86_64
)
212 FFMPEGCONF
+= --cpu
=core2
214 FFMPEGCONF
+= --target-os
=sunos
--enable-pic
218 FFMPEGCONF
+=--disable-inline-asm
--disable-asm
--target-os
=linux
223 ifeq ($(call need_pkg
,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale"),)
227 FFMPEGCONF
+= --nm
="$(NM)" --ar="$(AR)"
229 $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
:
230 $(call download_git
,$(FFMPEG_GITURL
),,$(FFMPEG_HASH
))
232 .sum-ffmpeg
: $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
233 $(call check_githash
,$(FFMPEG_HASH
))
236 ffmpeg
: ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz .sum-ffmpeg
237 rm -Rf
$@
$@
-$(FFMPEG_BASENAME
)
238 mkdir
-p
$@
-$(FFMPEG_BASENAME
)
239 tar xvJf
"$<" --strip-components
=1 -C
$@
-$(FFMPEG_BASENAME
)
241 $(APPLY
) $(SRC
)/ffmpeg
/armv7_fixup.patch
242 $(APPLY
) $(SRC
)/ffmpeg
/dxva_vc1_crash.patch
243 $(APPLY
) $(SRC
)/ffmpeg
/h264_early_SAR.patch
246 $(APPLY
) $(SRC
)/ffmpeg
/libav_gsm.patch
251 cd
$< && $(HOSTVARS
) .
/configure \
252 --extra-ldflags
="$(LDFLAGS)" $(FFMPEGCONF
) \
253 --prefix="$(PREFIX)" --enable-static
--disable-shared
254 cd
$< && $(MAKE
) install-libs install-headers