Gstreamer to recording videos with minimum file size in jetson nano

Hi, I used gstreamer command to record a video for 12 hours continuously. But the total video size is too large for 12hrs.

Gstreamer command:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM),width=1280,height=720,framerate=30/1,format=NV12" ! queue ! decodebin ! queue ! nvvidconv flip-method=0 ! clockoverlay time-format="%D %H:%M:%S:%f:%s" ! videobalance saturation=1.6 hue=0.1 ! "video/x-raw,width=1280,height=720" ! omxh264enc bitrate=750000 ! mpegtsmux ! multifilesink max-file-size=50000000 next-file=4 location=%d.mp4

The above command saving sequential video when video size reaches 50mb size .
Which contains 7.30 to 8.30 min each.

Can anyone check my command and modify it to record at lower video size with high resolution.

Hi,
If you use r32 release, please try nvv4l2h264enc. We are deprecating omx plugins on r32 releases.

Thanks for the info,
Now i changed the encoding, But still getting same output size and time.
Can you give a best gstreamer command with proper formatted code for recording.

Hi,
You may try

$ gst-launch-1.0 filesrc location= park_joy_1080p50.y4m ! y4mdec ! nvvidconv ! nvv4l2h264enc bitrate=12000000 profile=4 num-B-Frames=1 iframeinterval=1000 control-rate=0 vbv-size=50 qp-range=1,51:1,51:1,51 preset-level=3 ! h264parse ! qtmux ! filesink location= park_joy.mov

Reference link:

Configuring CBR and vbv-size would give balance in bitrate and quality. Please give it a try. Besides, 750Kbps looks strict to 720p30. You may check quantizetion value of frames via JM decoder: