[Ffmpeg-devel] Re: [PATCH] PKT_FLAG_B

Michael Niedermayer michaelni
Tue Aug 8 17:39:46 CEST 2006


Hi

On Tue, Aug 08, 2006 at 03:43:49PM +0200, Baptiste Coudurier wrote:
> Baptiste Coudurier wrote:
> > [...]
> > 
> > Basically an access to the parser. Im focusing on stream copy.
> > During that process, it's mainly a matter of demuxer->muxer
> > communication, and it seems "sort of" communication can only done
> > through AVPacket atm. Im still looking for a way in GXF muxer to know
> > exactly the frame type in the packet. I probably miss some libavformat
> > features.
> > 
> 
> So, any better solution to know the frame type in AVPacket by the muxer ?
> 
> Sorry to persist, but I really need to know that for GXF muxer.

(dts==pts && has_b_frames) -> frame is a b frame, alternatively you can
just extract it out of the video packet, this is very easy, it just requires
searching for a byte sequence and then looking at the following byte
and gxf has a special case for mpeg1/2 anyway so i see no big problem with
that ...


furthermore

gxf spec:
--------------
NOTE on MPEG GoP structure target values  The parameters (I-pictures per GoP, P-pictures per I-picture and B-
pictures per I-picture) are target values provided to the MPEG encoder. The result stream may not meet this cadence at
the discretion of the encoder. These values are provided for information purposes only.
--------------

-> the relate code is wrong, values should be set to 
AVCodecContext.max_b_frames and AVCodecContext.gop_size and for the stream
copy case they are 0 or random either is fine


and the media field number should be set to dts and time line field number to
pts, not a random +=2 every frame variable

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list