Continuous recording or based on an trigger?
If continuous, the exec node using ffmpeg can stay connected to a video stream and make mp4 and write it to disk on a continuous basis which would not need the mp4frag nodes.
If based on some event or trigger, such as motion detection or on a timer, you can have a 2nd exec node tell ffmpeg to read the video stream from node-red-contrib-mp4frag via the http api and make an mp4 video from that. Currently, there is no way of getting the video from node-red-contrib-mp4frag directly from within node. Show ip camera in dashboard and store prefixed buffer video