[x264-devel] hybrid frame source

BugMaster BugMaster at narod.ru
Fri Jan 13 07:41:44 CET 2017


On Fri, 13 Jan 2017 16:12:59 +1100, YIRAN LI wrote:
> 2017-01-13 15:08 GMT+11:00 YIRAN LI <mrfun.china at gmail.com>:

> Hi guys,

Hi.

> I'm trying to convert a sequence of video frames, first half 30
> fps, second half 25 fps. Can X264 encode such frame sequence and output timestamps same as input.

> I mean if the time stamps of frames sent to x264 is like:

> 0, 0.333, 0.666, 0,999, 1.25, 1,5, 1.75 2.0

This looks like 3- and 4-fps sequence. For 30- ans 25-fps time stamps should be:
0, 0.0333(3), 0.0666(6), 0.1, 0.14, 0.18, 0.22, 0.26

> can x264 accept them? will 8 encoded frames be output? will output
> frames duration still 0.333, 0.333, 0.333, 0.333 then 0.25, 0.25, 0.25, 0.25?

> Thanks 

> ​Hi, just to clarify that I'm not using the x264 command line tool,
> I'm using the API. I think I can't use force-cfr or -fps, but I also
> can't set timebase in this case, can I ?​

For 3- ans 4-fps you can use VFR encoding with timebase 1/12 and i_pts of:
0, 4, 8, 12, 15, 18, 21, 24

For 30- ans 25-fps you can use VFR encoding with timebase 1/150 and i_pts of:
0, 5, 10, 15, 21, 27, 33, 39

Anyway time stamps are really part of container not of raw H.264 so if
you don't need VFR ratecontrol than you can encode it at any fps and
mux with correct time stamps latter.



More information about the x264-devel mailing list