I am using ffmpeg to convert a 1080p video to MP4 using this command in PHP.
$command = FFMPEG.\' -i \' . $src . \' -sameq -strict -2 -vcodec libx264 -ar 22050 -
It's not about PHP. It's about how to limit FFMPEG memory usage.
Short answer no!
Look here: http://hwdmediashare.co.uk/forum/27-development-customisation/54700-limit-ffmpeg-memory-usage