Custom the output of the record file

I’m creating an application has recording with COMPOSED mode. it seems that the small frames in the final mp4 file are cut by FFMPEG on two sides. How do I get all the original frames?