Browse Source

FFMPEG: Add more custom options, add audio-only decoder option, update pkg release, copyright, add myself as pkg maintainer

Signed-off-by: Ted Hess <thess@kitschensync.net>
thess 10 years ago
parent
commit
f61fe11ce0
2 changed files with 199 additions and 3 deletions
  1. 57
    0
      multimedia/ffmpeg/Config.in
  2. 142
    3
      multimedia/ffmpeg/Makefile

+ 57
- 0
multimedia/ffmpeg/Config.in View File

105
 	depends on FFMPEG_CUSTOM_PATENTED
105
 	depends on FFMPEG_CUSTOM_PATENTED
106
 	select FFMPEG_CUSTOM_PARSER_aac
106
 	select FFMPEG_CUSTOM_PARSER_aac
107
 
107
 
108
+config FFMPEG_CUSTOM_SELECT_adpcm
109
+	bool "ADPCM (multiple types)"
110
+
108
 config FFMPEG_CUSTOM_DECODER_ac3
111
 config FFMPEG_CUSTOM_DECODER_ac3
109
 	bool "AC3"
112
 	bool "AC3"
110
 	depends on FFMPEG_CUSTOM_PATENTED
113
 	depends on FFMPEG_CUSTOM_PATENTED
111
 	select FFMPEG_CUSTOM_PARSER_ac3
114
 	select FFMPEG_CUSTOM_PARSER_ac3
112
 
115
 
116
+config FFMPEG_CUSTOM_DECODER_alac
117
+	bool "ALAC"
118
+
119
+config FFMPEG_CUSTOM_DECODER_amrnb
120
+	bool "AMR-NB"
121
+	select FFMPEG_CUSTOM_DEMUXER_amr
122
+
123
+config FFMPEG_CUSTOM_DECODER_amrwb
124
+	bool "AMR-WB"
125
+	select FFMPEG_CUSTOM_DEMUXER_amr
126
+
127
+config FFMPEG_CUSTOM_DECODER_ape
128
+	bool "APE"
129
+
113
 config FFMPEG_CUSTOM_DECODER_atrac3
130
 config FFMPEG_CUSTOM_DECODER_atrac3
114
 	bool "ATRAC3"
131
 	bool "ATRAC3"
115
 	depends on FFMPEG_CUSTOM_PATENTED
132
 	depends on FFMPEG_CUSTOM_PATENTED
116
 
133
 
117
 config FFMPEG_CUSTOM_DECODER_flac
134
 config FFMPEG_CUSTOM_DECODER_flac
118
 	bool "FLAC"
135
 	bool "FLAC"
136
+	select FFMPEG_CUSTOM_PARSER_flac
119
 
137
 
120
 config FFMPEG_CUSTOM_DECODER_gif
138
 config FFMPEG_CUSTOM_DECODER_gif
121
 	bool "GIF"
139
 	bool "GIF"
149
 	bool "MPEG-4"
167
 	bool "MPEG-4"
150
 	depends on FFMPEG_CUSTOM_PATENTED
168
 	depends on FFMPEG_CUSTOM_PATENTED
151
 
169
 
170
+config FFMPEG_CUSTOM_DECODER_mpc7
171
+	bool "Musepack 7"
172
+	select FFMPEG_CUSTOM_DEMUXER_mpc
173
+
174
+config FFMPEG_CUSTOM_DECODER_mpc8
175
+	bool "Musepack 8"
176
+	select FFMPEG_CUSTOM_DEMUXER_mpc8
177
+
152
 config FFMPEG_CUSTOM_DECODER_pcm_s16be
178
 config FFMPEG_CUSTOM_DECODER_pcm_s16be
153
 	bool "PCM signed 16-bit big-endian"
179
 	bool "PCM signed 16-bit big-endian"
154
 
180
 
159
 	bool "PNG"
185
 	bool "PNG"
160
 	select FFMPEG_CUSTOM_DECODER_zlib
