[Ffmpeg-devel] Frame rates and time_base

Michael Niedermayer michaelni
Sat May 7 10:56:33 CEST 2005


Hi

On Saturday 07 May 2005 00:20, Bill May wrote:
[...]
> > While encoding, only PTS is meaningful as input, and the encoder may
> > reorder the output, resulting in different values for PTS and DTS of
> > the encoded frame.
>
> I understand this, and I apologize if I did not make myself clear; is it
> possible using the existing APIs to get the PTS value of the encoded
> frame that is being returned (ie: after it is reordered) ?
>
> For example, in x264, for x264_encoder_encode, you set pic_in.i_pts to the
> timestamp of the frame to encode.
>
> pic_out.i_pts will be set to the correct PTS when there is a frame to
> output.
>
> Is there a similiar function in ffmpeg ?

the input pts is AVFrame.pts from the AVFrame you feed into 
avcodec_encode_video, the output pts is in AVCodecContext->coded_frame->pts

[...]
-- 
Michael

"nothing is evil in the beginning. Even Sauron was not so." -- Elrond





More information about the ffmpeg-devel mailing list