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

Baptiste Coudurier baptiste.coudurier
Fri Feb 11 04:07:24 CET 2011


Hi,

On 02/10/2011 06:31 PM, Takashi Mochizuki wrote:
>> if (trk->entry == 0)
>>      trk->cluster[0].flags = MOV_SYNC_SAMPLE;
>
> Thanks. Patch updated.
>
>
>> No they can't, if this is the case, your file is actually _closed gop_
>> but not marked as so.
>
> I uses following test clip (mpeg2+mp2).ts.
>
> http://www003.upp.so-net.ne.jp/mycometg3/ts-remux.zip
>
> With/Without Apple MPEG2 Playback component, it seems to be playable by
> QuickTime Player X/QuickTime Player 7 with Perian. Is this not true OpenGOP?
>
>
>> FCP uses it for exactly that same reason, except that it will _keep_ the
>> keyframe before so the 2 b frames can be decoded.
>
> OK. I don't have FCP though, current movenc.c build both ctls atom and edls atom.
> Please check above sample by FCP.
>

I think you are mixing 2 patches here.
To make the first sample as sync sample, you only the one line and you 
don't need the dummy atom.
I think the following is even more simpler:
if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO &&
     trk->entry > 0) { // force sync sample for the first key frame

Please check the coding style too.
Here it's:

if (test) {

}

What's the other change about ?
If it's about missing pts, you can compute it correctly from the other 
samples, mpeg-2 reordering is simple.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list