A simple C++ program to capture left and right video from cameras

I’m looking to run a program that saves left and right video from a stereo camera.
The below pipeline works for my setup:
gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=300 ! ‘video/x-raw(memory:NVMM), width=1280, height=720, framerate=30/1’ ! nvtee ! omxh264enc bitrate=20000000 ! qtmux ! filesink location=video.mp4

Also, how can I get the timestamps to be saved somewhere? I am also trying to sync a gps with the timestamps

Check the MMAPI sample code.

sudo apt list -a nvidia-l4t-jetson-multimedia-api
sudo apt install nvidia-l4t-jetson-multimedia-api=35.xxxxx

Where can I view sample code? I already have it installed

I think I found it in this thread
I am trying to run camera_recording and It can’t find error.h or thread.h
its no where to be found in the include folder
1st image: library contents (samples)
2nd image: include folder

Check this


I tried to runsample 10, which records video. It gives me the EGL display error. I couldn’t find jetpack to run in step 2 of the link you sent
Is there another way to install install CUDA/OpenCV/cuDNN/TensorRT? BUt I doubt thats the problem. Heres the terminal output of me trying to run sample 10:

gudboy007@ubuntubox:~/Desktop/D219-9dof/tegra_multimedia_api/samples/10_camera_recording$ ./camera_recording -h
No protocol specified
nvbuf_utils: Could not get EGL display connection
Usage: camera_recording [OPTIONS]
-r Set output resolution WxH [Default 640x480]
-f Set output filename [Default output.h264]
-t Set encoder type H264 or H265 [Default H264]
-d Set capture duration [Default 5 seconds]
-i Set camera index [Default 0]
-s Enable profiling
-v Enable verbose message
-c Enable demonstration of CPU processing
-h Print this help
gudboy007@ubuntubox:~/Desktop/D219-9dof/tegra_multimedia_api/samples/10_camera_recording$ ./camera_recording -r 640x480
No protocol specified
nvbuf_utils: Could not get EGL display connection
Set governor to performance before enabling profiler
No protocol specified
Cannot get EGL display.

Set the DISPLAY before running it.

export DISPLAY=:0

I have tried that before. the terminal is just the error part, I had export DISPLAY before then

How about

sudo xinit&
export DISPLAY=:0