[FFmpeg-user] av_interleaved_write_frame() buffering entire file in memory?!

Thomas Worth dev at rarevision.com
Fri Dec 16 16:30:51 CET 2011


I am running into some issues with av_interleaved_write_frame(). I have
some code that takes separate video and audio files and just copies each
file's packets to a single output file. It works, but while copying the
program's memory usage skyrockets to several GB (the input files are quite
large). If I use av_write_frame(), this doesn't happen. The interesting
thing is that ffmpeg.c always writes interleaved, but it does not suffer
from this buffering issue. Is there something I need to do before writing
the packets? Do I need to modify the packets' pts values before writing?
Any help would be appreciated!


More information about the ffmpeg-user mailing list