186
 	select FFMPEG_CUSTOM_DECODER_zlib
161
 
187
 
188
+config FFMPEG_CUSTOM_SELECT_speex
189
+	bool "Speex"
190
+
162
 config FFMPEG_CUSTOM_DECODER_vorbis
191
 config FFMPEG_CUSTOM_DECODER_vorbis
163
 	bool "Vorbis"
192
 	bool "Vorbis"
164
 
193
 
194
+config FFMPEG_CUSTOM_DECODER_wavpack
195
+	bool "Wavpack"
196
+
165
 config FFMPEG_CUSTOM_DECODER_wmav1
197
 config FFMPEG_CUSTOM_DECODER_wmav1
166
 	bool "WMAv1"
198
 	bool "WMAv1"
167
 	depends on FFMPEG_CUSTOM_PATENTED
199
 	depends on FFMPEG_CUSTOM_PATENTED
218
 config FFMPEG_CUSTOM_DEMUXER_ac3
250
 config FFMPEG_CUSTOM_DEMUXER_ac3
219
 	bool "AC3"
251
 	bool "AC3"
220
 
252
 
253
+config FFMPEG_CUSTOM_DEMUXER_amr
254
+	bool "AMR"
255
+
256
+config FFMPEG_CUSTOM_DEMUXER_ape
257
+	bool "APE"
258
+
221
 config FFMPEG_CUSTOM_DEMUXER_flac
259
 config FFMPEG_CUSTOM_DEMUXER_flac
222
 	bool "FLAC"
260
 	bool "FLAC"
223
 
261
 
249
 config FFMPEG_CUSTOM_DEMUXER_mpegts
287
 config FFMPEG_CUSTOM_DEMUXER_mpegts
250
 	bool "MPEG-2 (TS)"
288
 	bool "MPEG-2 (TS)"
251
 
289
 
290
+config FFMPEG_CUSTOM_DEMUXER_mpc
291
+	bool "Musepack"
292
+
293
+config FFMPEG_CUSTOM_DEMUXER_mpc8
294
+	bool "Musepack 8"
295
+
252
 config FFMPEG_CUSTOM_DEMUXER_ogg
296
 config FFMPEG_CUSTOM_DEMUXER_ogg
253
 	bool "Ogg"
297
 	bool "Ogg"
254
 
298
 
261
 	bool "RTSP"
305
 	bool "RTSP"
262
 	select FFMPEG_CUSTOM_DEMUXER_rm
306
 	select FFMPEG_CUSTOM_DEMUXER_rm
263
 	select FFMPEG_CUSTOM_DEMUXER_sdp
307
 	select FFMPEG_CUSTOM_DEMUXER_sdp
308
+	select FFMPEG_CUSTOM_DEMUXER_rtp
264
 
309
 
265
 config FFMPEG_CUSTOM_DEMUXER_sdp
310
 config FFMPEG_CUSTOM_DEMUXER_sdp
266
 	bool "SDP"
311
 	bool "SDP"
267
 	select FFMPEG_CUSTOM_DEMUXER_mpegts
312
 	select FFMPEG_CUSTOM_DEMUXER_mpegts
268
 
313
 
314
+config FFMPEG_CUSTOM_DEMUXER_rtp
315
+	bool "RTP"
316
+
317
+config FFMPEG_CUSTOM_DEMUXER_wav
318
+	bool "WAV"
319
+
320
+config FFMPEG_CUSTOM_DEMUXER_wv
321
+	bool "WV"
322
+
269
 comment "Parsers ---"
323
 comment "Parsers ---"
270
 
324
 
271
 config FFMPEG_CUSTOM_PARSER_aac
325
 config FFMPEG_CUSTOM_PARSER_aac
275
 config FFMPEG_CUSTOM_PARSER_ac3
329
 config FFMPEG_CUSTOM_PARSER_ac3
276
 	bool "AC3"
330
 	bool "AC3"
277
 
331
 
