[Ffmpeg-devel] ffmpeg "wide" atom

hannes h4nne5
Tue Jul 25 15:49:12 CEST 2006


can someone please tell me how to prevent ffmpeg from setting the wide atom when
converting to mp4 container (with mpeg4 vcodec and aac acodec).
celtic_druid pointed me to these parts of the code:

static int mov_write_mdat_tag(ByteIOContext *pb, MOVContext* mov)
{
    put_be32(pb, 8);    // placeholder for extended size field (64 bit)
    put_tag(pb, "wide");

    mov->mdat_pos = url_ftell(pb);
    put_be32(pb, 0); /* size placeholder*/
    put_tag(pb, "mdat");
    return 0;
} 

...

   /* Write size of mdat tag */
    if (mov->mdat_size+8 <= UINT32_MAX) {
        url_fseek(pb, mov->mdat_pos, SEEK_SET);
        put_be32(pb, mov->mdat_size+8);
    } else {
        /* overwrite 'wide' placeholder atom */
        url_fseek(pb, mov->mdat_pos - 8, SEEK_SET);
        put_be32(pb, 1); /* special value: real atom size will be 64 bit value
after tag field */
        put_tag(pb, "mdat");
        put_be64(pb, mov->mdat_size+16);
    }

i'd just like to tell you that not all mp4 players support the wide atom (e.g.
PV Player, Nintendo Play-Yan).
is there a workaround? or can this part of the code be modified?
thanks
hannes





More information about the ffmpeg-devel mailing list