Gstreamer Record and view video simultaneously

I am using Jetson Nano with accelerated GStreamer to record video using IMX219 sensor, using nvoverlaysink to preview video and nvv4l2h264enc to record h264 video.

Is there a way to simultaneously record and display what camera captures even if preview is at slower FPS?

Regards

Hi @tnano

You can use the tee element in gstreamer in order to split the data into multiple pads,

In your case something like this should work for you:

FILE_A=filenameA.mp4 gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1’ ! tee name=streams streams. ! queue ! nvv4l2h264enc bitrate=8000000 ! h264parse ! queue ! qtmux ! filesink location=$FILE_A streams. ! nvoverlaysink

You can find more pipelines like this in our wikis:

Please tell me if this works for you.

Best Regards,
Roberto Gutierrez,
Embedded Software Engineer

Works, Thank you