[FFmpeg-devel] [PATCH] add uuid box to MP4 to make h.264 play on iPod

Mark Himsley mark
Sun Feb 24 17:41:26 CET 2008


Michael Niedermayer wrote:
> On Sat, Feb 23, 2008 at 12:14:43PM +0000, Mark Himsley wrote:
>   
>> -    else if(track->enc->codec_id == CODEC_ID_H264)
>> +    else if(track->enc->codec_id == CODEC_ID_H264) {
>>          mov_write_avcc_tag(pb, track);
>> +        if(track->mode == MODE_IPOD)
>> +            mov_write_uuid_tag_ipod(pb);
>> +    }
>>     
>
> Why is this h.264 specific?
>   

Because, as I understand it, the uuid tag is only required by Apple for 
H.264 material.
 
>> @@ -1454,6 +1472,7 @@
>>          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;
>>     
>
> Please keep the stuff nicely aligned vertically.
>
>   
Sorry - didn't think I was supposed to submit changes that effected only 
white space in lines that are not mine.


>>          mov_write_ftyp_tag(pb,s);
>>          if (mov->mode == MODE_PSP) {
>> @@ -1710,3 +1729,19 @@
>>      .codec_tag = (const AVCodecTag*[]){codec_3gp_tags, 0},
>>  };
>>  #endif
>> +#ifdef CONFIG_IPOD_MUXER
>> +AVOutputFormat ipod_muxer = {
>> +    "ipod",
>> +    "iPod H.264 mp4 format",
>>     
>              ^^^^^
>   
>> +    "application/mp4",
>> +    "mp4",
>> +    sizeof(MOVContext),
>> +    CODEC_ID_AAC,
>> +    CODEC_ID_MPEG4,
>>     
>                 ^^^^^
>
> this looks odd
>   

That's a good point. Thank you.

>> +    mov_write_header,
>> +    mov_write_packet,
>> +    mov_write_trailer,
>> +    .flags = AVFMT_GLOBALHEADER,
>> +    .codec_tag = (const AVCodecTag*[]){ff_mp4_obj_type, 0},
>>     
>                                           ^^^^^^^^^^^^^^^
> Are they all supported? if not please create a seperate list with just the
> ones supported!
>   

I have no idea if they are all supported (or will be supported by any 
update Apple throws in).
To be honest I doubt they are all supported on the PSP either but that 
gets away with the same definition ;-)

Amended patch with your concerns addressed attached


-- 
Mark
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-ipod.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080224/41b2babf/attachment.asc>



More information about the ffmpeg-devel mailing list