[Ffmpeg-devel] movenc.c ipod h264 suggested change

Jason Millard jsm174
Tue Mar 28 18:52:23 CEST 2006


Hello.

I have the following code changes I would like to suggest for
movenc.c. They will allow the correct baseline/profile to be set for
ipod videos. I'm new to this, so I would like to run this by the list:

$ diff .movenc.c movenc.c
36a37
> #define MODE_IPOD 5
438c439,450
<             put_byte(pb, 66); /* profile */
---
>
>             if ( track->mode == MODE_IPOD )
>             {
>                put_byte(pb, 66); /* baseline profile */
>                put_byte(pb, 13); /* level 1.3 */
>             }
>             else
>             {
>                put_byte(pb, 77); /* profile */
>                put_byte(pb, 30); /* level */
>             }
>
440d451
<             put_byte(pb, 13); /* level */
1488c1499,1500
<     else if ( mov->mode == MODE_MP4 )
---
>     else if ( (mov->mode == MODE_MP4) ||
>               (mov->mode == MODE_IPOD) )
1501c1513,1514
<     else if ( mov->mode == MODE_MP4 )
---
>     else if ( (mov->mode == MODE_MP4) ||
>               (mov->mode == MODE_IPOD) )
1572a1586
>         else if (!strcmp("ipod", s->oformat->name)) mov->mode = MODE_IPOD;
1822a1837,1850
> static AVOutputFormat ipod_oformat = {
>     "ipod",
>     "iPod mp4 format",
>     NULL,
>     "mp4,ipod",
>     sizeof(MOVContext),
>     CODEC_ID_AAC,
>     CODEC_ID_MPEG4,
>     mov_write_header,
>     mov_write_packet,
>     mov_write_trailer,
>     .flags = AVFMT_GLOBALHEADER,
> };
>
1843a1872
>     av_register_output_format(&ipod_oformat);

This code will only change the profile/level for h264 when -f ipod is used.

Thanks,
-- Jason





More information about the ffmpeg-devel mailing list