332
+config FFMPEG_CUSTOM_PARSER_flac
333
+	bool "FLAC"
334
+
278
 config FFMPEG_CUSTOM_PARSER_h264
335
 config FFMPEG_CUSTOM_PARSER_h264
279
 	bool "H.264"
336
 	bool "H.264"
280
 	depends on FFMPEG_CUSTOM_PATENTED
337
 	depends on FFMPEG_CUSTOM_PATENTED

+ 142
- 3
multimedia/ffmpeg/Makefile View File

1
 #
1
 #
2
-# Copyright (C) 2006-2013 OpenWrt.org
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
 #
3
 #
4
 # This is free software, licensed under the GNU General Public License v2.
4
 # This is free software, licensed under the GNU General Public License v2.
5
 # See /LICENSE for more information.
5
 # See /LICENSE for more information.
9
 
9
 
10
 PKG_NAME:=ffmpeg
10
 PKG_NAME:=ffmpeg
11
 PKG_VERSION:=0.11.5
11
 PKG_VERSION:=0.11.5
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=4
13
 
13
 
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
15
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
16
 PKG_MD5SUM:=ea25fc252c132141f12988ed5506bfe8
16
 PKG_MD5SUM:=ea25fc252c132141f12988ed5506bfe8
17
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
17
 
18
 
18
 PKG_LICENSE:=LGPLv2.1+ GPLv2+ LGPLv3
19
 PKG_LICENSE:=LGPLv2.1+ GPLv2+ LGPLv3
19
 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
20
 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
33
 FFMPEG_CUSTOM_DECODERS:= \
34
 FFMPEG_CUSTOM_DECODERS:= \
34
 	aac \
35
 	aac \
35
 	ac3 \
36
 	ac3 \
37
+	alac \
38
+	amrnb \
39
+	amrwb \
40
+	ape \
36
 	atrac3 \
41
 	atrac3 \
37
 	flac \
42
 	flac \
38
 	gif \
43
 	gif \
44
 	mpeg2video \
49
 	mpeg2video \
45
 	mpeg4 \
50
 	mpeg4 \
46
 	mpegvideo \
51
 	mpegvideo \
52
+	mpc7 \
53
+	mpc8 \
47
 	pcm_s16be \
54
 	pcm_s16be \
48
 	pcm_s16le \
55
 	pcm_s16le \
49
 	png \
56
 	png \
50
 	vorbis \
57
 	vorbis \
58
+	wavpack \
51
 	wmav1 \
59
 	wmav1 \
52
 	wmav2 \
60
 	wmav2 \
53
 	zlib \
61
 	zlib \
67
 FFMPEG_CUSTOM_DEMUXERS:= \
75
 FFMPEG_CUSTOM_DEMUXERS:= \
68
 	aac \
76
 	aac \
69
 	ac3 \
77
 	ac3 \
78
+	amr \
79
+	ape \
70
 	avi \
80
 	avi \
71
 	flac \
81
 	flac \
72
 	ffm \
82
 	ffm \
77
 	mpegps \
87
 	mpegps \
78
 	mpegts \
88
 	mpegts \
79
 	mpegvideo \
89
 	mpegvideo \
90
+	mpc \
91
+	mpc8 \
80
 	ogg \
92
 	ogg \
81
 	rm \
93
 	rm \
82
 	rtsp \
94
 	rtsp \
95
+	rtp \
83
 	sdp \
96
 	sdp \
84
 	v4l2 \
97
 	v4l2 \
98
+	wav \
99
+	wv \
85
 
100
 
86
 FFMPEG_CUSTOM_PARSERS:= \
101
 FFMPEG_CUSTOM_PARSERS:= \
87
 	aac \
102
 	aac \
103
+	flac \
88
 	ac3 \
104
 	ac3 \
89
 	h264 \
105
 	h264 \
90
 	mpegaudio \
106
 	mpegaudio \
129
 	mp3 \
145
 	mp3 \
