[x264-devel] Optimizing x264 for lowest memory usage

Yakov Sudeikin yakovs at setplex.com
Wed Mar 9 11:15:16 CET 2016


Yes, I used "valgrind --tool massif" to profile the memory usage.

I attach the screenshot of one of the sessions. In this particular session,
libx264 uses about 600 MB when run under valgrind, this is after only 5
minutes running, but the same pipeline run with the same settings minutes
earlier used 4GB all together, I think under valgrind the encoder simply
cannot run as fast to consume more RAM.




On Wed, Mar 9, 2016 at 2:20 AM, Henrik Gramner <henrik at gramner.com> wrote:

> On Mon, Mar 7, 2016 at 3:04 PM, Yakov Sudeikin <yakovs at setplex.com> wrote:
> > Hi, I am using x264 with GStreamer, and I experience too much memory
> > consumption 300-3000 MB per stream (not even HD), are there any
> compile-time
> > options or other tricks to reduce the RAM usage to minimum, even
> sacrificing
> > some performance? I want to run on a memory scarce system.
> >
> > Thank you.
>
> What x264 settings are you using? If you're using overly slow
> settings, try using faster ones. rc-lookahead in particular tends to
> use quite a lot of memory.
>
> However, it's a bit odd that you're getting 3GB memory usage with SD
> resolution, are you certain that it's allocated by libx264?
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20160309/412bbd27/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Selection_007.png
Type: image/png
Size: 73908 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20160309/412bbd27/attachment-0001.png>


More information about the x264-devel mailing list