1 --- ffmpeg/configure 2006-09-23 14:22:08.000000000 -0400
2 +++ ffmpeg-patched/configure 2006-09-23 14:37:49.000000000 -0400
4 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
7 -*20010315*) echo "BeBits gcc"
8 +*20010315*|2.95.3*) echo "BeBits gcc"
9 add_cflags "-fno-expensive-optimizations"
12 --- ffmpeg/libavformat/movenc.c 2006-09-23 14:22:08.000000000 -0400
13 +++ ffmpeg-patched/libavformat/movenc.c 2006-09-23 14:49:42.000000000 -0400
15 #define MODE_PSP 3 // example working PSP command line:
16 // ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4
20 typedef struct MOVIentry {
21 unsigned int flags, size;
26 +static int mov_write_colr_tag(ByteIOContext *pb)
28 + put_be32( pb, 0x12 );
29 + put_tag( pb, "colr" );
30 + put_tag( pb, "nclc" );
38 static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
40 offset_t pos = url_ftell(pb);
42 mov_write_d263_tag(pb);
43 else if(track->enc->codec_id == CODEC_ID_SVQ3)
44 mov_write_svq3_tag(pb);
45 - else if(track->enc->codec_id == CODEC_ID_H264)
46 - mov_write_avcc_tag(pb, track);
47 + else if(track->enc->codec_id == CODEC_ID_H264) {
48 + mov_write_avcc_tag(pb, track);
49 + if (track->mode == MODE_IPOD) {
50 + put_be32(pb, 0x1C); /* size ... reports as 28 in mp4box! */
51 + put_tag(pb, "uuid");
52 + put_be32(pb, 0x6B6840F2);
53 + put_be32(pb, 0x5F244FC5);
54 + put_be32(pb, 0xBA39A51B);
55 + put_be32(pb, 0xCF0323F3);
56 + put_be32(pb, 0x00000001);
57 + put_be32(pb, 0x0000039C);
61 + mov_write_colr_tag(pb);
63 return updateSize (pb, pos);
66 /* Track width and height, for visual only */
67 if(track->enc->codec_type == CODEC_TYPE_VIDEO) {
68 double sample_aspect_ratio = av_q2d(track->enc->sample_aspect_ratio);
69 + if (track->mode == MODE_IPOD) {
70 + /* FIXME , I do not believe this is needed, bad assumption */
71 + sample_aspect_ratio = 1;
73 if( !sample_aspect_ratio ) sample_aspect_ratio = 1;
74 put_be32(pb, sample_aspect_ratio * track->enc->width*0x10000);
75 put_be32(pb, track->enc->height*0x10000);
78 else if ( mov->mode == MODE_MP4 )
80 + else if ( mov->mode == MODE_IPOD )
81 + put_tag(pb, "isom");
87 else if ( mov->mode == MODE_PSP )
89 + else if ( mov->mode == MODE_IPOD )
90 + put_tag(pb, "mp41");
91 else if ( mov->mode == MODE_MP4 )
95 else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3G2;
96 else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
97 else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
99 + else if (!strcmp("ipod", s->oformat->name)) mov->mode = MODE_IPOD;
101 mov_write_ftyp_tag(pb,s);
102 if ( mov->mode == MODE_PSP ) {
103 if ( s->nb_streams != 2 ) {
104 @@ -1640,6 +1675,21 @@
105 .flags = AVFMT_GLOBALHEADER,
108 +#ifdef CONFIG_IPOD_MUXER
109 +AVOutputFormat ipod_muxer = {
114 + sizeof(MOVContext),
120 + .flags = AVFMT_GLOBALHEADER,
123 #ifdef CONFIG_PSP_MUXER
124 AVOutputFormat psp_muxer = {
126 --- ffmpeg/libavformat/tcp.c 2006-09-23 14:22:08.000000000 -0400
127 +++ ffmpeg-patched/libavformat/tcp.c 2006-09-23 14:34:32.000000000 -0400
128 @@ -112,11 +112,13 @@
134 optlen = sizeof(ret);
135 getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
142 --- ffmpeg/libavformat/allformats.h 2006-09-23 14:22:08.000000000 -0400
143 +++ ffmpeg-patched/libavformat/allformats.h 2006-09-23 15:02:41.000000000 -0400
145 extern AVOutputFormat mov_muxer;
146 extern AVOutputFormat tgp_muxer;
147 extern AVOutputFormat mp4_muxer;
148 +extern AVOutputFormat ipod_muxer;
149 extern AVOutputFormat psp_muxer;
150 extern AVOutputFormat tg2_muxer;
151 extern AVInputFormat mp3_demuxer;
152 --- ffmpeg/libavformat/allformats.c 2006-09-23 14:22:08.000000000 -0400
153 +++ ffmpeg-patched/libavformat/allformats.c 2006-09-23 14:26:11.000000000 -0400
155 #ifdef CONFIG_PSP_MUXER
156 av_register_output_format(&psp_muxer);
158 +#ifdef CONFIG_IPOD_MUXER
159 + av_register_output_format(&ipod_muxer);
161 #ifdef CONFIG_TG2_MUXER
162 av_register_output_format(&tg2_muxer);
164 --- ffmpeg/libavformat/Makefile 2006-09-23 14:22:08.000000000 -0400
165 +++ ffmpeg-patched/libavformat/Makefile 2006-09-23 20:15:09.000000000 -0400
167 OBJS-$(CONFIG_TGP_MUXER) += movenc.o riff.o isom.o
168 OBJS-$(CONFIG_MP4_MUXER) += movenc.o riff.o isom.o
169 OBJS-$(CONFIG_PSP_MUXER) += movenc.o riff.o isom.o
170 +OBJS-$(CONFIG_IPOD_MUXER) += movenc.o riff.o isom.o
171 OBJS-$(CONFIG_TG2_MUXER) += movenc.o riff.o isom.o
172 OBJS-$(CONFIG_MP3_DEMUXER) += mp3.o
173 OBJS-$(CONFIG_MP2_MUXER) += mp3.o