130
 	mpegts \
146
 	mpegts \
131
 	mpegvideo \
147
 	mpegvideo \
148
+	sdp \
132
 	rtsp \
149
 	rtsp \
133
 
150
 
134
 FFMPEG_MINI_PARSERS:= \
151
 FFMPEG_MINI_PARSERS:= \
142
 FFMPEG_MINI_PROTOCOLS := \
159
 FFMPEG_MINI_PROTOCOLS := \
143
 	file http rtp tcp udp \
160
 	file http rtp tcp udp \
144
 
161
 
162
+FFMPEG_AUDIO_DECODERS:= \
163
+	aac \
164
+	aac_latm \
165
+	ac3 \
166
+	adpcm_* \
167
+	alac \
168
+	amrnb \
169
+	amrwb \
170
+	ape \
171
+	atrac3 \
172
+	flac \
173
+	mp2 \
174
+	mp3* \
175
+	mpc7 \
176
+	mpc8 \
177
+	pcm_* \
178
+	vorbis \
179
+	wavpack \
180
+	wmav1 \
181
+	wmav2 \
182
+	wmalossless \
183
+	wmapro \
184
+	zlib \
185
+
186
+FFMPEG_AUDIO_DEMUXERS:= \
187
+	aac \
188
+	ac3 \
189
+	aiff \
190
+	amr \
191
+	ape \
192
+	avi \
193
+	flac \
194
+	ffm \
195
+	matroska \
196
+	mp3 \
197
+	mov \
198
+	mpc \
199
+	mpc8 \
200
+	mpegts \
201
+	ogg \
202
+	rm \
203
+	rtsp \
204
+	rtp \
205
+	sdp \
206
+	wav \
207
+	wv \
208
+
209
+FFMPEG_AUDIO_PARSERS:= \
210
+	aac \
211
+	aac_latm \
212
+	flac \
213
+	ac3 \
214
+	mpegaudio \
215
+
216
+FFMPEG_AUDIO_PROTOCOLS:= \
217
+	file http rtp tcp udp
218
+
219
+
145
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
220
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
146
 
221
 
147
 PKG_CONFIG_DEPENDS:= \
222
 PKG_CONFIG_DEPENDS:= \
226
 define Package/libffmpeg-custom
301
 define Package/libffmpeg-custom
227
 $(call Package/libffmpeg/Default)
302
 $(call Package/libffmpeg/Default)
228
  TITLE+= (mini)
303
  TITLE+= (mini)
229
- DEPENDS+= @DEVEL
304
+ DEPENDS+= @DEVEL +libspeex
230
  VARIANT:=custom
305
  VARIANT:=custom
231
  MENU:=1
306
  MENU:=1
232
 endef
307
 endef
242
 endef
317
 endef
243
 
318
 
244
 
319
 
320
+define Package/libffmpeg-audio-dec
321
+$(call Package/libffmpeg/Default)
322
+ TITLE+= (audio)
323
+ DEPENDS+= @DEVEL +libspeex
324
+ VARIANT:=audio-dec
325
+endef
326
+
327
+define Package/libffmpeg-audio-dec/description
328
+$(call Package/ffmpeg/Default/description)
329
+ .
330
+ This package contains FFmpeg shared libraries for audio decoding
331
+endef
332
+
333
+
245
 define Package/libffmpeg-full
334
 define Package/libffmpeg-full
246
 $(call Package/libffmpeg/Default)
335
 $(call Package/libffmpeg/Default)
247
  TITLE+= (full)
336
  TITLE+= (full)
292
 	--disable-doc \
381
 	--disable-doc \
293
 	--disable-dxva2 \
382
 	--disable-dxva2 \
294
 	--enable-pthreads \
383
 	--enable-pthreads \
384
+	--disable-optimizations \
295
 	--enable-small \
385
 	--enable-small \
296
 	--disable-stripping \
386
 	--disable-stripping \
297
 	--enable-zlib \
