Please rename setPixelFormat to setPixelInputFormat. This makes things a lot clearer imo.
Also please add an h264 .mp4 example...it's a very common target. Thanks!
e.g.
fileExt = ".mp4";
vidRecorder.setVideoCodec("libx264");
vidRecord.setPixelOutputFormat("yuv420p");