[x264-devel] hybrid frame source

Daniel Tisch daniel at tisch.hu
Fri Jan 13 08:12:10 CET 2017


As BugMaster stated, fps/timestamps in the encoder are just used for
precise ratecontrol purposes, and in case of VFR, timestamps override FPS.
To be able to get the frames with correct timestamps at decoding time, you
must have correct, VFR-aware muxing to some container.

2017-01-13 7:48 GMT+01:00 YIRAN LI <mrfun.china at gmail.com>:

>
>
> 2017-01-13 17:33 GMT+11:00 Daniel Tisch <tisch.daniel at gmail.com>:
>
>> You need to use "
>> ​​
>> b_vfr_input", "i_timebase_num" and "
>> ​​
>> i_timebase_den" in x264_param_t when you setup the encoder, and use
>> "i_pts" in x264_picture_t correctly for the set timebase with each frame
>> you push to the encoder.
>>
>> ​Hi Daniel,
>
> in x264_encoder_open->x264_validate_parameters() I can see​
>
> ​    if( !h->param.i_fps_num || !h->param.i_fps_den )
>     {
>         h->param.i_fps_num = 25;
>         h->param.i_fps_den = 1;
>     }
>
> if I set
>> b_vfr_input to 1, and set
>> i_timebase_num+den correctly, will the default 25 fps cause output to be
> 25?
>
>>
>> 2017-01-13 6:12 GMT+01:00 YIRAN LI <mrfun.china at gmail.com>:
>>
>>> 2017-01-13 15:08 GMT+11:00 YIRAN LI <mrfun.china at gmail.com>:
>>>
>>>> Hi guys,
>>>>
>>>> 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
>>>>
>>>> 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 ?​
>>>
>>>
>>> _______________________________________________
>>> x264-devel mailing list
>>> x264-devel at videolan.org
>>> https://mailman.videolan.org/listinfo/x264-devel
>>>
>>>
>>
>> _______________________________________________
>> x264-devel mailing list
>> x264-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x264-devel
>>
>>
>
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20170113/e0a49c89/attachment.html>


More information about the x264-devel mailing list