We are using ffmpeg for live capture, most formats run perfectly
however, mpeg4, and 3gp formats seem to have a memory leak. Well maybe
not a real memory leak, but symptoms exactly none the less... from what
I heard it allocates the index and such for every frame in memory
because it conforms to an older mpeg4 spec. 

ffmpeg's API (av_write_frame(), function which is used to write frame to
file, this function depends on file format. for
mov/3gp/3g2/mp4/h264/h263 it is mov_write_packet()this function while
writing frame to disk build file index (stores position of frame on the
disk). this index is required for file header and it shows where each
frame is on the disk. because of early ISO/IEC design decisions file
header SHALL be saved in one piece in any position of file. since we use
ffmpeg in 'capture' mode (directshow filter wrapper) it does not know
header size in advance, etc and therefore saves it after writing ALL
frames to disk. So if you are writing 24x7 ffmpeg builds index for all
frames written to disk in memory until you stop writing then it will
flush index. since we don't stop it will run out of memory at some
point. 


Is there a way to get ffmpeg to output the index to a temp file instead
of memory, or will a newer iso implementation to allow fragmented
headers be used???

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to