drngr said:
If the problem is memory consumption, you should be able to just encode a lossless intermediate file.
I did it... it's the same! Well, I will encode the small chuncks separately as lossless files (like the main one); then, I'll join'em all to produce the final x264 encoding.