summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorvan <[email protected]>2008-05-31 17:00:42 +0000
committervan <[email protected]>2008-05-31 17:00:42 +0000
commitafbd06d8d6151b69bbb18adf83cfab8d680c3946 (patch)
tree4e7be731854c8b8db8f87934c301c60a9155387c /contrib
parentd0550da569b56a71857c34463c5b030172d47291 (diff)
- support blu-ray, avchd & dvb x264
- support video files handled by ffmpeg (avi, mkv, mp4, etc.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Jamfile28
-rw-r--r--contrib/patch-ffmpeg.patch255
-rw-r--r--contrib/version_faad2.txt1
-rw-r--r--contrib/version_ffmpeg.txt2
4 files changed, 26 insertions, 260 deletions
diff --git a/contrib/Jamfile b/contrib/Jamfile
index 202df5c05..972c32817 100644
--- a/contrib/Jamfile
+++ b/contrib/Jamfile
@@ -57,6 +57,23 @@ actions LibA52
Wget $(SUBDIR)/a52dec.tar.gz : $(SUBDIR)/version_a52dec.txt ;
LibA52 $(SUBDIR)/lib/liba52.a : $(SUBDIR)/a52dec.tar.gz ;
+# FAAD2
+rule LibFaad2
+{
+ Depends $(<) : $(>) ;
+ Depends lib : $(<) ;
+}
+
+actions LibFaad2
+{
+ cd `dirname $(>)` && CONTRIB=`pwd` &&
+ rm -rf faad2 && (gzip -dc faad2.tar.gz | tar xf -) &&
+ cd faad2 &&
+ ./bootstrap && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && $(MAKE) && $(MAKE) install
+}
+Wget $(SUBDIR)/faad2.tar.gz : $(SUBDIR)/version_faad2.txt ;
+LibFaad2 $(SUBDIR)/lib/libfaad.a : $(SUBDIR)/faad2.tar.gz ;
+
# libavcodec
rule LibAvCodec
{
@@ -78,10 +95,13 @@ actions LibAvCodec
cd `dirname $(>)` && CONTRIB=`pwd` &&
rm -rf ffmpeg && (gzip -dc ffmpeg.tar.gz | tar xf -) &&
cd ffmpeg && $(FFMPEG_PATCH) &&
- ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscaler --disable-audio-beos --disable-shared --enable-static \
- --disable-decoders --enable-decoder=mp2 --disable-parsers --enable-parser=mpegaudio \
- --disable-encoders --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
- --disable-muxers --enable-muxer=ipod --disable-demuxers --disable-protocols --disable-bsfs &&
+ ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscale \
+ --disable-shared --enable-static --disable-encoders \
+ --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
+ --enable-libfaad --disable-ffmpeg --disable-ffserver \
+ --disable-muxers --enable-muxer=ipod --disable-bsfs \
+ --extra-cflags="-I$CONTRIB/include" \
+ --extra-ldflags="-L$CONTRIB/lib" &&
$(MAKE) && $(MAKE) install &&
$(STRIP) $CONTRIB/lib/libavcodec.a
}
diff --git a/contrib/patch-ffmpeg.patch b/contrib/patch-ffmpeg.patch
index c8b9f5288..e52731f1d 100644
--- a/contrib/patch-ffmpeg.patch
+++ b/contrib/patch-ffmpeg.patch
@@ -1,28 +1,3 @@
-Index: configure
-===================================================================
---- configure (revision 9814)
-+++ configure (working copy)
-@@ -1095,7 +1095,7 @@
- 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
- mmx="no"
- ;;
-- *20010315*) echo "BeBits gcc"
-+ *20010315*|2.95.3*) echo "BeBits gcc"
- add_cflags "-fno-expensive-optimizations"
- ;;
- esac
-Index: libavformat/Makefile
-===================================================================
---- libavformat/Makefile (revision 9814)
-+++ libavformat/Makefile (working copy)
-@@ -69,6 +69,7 @@
- OBJS-$(CONFIG_IMAGE2PIPE_MUXER) += img2.o
- OBJS-$(CONFIG_INGENIENT_DEMUXER) += raw.o
- OBJS-$(CONFIG_IPMOVIE_DEMUXER) += ipmovie.o
-+OBJS-$(CONFIG_IPOD_MUXER) += movenc.o riff.o isom.o
- OBJS-$(CONFIG_M4V_DEMUXER) += raw.o
- OBJS-$(CONFIG_M4V_MUXER) += raw.o
- OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o riff.o
Index: libavformat/tcp.c
===================================================================
--- libavformat/tcp.c (revision 9814)
@@ -41,233 +16,3 @@ Index: libavformat/tcp.c
}
s->fd = fd;
return 0;
-Index: libavformat/movenc.c
-===================================================================
---- libavformat/movenc.c (revision 9814)
-+++ libavformat/movenc.c (working copy)
-@@ -36,6 +36,7 @@
- #define MODE_PSP 3 // example working PSP command line:
- // ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4
- #define MODE_3G2 4
-+#define MODE_IPOD 5
-
- typedef struct MOVIentry {
- unsigned int flags, size;
-@@ -54,6 +55,7 @@
- long time;
- int64_t trackDuration;
- long sampleCount;
-+ long sampleDuration;
- long sampleSize;
- int hasKeyframes;
- int hasBframes;
-@@ -572,6 +574,18 @@
- return tag;
- }
-
-+static int mov_write_colr_tag(ByteIOContext *pb)
-+{
-+ put_be32( pb, 0x12 );
-+ put_tag( pb, "colr" );
-+ put_tag( pb, "nclc" );
-+ put_be16( pb, 6 );
-+ put_be16( pb, 1 );
-+ put_be16( pb, 6 );
-+ put_be32( pb, 0 );
-+ return 0x12;
-+}
-+
- static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
- {
- offset_t pos = url_ftell(pb);
-@@ -621,9 +635,22 @@
- mov_write_d263_tag(pb);
- else if(track->enc->codec_id == CODEC_ID_SVQ3)
- mov_write_svq3_tag(pb);
-- else if(track->enc->codec_id == CODEC_ID_H264)
-- mov_write_avcc_tag(pb, track);
-+ else if(track->enc->codec_id == CODEC_ID_H264) {
-+ mov_write_avcc_tag(pb, track);
-+ if (track->mode == MODE_IPOD) {
-+ put_be32(pb, 0x1C); /* size ... reports as 28 in mp4box! */
-+ put_tag(pb, "uuid");
-+ put_be32(pb, 0x6B6840F2);
-+ put_be32(pb, 0x5F244FC5);
-+ put_be32(pb, 0xBA39A51B);
-+ put_be32(pb, 0xCF0323F3);
-+ put_be32(pb, 0x00000001);
-+ put_be32(pb, 0x0000039C);
-+ }
-+ }
-
-+ mov_write_colr_tag(pb);
-+
- return updateSize (pb, pos);
- }
-
-@@ -674,46 +701,18 @@
- return atom_size;
- }
-
-+/* TODO: */
- /* Time to sample atom */
- static int mov_write_stts_tag(ByteIOContext *pb, MOVTrack* track)
- {
-- MOV_stts_t *stts_entries;
-- uint32_t entries = -1;
-- uint32_t atom_size;
-- int i;
--
-- if (track->enc->codec_type == CODEC_TYPE_AUDIO && !track->audio_vbr) {
-- stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */
-- stts_entries[0].count = track->sampleCount;
-- stts_entries[0].duration = 1;
-- entries = 1;
-- } else {
-- stts_entries = av_malloc(track->entry * sizeof(*stts_entries)); /* worst case */
-- for (i=0; i<track->entry; i++) {
-- int64_t duration = i + 1 == track->entry ?
-- track->trackDuration - track->cluster[i].dts + track->cluster[0].dts : /* readjusting */
-- track->cluster[i+1].dts - track->cluster[i].dts;
-- if (i && duration == stts_entries[entries].duration) {
-- stts_entries[entries].count++; /* compress */
-- } else {
-- entries++;
-- stts_entries[entries].duration = duration;
-- stts_entries[entries].count = 1;
-- }
-- }
-- entries++; /* last one */
-- }
-- atom_size = 16 + (entries * 8);
-- put_be32(pb, atom_size); /* size */
-+ put_be32(pb, 0x18); /* size */
- put_tag(pb, "stts");
- put_be32(pb, 0); /* version & flags */
-- put_be32(pb, entries); /* entry count */
-- for (i=0; i<entries; i++) {
-- put_be32(pb, stts_entries[i].count);
-- put_be32(pb, stts_entries[i].duration);
-- }
-- av_free(stts_entries);
-- return atom_size;
-+ put_be32(pb, 1); /* entry count */
-+
-+ put_be32(pb, track->sampleCount); /* sample count */
-+ put_be32(pb, track->sampleDuration); /* sample duration */
-+ return 0x18;
- }
-
- static int mov_write_dref_tag(ByteIOContext *pb)
-@@ -911,6 +910,10 @@
- /* Track width and height, for visual only */
- if(track->enc->codec_type == CODEC_TYPE_VIDEO) {
- double sample_aspect_ratio = av_q2d(track->enc->sample_aspect_ratio);
-+ if (track->mode == MODE_IPOD) {
-+ /* FIXME , I do not believe this is needed, bad assumption */
-+ sample_aspect_ratio = 1;
-+ }
- if( !sample_aspect_ratio ) sample_aspect_ratio = 1;
- put_be32(pb, sample_aspect_ratio * track->enc->width*0x10000);
- put_be32(pb, track->enc->height*0x10000);
-@@ -1322,6 +1325,8 @@
- for (i=0; i<mov->nb_streams; i++) {
- if(mov->tracks[i].entry <= 0) continue;
-
-+ mov->tracks[i].trackDuration =
-+ (int64_t)mov->tracks[i].sampleCount * mov->tracks[i].sampleDuration;
- mov->tracks[i].time = mov->time;
- mov->tracks[i].trackID = i+1;
- }
-@@ -1369,6 +1374,8 @@
- put_tag(pb, "MSNV");
- else if ( mov->mode == MODE_MP4 )
- put_tag(pb, "isom");
-+ else if ( mov->mode == MODE_IPOD )
-+ put_tag(pb, "isom");
- else
- put_tag(pb, "qt ");
-
-@@ -1380,6 +1387,8 @@
- put_tag(pb, "3g2a");
- else if ( mov->mode == MODE_PSP )
- put_tag(pb, "MSNV");
-+ else if ( mov->mode == MODE_IPOD )
-+ put_tag(pb, "mp41");
- else if ( mov->mode == MODE_MP4 )
- put_tag(pb, "mp41");
- else
-@@ -1466,7 +1475,8 @@
- else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3G2;
- else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
- else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
--
-+ else if (!strcmp("ipod", s->oformat->name)) mov->mode = MODE_IPOD;
-+
- mov_write_ftyp_tag(pb,s);
- if ( mov->mode == MODE_PSP ) {
- if ( s->nb_streams != 2 ) {
-@@ -1487,6 +1497,7 @@
- if(st->codec->codec_type == CODEC_TYPE_VIDEO){
- track->tag = mov_find_video_codec_tag(s, track);
- track->timescale = st->codec->time_base.den;
-+ track->sampleDuration = st->codec->time_base.num;
- av_set_pts_info(st, 64, 1, st->codec->time_base.den);
- if (track->timescale > 100000)
- av_log(NULL, AV_LOG_WARNING,
-@@ -1496,6 +1507,7 @@
- }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){
- track->tag = mov_find_audio_codec_tag(s, track);
- track->timescale = st->codec->sample_rate;
-+ track->sampleDuration = st->codec->frame_size;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
- if(!st->codec->frame_size){
- av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
-@@ -1675,6 +1687,21 @@
- .flags = AVFMT_GLOBALHEADER,
- };
- #endif
-+#ifdef CONFIG_IPOD_MUXER
-+AVOutputFormat ipod_muxer = {
-+ "ipod",
-+ "ipod mp4 format",
-+ "application/mp4",
-+ "mp4,m4v,ipod",
-+ sizeof(MOVContext),
-+ CODEC_ID_AAC,
-+ CODEC_ID_MPEG4,
-+ mov_write_header,
-+ mov_write_packet,
-+ mov_write_trailer,
-+ .flags = AVFMT_GLOBALHEADER,
-+};
-+#endif
- #ifdef CONFIG_PSP_MUXER
- AVOutputFormat psp_muxer = {
- "psp",
-Index: libavformat/allformats.c
-===================================================================
---- libavformat/allformats.c (revision 9814)
-+++ libavformat/allformats.c (working copy)
-@@ -89,6 +89,9 @@
- REGISTER_MUXDEMUX(IMAGE2PIPE, image2pipe);
- REGISTER_DEMUXER (INGENIENT, ingenient);
- REGISTER_DEMUXER (IPMOVIE, ipmovie);
-+#ifdef CONFIG_IPOD_MUXER
-+ REGISTER_MUXER (IPOD, ipod);
-+#endif
- if (!ENABLE_NUT_DEMUXER) REGISTER_DEMUXER (LIBNUT, libnut);
- REGISTER_MUXER (LIBNUT, libnut);
- REGISTER_MUXDEMUX(M4V, m4v);
-Index: libavformat/allformats.h
-===================================================================
---- libavformat/allformats.h (revision 9814)
-+++ libavformat/allformats.h (working copy)
-@@ -142,6 +142,7 @@
- extern AVOutputFormat image2pipe_muxer;
- extern AVOutputFormat image_muxer;
- extern AVOutputFormat imagepipe_muxer;
-+extern AVOutputFormat ipod_muxer;
- extern AVOutputFormat libnut_muxer;
- extern AVOutputFormat m4v_muxer;
- extern AVOutputFormat mjpeg_muxer;
diff --git a/contrib/version_faad2.txt b/contrib/version_faad2.txt
new file mode 100644
index 000000000..ad74c36cd
--- /dev/null
+++ b/contrib/version_faad2.txt
@@ -0,0 +1 @@
+http://download.m0k.org/handbrake/contrib/faad2-2.6.1.tar.gz
diff --git a/contrib/version_ffmpeg.txt b/contrib/version_ffmpeg.txt
index 15e9b5e0d..e216b4267 100644
--- a/contrib/version_ffmpeg.txt
+++ b/contrib/version_ffmpeg.txt
@@ -1 +1 @@
-http://download.m0k.org/handbrake/contrib/ffmpeg-9816.tar.gz
+http://download.m0k.org/handbrake/contrib/ffmpeg-r13110.tar.gz