387
 	--enable-zlib \
321
 	$(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
411
 	$(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
322
 	$(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
412
 	$(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
323
 
413
 
414
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
415
+  FFMPEG_CONFIGURE+= \
416
+	--enable-decoder=adpcm_ima_wav \
417
+	--enable-decoder=adpcm_ima_qt \
418
+	--enable-decoder=adpcm_ms \
419
+
420
+endif
421
+
422
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y)
423
+  FFMPEG_CONFIGURE+= \
424
+	--enable-libspeex --enable-decoder=libspeex \
425
+
426
+endif
427
+
428
+endif
429
+
430
+ifeq ($(BUILD_VARIANT),audio-dec)
431
+
432
+  FFMPEG_ENABLE= \
433
+	$(foreach c, $(2), \
434
+		--enable-$(1)="$(c)" \
435
+	)
436
+
437
+  FFMPEG_CONFIGURE+= \
438
+	--disable-ffmpeg \
439
+	--disable-ffplay \
440
+	--disable-ffprobe \
441
+	--disable-ffserver \
442
+	--disable-avfilter \
443
+	--disable-postproc \
444
+	--disable-swresample \
445
+	--disable-swscale \
446
+	--disable-everything \
447
+	$(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
448
+	$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
449
+	$(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
450
+	$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
451
+	--enable-libspeex --enable-decoder=libspeex \
452
+	--disable-decoder=pcm_bluray,pcm_dvd \
453
+
324
 endif
454
 endif
325
 
455
 
326
 ifeq ($(BUILD_VARIANT),mini)
456
 ifeq ($(BUILD_VARIANT),mini)
382
 endef
512
 endef
383
 
513
 
384
 Build/InstallDev/mini = $(Build/InstallDev/custom)
514
 Build/InstallDev/mini = $(Build/InstallDev/custom)
515
+Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
385
 
516
 
386
 # XXX: attempt at installing "best" dev files available
517
 # XXX: attempt at installing "best" dev files available
387
 ifeq ($(BUILD_VARIANT),custom)
518
 ifeq ($(BUILD_VARIANT),custom)
390
     Build/InstallDev = $(Build/InstallDev/custom)
521
     Build/InstallDev = $(Build/InstallDev/custom)
391
   endif
522
   endif
392
 endif
523
 endif
524
+ifeq ($(BUILD_VARIANT),audio-dec)
525
+  # XXX: only install "audio-dec" dev files if -full & -mini are not selected
526
+  ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
527
+    Build/InstallDev = $(Build/InstallDev/audio-dec)
528
+  endif
529
+endif
393
 ifeq ($(BUILD_VARIANT),full)
530
 ifeq ($(BUILD_VARIANT),full)
394
   # XXX: always install "full" dev files if -full is selected
531
   # XXX: always install "full" dev files if -full is selected
395
   Build/InstallDev = $(Build/InstallDev/full)
532
   Build/InstallDev = $(Build/InstallDev/full)
427
 endef
564
 endef
428
 
565
 
429
 Package/libffmpeg-mini/install = $(Package/libffmpeg-custom/install)
566
 Package/libffmpeg-mini/install = $(Package/libffmpeg-custom/install)
567
+Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
430
 
568
 
431
 $(eval $(call BuildPackage,ffmpeg))
569
 $(eval $(call BuildPackage,ffmpeg))
432
 $(eval $(call BuildPackage,ffprobe))
570
 $(eval $(call BuildPackage,ffprobe))
434
 $(eval $(call BuildPackage,libffmpeg-custom))
572
 $(eval $(call BuildPackage,libffmpeg-custom))
435
 $(eval $(call BuildPackage,libffmpeg-full))
573
 $(eval $(call BuildPackage,libffmpeg-full))
436
 $(eval $(call BuildPackage,libffmpeg-mini))
574
 $(eval $(call BuildPackage,libffmpeg-mini))
575
+$(eval $(call BuildPackage,libffmpeg-audio-dec))