I’m using VideoCapture and GStreamer to capture frames from a camera and output using a VideoWriter. Below are my input and output pipelines:
#VideoCapture Input Pipeline
"v4l2src device=/dev/video2 io-mode=2 ! video/x-raw,format=YUY2,width=2560,height=720,framerate=60/1 ! nvvidconv ! \
video/x-raw(memory:NVMM) ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink drop=0"
#VideoWriter Output Pipeline
"appsrc ! queue ! videoconvert ! video/x-raw, format=RGBA ! nvvidconv ! \
video/x-raw(memory:NVMM) ! nvegltransform ! nveglglessink "
I noticed that the conversion using videoconvert is quite slow. After doing some reading, I found that some people using v4l2convert
and v4l2h264enc
as an alternative. How would I incorporate that in my pipeline. Note that I’m running this in a python script on a Jetson Xavier NX.