[x264-devel] [PATCH] incorrect dts offsets fix

Gil Pedersen gil at cmi.aau.dk
Fri Aug 20 15:38:24 CEST 2010


On 26/07/2010, at 18.56, aviad rozenhek wrote:

> I have the following problem:
> i'm feeding frames at 25fps, but the first frame i'm feeding into x264 has timestamp=3000ms
> 
> 3000
> 3040
> 3080
> 3120
> 3160
> ...
> 
> I'm getting back the following dts/pts pairs:
> 
> -80 / 3000
> -40 / 3040
> 0    / 3080
> 3040 / 3120
> 3080 / 3160
> ...
> 
> I believe the correct dts/pts pairs should be:
> 
> 2920 / 3000
> 2960 / 3040
> 3000 / 3080
> 3040 / 3120
> 3080 / 3160
> ...
> 
> I'm using using x264 r1629, with "slow" preset and vfr settings.

I was experiencing a similar problem so I took the time to investigate the issue and it turns out x264 assumes that the first PTS is always 0. I have attached a small patch that removes this assumption. If it is included in the repository, the X264_BUILD value should probably be bumped so we can detect whether x264 supports initial values of PTS != 0.

Regards,
Gil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dtsfix.diff
Type: application/octet-stream
Size: 1453 bytes
Desc: dtsfix.diff
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20100820/77a24cd2/attachment.obj>


More information about the x264-devel mailing list