Researching about ffmpeg encoding in a VZ container, I have discovered that it is possible to get the real number of CPUs inside of a VZ container. I had to use different flags during compilation time, but it works (at least in Proxmox):

:O