how to capture and display using nvcamerasrc on TX2??

Hi,

I’m beginner on gstreamer and tx2 board, so i review your guide document.

And i checked below 2 guides from Camera Software Development Solution, 2 guides are working good.
gst-launch-1.0 nvcamerasrc num-buffers=200 sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12’ ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev

gst-launch-1.0 nvcamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12’ ! nvoverlaysink -ev

my questions are,
question 1) below guide is can save test.mp4 encoded h264, but i just want to know how to save yuv420 raw image
gst-launch-1.0 nvcamerasrc num-buffers=200 sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12’ ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev

question 2) how to capture and display using nvcamerasrc at the same time?

Thanks,
Doohan93

For 1), you may try:

gst-launch-1.0 nvcamerasrc num-buffers=200 sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=I420' ! filesink location=sample.I420

For 2), you can use plugin tee, that duplicates its input stream into multiple output streams. You would use plugin queue in front of the 2 subsequent pipelines for avoiding synchro issues. The duplicated stream is named ‘t’ below, and must be used named as ‘t.’ for second or other pipelines.

gst-launch-1.0 -ev nvcamerasrc num-buffers=200 sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=I420' ! tee name=t ! queue ! filesink location=sample.I420           t. ! queue ! nvoverlaysink

Hi Honey Patouceul,

Your guides are working good.

Thank you so much,
Doohan93