No, it is not possible. As once you send your first NULL-frame to x264_encoder_encode to flush frames it will stop all working threads for encoding so you will need to call x264_encoder_close/x264_encoder_open to start new encoding instance. Btw why you need to flush frames every 20 frames? Because I can't understand such use case.
Flush delayed frames every a few input frames in x264
Domanda
Hi I am new to x264 and know some basics. The encoding API routine used in x264 cli (x264.c) is summarized as:
- call
x264_encoder_open
and set up parameters. - fetch a frame from input video and encode it with
x264_encoder_encode
. - iterate 2. until input EOF or the given frame limit is reached.
- flush delayed frames.
My problem is: other than flush x264 encoder only once at the end of encoding process, is it possible or not to flush the delayed frames within step 2? For example, I want to flush the encoder manually every 20 frames (or a GOP frames) fed into x264_encoder_encode
and resume the normal process when all delayed frames are encoded. Thus as a result the video will have several flush procedures.
Regards
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow