MP4 made in FFMPEG cannot play / be opened

I am trying to make a video by combining a sequence of PNG images. It seems to be working fine except, the outputted MP4 cannot actually be opened / play with Quicktime. So basically it’s not working. I can’t figure out what the issue is or how to even go about debugging this because I don’t get an error or anything. Below is my code:

var ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
var ffmpeg = require('fluent-ffmpeg');
var command = ffmpeg();

    .on('error', (error) => { console.log('error'); })


When saving to MP4 using a typical H.264 encoder, ffmpeg will convert to YUV color encoding but pick the highest fidelity pixel format which, for a RGB source, is YUV 4:4:4. This format is not compatible with most players. Solution is to manually force YUV 4:2:0 output. Add -pix_fmt yuv420p just before the output filename.

.outputOptions('-pix_fmt yuv420p')