[FFmpeg-devel] [PATCH] Re: movenc.c: Allow MPEG2.mov playable under QuickTime Player

Takashi Mochizuki mochi
Fri Feb 11 02:04:59 CET 2011


>You can do this in a simpler way, check if trk->entry is 0 in 
>mov_write_packet, and force SYNC_SAMPLE.

It also requires to patch mov_write_stss_tag(), to make both stss and stps in one func. call.
Cheking track->cluster[i].flags inside for() loop and update both stss/stps atom accordingly. 
I think it is strict, but not fast. 
Dividing stps and stss atom writer in two function seems to be better way though.

>Also you _will_ have the first 2 b frames _broken_ during playback this 
>is not wanted, you must adjust the edit list accordingly.

I think it is not required.
Under my test clip, first 2 b frame correctly handled in QuickTime (QTKit apps) without edts hack.

edts hack is common way for mp4 container. But it is not applied if it is mov container. 
(QuickTime uses edls-elst atom for just cut/copy/paste/trim media, not for frame adjust)

Takashi Mochizuki



More information about the ffmpeg-devel mailing list