How many threads are being used, highly depends on used codec, settings and hardware. Besides that, RAM is used rarely that amount by "just" 1000k bitrate with a small resolution. So you might never need about 15G of RAM.
In your case, you're setting -threads 0
which means "optimal usage" of hardware (will be set automatically by some algorithms). I do not recommend it, but you can try setting -threads 2
for 2 threads, or -threads 4
for 4 threads.
As a rule of thumb, you can set one thread per core (if you have 4 cores, use 4 threads, 8 cores - 8 threads, and so on).
Please be aware, that simultaneously encoding video at all cores and audio might result in lower speed, than another "optimal usage" calculated by ffmpeg itself. Just give it a try ;-)