View Single Post
Old 17th January 2012, 01:31   #11  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by roozhou View Post
Is it impossible to add a filter that adaptively add or remove frames? Since x264 always pull frame by its frame No. instead of timestamps.
Indeed x264cli does pull frames by number, and not by pts.
It standardly reads up until the number of known frames from the result of the filter chain, or the user specified count.

As such, the only way I can see to do this as freely as you seem to be desiring it, is to have your filter set the frame count to 0.
With this, the filter system will keep processing until something returns a failure code, as it has no clue how many frames there will be.
You can then add new frames or discard frames from previous filters in the chain fairly arbitrarily upon the requests to your specific filter.

If you don't specify the frame count as 0 then removing frames arbitrarily should still be applicable,
but adding them arbitrarily can prove to be limited as x264 will only read up to a certain number of frames before stopping.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote