Hi Mark,

On Fri, May 27, 2011 at 9:49 AM, Mark Kenna
<[email protected]> wrote:
> Hi Guys
>
> I'm having a hard time getting my head around encoding variable frame rate
> containers in LibAV. I have taken the 'output_example.c' program and
> modified it to encode to FLV. What I would like to know is how I would
> modify the 'output_example.c' program to write variable time stamp values
> into the output file. For my project I will be taking a streaming input
> source (which will not have time-stamp information) and will need to create
> my own timestamp values (I guess from the delta value between the last
> received frame and the current frame?).
>
> I have read that you need to set the time base value to:
>        c->time_base.num=1;
>        c->time_base.den=1000;
>
> But I am not sure exactly what I should be setting the encoded packet's PTS
> values to?

This means "each pts value has a fractional unit of 1/1000th", or in
other words, millisecond precision. So if your timestamps are 10ms,
22ms, 38ms, then pts would be 10, 22 and 38.

Ronald
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to