[Ffmpeg-devel] Re: [PATCH] x264 avc encoding, movenc avcC, ctts

Baptiste COUDURIER baptiste.coudurier
Mon Feb 20 11:49:21 CET 2006


Luca Abeni wrote:
> 
> [...]
> I think the standard (MPEG4 part 10) defines a precise syntax for raw
> H.264 streams, and I think this is what the encoder should produce.
> Where is the avc syntax defined? I only have a draft of the standard,
> but the word "avc" appears in it only one time, in the title:
> "Draft ITU-T Recommendation and Final Draft International Standard
> of Joint Video Specification (ITU-T Rec. H.264 | ISO/IEC 14496-10 AVC)".
> If the format needs to rearrange things in a different way, I think it
> is the mov muxer's job to do so...
> 

Probably, I agree on that. But we need to define exactly what is a RAW
H264 stream. With syncwords, without ? Also notice that, in that case,
mov muxer needs to decode nals, find syncword, find size, erase
syncword, write size, which I think would be faster and easier to do in
x264.c, so I think 'If (is_avc)' is not that stupid after all.

> [...]
> 
> instead of doing something like
>  x264_encoder_headers(x4->enc, &nal, &nnal);
>  for(i = 0; i < nnal; i++){
>         int s = x264_nal_encode(p, &size, 1, nals + i);
>  ...
> you are "opening the loop" explicitly encoding only the second and the
> third NAL, right? In this way, some information is lost. The MOV muxer
> does not need the first NAL, but I have at least one program needing it.
> In my opinion, if the muxer does not need some data it can discard it,
> but the codec still has to pass such data to the user.
> 

If you are using MP4 file format then ISO-IEC 14496-15 AVC file format
defines it. And you do not include a SEI in extradata ('avcC' atom).
Since libx264 encodes SEI, SPS, PPS like I put in comments, I skip the
SEI, you are right. Which program needs it ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-devel mailing list