Frame lost while saving videos from camera using jetson nano B01

Hi,
Please try matroskamux plugin. Here is a sample for reference:
Displaying to the screen with OpenCV and GStreamer - #9 by DaneLLL

For using qtmux, you would need to send End-of-Stream signal in termination to get a valid mp4 file.