1
|
include Makefile.include
|
2
|
|
3
|
CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
|
4
|
|
5
|
WORK=$(PWD)
|
6
|
|
7
|
.PHONY : all
|
8
|
all: checkout configure compile
|
9
|
|
10
|
.PHONY : copy
|
11
|
copy:
|
12
|
find ffmpeg -name '*.so*' -exec cp {} . \;
|
13
|
$(HOST)-strip *.so*
|
14
|
|
15
|
.PHONY : compile
|
16
|
compile:
|
17
|
+$(MAKE) -j$(shell nproc) -C ffmpeg
|
18
|
|
19
|
.PHONY : configure
|
20
|
configure:
|
21
|
cd ffmpeg; \
|
22
|
CFLAGS="$(CFLAGS) $(INCLUDES)" \
|
23
|
LDFLAGS="" \
|
24
|
./configure \
|
25
|
--extra-cflags="-mfpu=vfp -mfloat-abi=${FLOAT} -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \
|
26
|
--enable-omx \
|
27
|
--enable-omx-rpi \
|
28
|
--enable-indev=v4l2 \
|
29
|
--enable-cross-compile \
|
30
|
--enable-shared \
|
31
|
--disable-static \
|
32
|
--arch=arm \
|
33
|
--cpu=arm1176jzf-s \
|
34
|
--target-os=linux \
|
35
|
--disable-hwaccels \
|
36
|
--enable-parsers \
|
37
|
--disable-muxers \
|
38
|
--disable-filters \
|
39
|
--disable-encoders \
|
40
|
--disable-devices \
|
41
|
--disable-programs \
|
42
|
--enable-shared \
|
43
|
--disable-doc \
|
44
|
--disable-postproc \
|
45
|
--enable-gpl \
|
46
|
--enable-version3 \
|
47
|
--enable-protocols \
|
48
|
--disable-libsmbclient \
|
49
|
--disable-libssh \
|
50
|
--enable-nonfree \
|
51
|
--disable-openssl \
|
52
|
--enable-pthreads \
|
53
|
--enable-pic \
|
54
|
--disable-armv5te \
|
55
|
--disable-neon \
|
56
|
--enable-armv6t2 \
|
57
|
--enable-armv6 \
|
58
|
--enable-hardcoded-tables \
|
59
|
--disable-runtime-cpudetect \
|
60
|
--disable-debug \
|
61
|
--disable-crystalhd \
|
62
|
--disable-decoder=h264_vda \
|
63
|
--disable-decoder=h264_crystalhd \
|
64
|
--disable-decoder=h264_vdpau \
|
65
|
--disable-decoder=vc1_crystalhd \
|
66
|
--disable-decoder=wmv3_crystalhd \
|
67
|
--disable-decoder=wmv3_vdpau \
|
68
|
--disable-decoder=mpeg1_vdpau \
|
69
|
--disable-decoder=mpeg2_crystalhd \
|
70
|
--disable-decoder=mpeg4_crystalhd \
|
71
|
--disable-decoder=mpeg4_vdpau \
|
72
|
--disable-decoder=mpeg_vdpau \
|
73
|
--disable-decoder=mpeg_xvmc \
|
74
|
--disable-decoder=msmpeg4_crystalhd \
|
75
|
--disable-decoder=vc1_vdpau \
|
76
|
--enable-decoder=mpegvideo \
|
77
|
--enable-decoder=mpeg1video \
|
78
|
--enable-decoder=mpeg2video \
|
79
|
--disable-decoder=mvc1 \
|
80
|
--disable-decoder=mvc2 \
|
81
|
--disable-decoder=h261 \
|
82
|
--disable-decoder=h263 \
|
83
|
--disable-decoder=rv10 \
|
84
|
--disable-decoder=rv20 \
|
85
|
--enable-decoder=mjpeg \
|
86
|
--enable-decoder=mjpegb \
|
87
|
--disable-decoder=sp5x \
|
88
|
--disable-decoder=jpegls \
|
89
|
--enable-decoder=mpeg4 \
|
90
|
--disable-decoder=rawvideo \
|
91
|
--disable-decoder=msmpeg4v1 \
|
92
|
--disable-decoder=msmpeg4v2 \
|
93
|
--disable-decoder=msmpeg4v3 \
|
94
|
--disable-decoder=wmv1 \
|
95
|
--disable-decoder=wmv2 \
|
96
|
--disable-decoder=h263p \
|
97
|
--disable-decoder=h263i \
|
98
|
--disable-decoder=svq1 \
|
99
|
--disable-decoder=svq3 \
|
100
|
--disable-decoder=dvvideo \
|
101
|
--disable-decoder=huffyuv \
|
102
|
--disable-decoder=cyuv \
|
103
|
--enable-decoder=h264 \
|
104
|
--disable-decoder=indeo3 \
|
105
|
--disable-decoder=vp3 \
|
106
|
--enable-decoder=theora \
|
107
|
--disable-decoder=asv1 \
|
108
|
--disable-decoder=asv2 \
|
109
|
--disable-decoder=ffv1 \
|
110
|
--disable-decoder=vcr1 \
|
111
|
--disable-decoder=cljr \
|
112
|
--disable-decoder=mdec \
|
113
|
--disable-decoder=roq \
|
114
|
--disable-decoder=xan_wc3 \
|
115
|
--disable-decoder=xan_wc4 \
|
116
|
--disable-decoder=rpza \
|
117
|
--disable-decoder=cinepak \
|
118
|
--disable-decoder=msrle \
|
119
|
--disable-decoder=msvideo1 \
|
120
|
--disable-decoder=idcin \
|
121
|
--disable-decoder=smc \
|
122
|
--disable-decoder=flic \
|
123
|
--disable-decoder=truemotion1 \
|
124
|
--disable-decoder=vmdvideo \
|
125
|
--disable-decoder=mszh \
|
126
|
--disable-decoder=zlib \
|
127
|
--disable-decoder=qtrle \
|
128
|
--disable-decoder=snow \
|
129
|
--disable-decoder=tscc \
|
130
|
--disable-decoder=ulti \
|
131
|
--disable-decoder=qdraw \
|
132
|
--disable-decoder=qpeg \
|
133
|
--disable-decoder=png \
|
134
|
--disable-decoder=ppm \
|
135
|
--disable-decoder=pbm \
|
136
|
--disable-decoder=pgm \
|
137
|
--disable-decoder=pgmyuv \
|
138
|
--disable-decoder=pam \
|
139
|
--disable-decoder=ffvhuff \
|
140
|
--disable-decoder=rv30 \
|
141
|
--disable-decoder=rv40 \
|
142
|
--enable-decoder=vc1 \
|
143
|
--enable-decoder=wmv3 \
|
144
|
--disable-decoder=loco \
|
145
|
--disable-decoder=wnv1 \
|
146
|
--disable-decoder=aasc \
|
147
|
--disable-decoder=indeo2 \
|
148
|
--disable-decoder=fraps \
|
149
|
--disable-decoder=truemotion2 \
|
150
|
--disable-decoder=bmp \
|
151
|
--disable-decoder=cscd \
|
152
|
--disable-decoder=mmvideo \
|
153
|
--disable-decoder=zmbv \
|
154
|
--disable-decoder=avs \
|
155
|
--disable-decoder=nuv \
|
156
|
--disable-decoder=kmvc \
|
157
|
--disable-decoder=flashsv \
|
158
|
--disable-decoder=cavs \
|
159
|
--disable-decoder=jpeg2000 \
|
160
|
--disable-decoder=vmnc \
|
161
|
--disable-decoder=vp5 \
|
162
|
--enable-decoder=vp6 \
|
163
|
--enable-decoder=vp6f \
|
164
|
--disable-decoder=targa \
|
165
|
--disable-decoder=dsicinvideo \
|
166
|
--disable-decoder=tiertexseqvideo \
|
167
|
--disable-decoder=tiff \
|
168
|
--disable-decoder=gif \
|
169
|
--disable-decoder=dxa \
|
170
|
--disable-decoder=thp \
|
171
|
--disable-decoder=sgi \
|
172
|
--disable-decoder=c93 \
|
173
|
--disable-decoder=bethsoftvid \
|
174
|
--disable-decoder=ptx \
|
175
|
--disable-decoder=txd \
|
176
|
--disable-decoder=vp6a \
|
177
|
--disable-decoder=amv \
|
178
|
--disable-decoder=vb \
|
179
|
--disable-decoder=pcx \
|
180
|
--disable-decoder=sunrast \
|
181
|
--disable-decoder=indeo4 \
|
182
|
--disable-decoder=indeo5 \
|
183
|
--disable-decoder=mimic \
|
184
|
--disable-decoder=rl2 \
|
185
|
--disable-decoder=escape124 \
|
186
|
--disable-decoder=dirac \
|
187
|
--disable-decoder=bfi \
|
188
|
--disable-decoder=motionpixels \
|
189
|
--disable-decoder=aura \
|
190
|
--disable-decoder=aura2 \
|
191
|
--disable-decoder=v210x \
|
192
|
--disable-decoder=tmv \
|
193
|
--disable-decoder=v210 \
|
194
|
--disable-decoder=dpx \
|
195
|
--disable-decoder=frwu \
|
196
|
--disable-decoder=flashsv2 \
|
197
|
--disable-decoder=cdgraphics \
|
198
|
--disable-decoder=r210 \
|
199
|
--disable-decoder=anm \
|
200
|
--disable-decoder=iff_ilbm \
|
201
|
--disable-decoder=kgv1 \
|
202
|
--disable-decoder=yop \
|
203
|
--enable-decoder=vp8 \
|
204
|
--disable-decoder=webp \
|
205
|
--disable-decoder=pictor \
|
206
|
--disable-decoder=ansi \
|
207
|
--disable-decoder=r10k \
|
208
|
--disable-decoder=mxpeg \
|
209
|
--disable-decoder=lagarith \
|
210
|
--disable-decoder=prores \
|
211
|
--disable-decoder=jv \
|
212
|
--disable-decoder=dfa \
|
213
|
--disable-decoder=wmv3image \
|
214
|
--disable-decoder=vc1image \
|
215
|
--disable-decoder=utvideo \
|
216
|
--disable-decoder=bmv_video \
|
217
|
--disable-decoder=vble \
|
218
|
--disable-decoder=dxtory \
|
219
|
--disable-decoder=v410 \
|
220
|
--disable-decoder=xwd \
|
221
|
--disable-decoder=cdxl \
|
222
|
--disable-decoder=xbm \
|
223
|
--disable-decoder=zerocodec \
|
224
|
--disable-decoder=mss1 \
|
225
|
--disable-decoder=msa1 \
|
226
|
--disable-decoder=tscc2 \
|
227
|
--disable-decoder=mts2 \
|
228
|
--disable-decoder=cllc \
|
229
|
--disable-decoder=mss2 \
|
230
|
--disable-decoder=y41p \
|
231
|
--disable-decoder=escape130 \
|
232
|
--disable-decoder=exr \
|
233
|
--disable-decoder=avrp \
|
234
|
--disable-decoder=avui \
|
235
|
--disable-decoder=ayuv \
|
236
|
--disable-decoder=v308 \
|
237
|
--disable-decoder=v408 \
|
238
|
--disable-decoder=yuv4 \
|
239
|
--disable-decoder=sanm \
|
240
|
--disable-decoder=paf_video \
|
241
|
--disable-decoder=avrn \
|
242
|
--disable-decoder=cpia \
|
243
|
--disable-decoder=bintext \
|
244
|
--disable-decoder=xbin \
|
245
|
--disable-decoder=idf \
|
246
|
--disable-decoder=hevc \
|
247
|
--enable-decoder=opus \
|
248
|
--cross-prefix=$(HOST)-
|
249
|
|
250
|
.PHONY : clean
|
251
|
clean:
|
252
|
@rm -rf ffmpeg
|
253
|
|
254
|
.PHONY : checkout
|
255
|
checkout:
|
256
|
git clone git://source.ffmpeg.org/ffmpeg ffmpeg -b release/3.3 --depth=1
|
257
|
|
258
|
.PHONY : install
|
259
|
install:
|
260
|
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
|
261
|
$(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
|
262
|
|