If I rescale pts and dts like this:
encodedPacket.pts = av_rescale_q( encodedPacket.pts,
outStream->codec->time_base, outStream->time_base);
encodedPacket.dts = av_rescale_q( encodedPacket.dts,
outStream->codec->time_base, outStream->time_base);
Video plays in VLC but black screen in Quicktime.
Francois
Le 14 juil. 2013 à 11:26, Luca Barbato <[email protected]> a écrit :
> On 07/14/2013 11:19 AM, Yahoo wrote:
>> If i don't set the pts values, i get after encode_video2() pts values
>> 1,2,3... If I print the encodedPkt.duration, it always return 0. Do you have
>> an example on how to rescale pts and dts values?
>>
>
> pts as in codec timebase units, so it's quite normal they are 1, 2, 3
> and so on, dts as well.
>
> you have to rescale them in the format timebase unit (that might be
> different) and then feed to the interleaver and that's all =)
>
> lu
>
> _______________________________________________
> libav-api mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-api
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api