[Libav-user] 32bit transcoding app running out of memory / setting "max_interleave_delta"

Simone Donadini Simone.Donadini at avolites.com
Wed Mar 20 12:06:47 EET 2019


Hi,

we are developing a 32bit transcoder using ffmpeg based on the transcoding example https://www.ffmpeg.org/doxygen/4.1/transcoding_8c-example.html and we are encountering some problem with memory usage transcoding files with large resolutions.

Transcoding ProRes files i noticed that memory usage would keep growing as long i reached a certain point at which i would get a message like "Delay between the first packet and last packet in the muxing queue is 10004900 > 10000000: forcing output".  When transcoding 8k files i would not get to this point as at 4GB the app would crash.

The solution at the moment is to set the output format context's "max_interleave_delta" at a value lower than 10000000 before calling avformat_write_header(). Doing this i am forcing the encoder to output frames, memory usage is kept steady, and i managed to transcode 8k files with no errors.

But is this a correct workaround? Or should i set some flag too?
I tried also to set the output context flag to AVFMT_FLAG_SHORTEST but i am not getting the same result.

Thank you,
Simone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190320/5dca4ae5/attachment.html>


More information about the Libav-user mailing list