Capture a video from both Cameras on Jetson nano

Dear All,

I’m new to recording video using Jeston. I need to record a video and I have two raspberry camera on my Jetson nano board. I would like to record two angle of my laboratory and after compile a video for divulgation. however, I do not know how I can record them. I can strem on the screen both camera capture using:

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! \
   'video/x-raw(memory:NVMM),width=3280, height=2464, framerate=21/1, format=NV12' ! \
   nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=720' ! \
   nvvidconv ! nvegltransform ! nveglglessink -e

This works and with two terminals, I can see both camera. How can I use this command and save the video to a file?

cheers
Luigi

1 Like

Hi,
For stitching multiple sources, you can leverage nvcompositor. Please refer to this pipeline:
Gstreamer using nvcomposer to filesink hangs, but nvcomposer to nvoverlaysink works fine - #13 by DaneLLL

Hi,

i`m really dump to this. Is it possible to have the command to use?

cheers

Luigi

You may take a look at gstreamer user guide. There are sample pipelines demonstrating hardware functions.
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Faccelerated_gstreamer.html%23

i`m trying to use:

gst-launch-1.0 nvarguscamerasrc maxperf=1 ! \
  'video/x-raw(memory:NVMM), width=(int)1920, \
  height=(int)1080, format=(string)NV12, \
  framerate=(fraction)30/1' ! nvv4l2h265enc \
  control-rate=1 bitrate=8000000 ! 'video/x-h265, \
  stream-format=(string)byte-stream' ! h265parse ! qtmux ! \
  filesink location=test.mp4 -e

but the file that generate the script (test.mp4) is empty

Luigi

For H265, you would use MKV container. Try:

gst-launch-1.0 nvarguscamerasrc ! \
  'video/x-raw(memory:NVMM), width=(int)1920, \
  height=(int)1080, format=(string)NV12, \
  framerate=(fraction)30/1' ! nvv4l2h265enc \
  control-rate=1 bitrate=8000000 ! 'video/x-h265, \
  stream-format=(string)byte-stream' ! h265parse ! matroskamux ! \
  filesink location=test.mkv -e