[FFmpeg-devel] Howto flush encoder on closing?

Bitbreaker/METALVOTZE bitbreaker
Mon Jan 19 16:37:01 CET 2009

Imagine your encoder receives several frames by a multiple of 
encode_frame calls. When having reached a certain amount of frames, it 
then encodes them all in one go. Now if closing the encoder before the 
desired amount of frames was reached, the still unencoded frames will be 
dropped. A bad thing :-( So is it possible to make ffmpeg call 
encode_frame again on close_encoder? Or are there any other (nice?) 
tricks/tools/or even readymade functions to do so? Actually encoding the 
frames would be possible on close, but there is no pointer to a buffer 
available at that time, nor can i return any size information for the 
last chunk to write.

Kindest regards,


      style)KURVE - Fotografie mit Biss.
   www.style-kurve.de - info at style-kurve.de
Tobias Bindhammer, Uhlandstrasse 8, 89278 Stra?

More information about the ffmpeg-devel mailing list