GStreamer: How to use v4l2convert instead of videoconvert

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.

For converting to BGR format you would need to use software converter videoconvert. Please refer to discussion in
[Gstreamer] nvvidconv, BGR as INPUT - #2 by DaneLLL

Thanks for the response. I’m aware of using videoconvert however I understand that because it’s a CPU conversion it causes my frame rates to be much slower. I found this Raspberry Pi forum where the user used a v4l2encoder/decoder and v4l2converter to solve this issue. Would it be possible to replicate this in my pipeline on the Jetson NX?

The implemented plugins on Jetson platforms are nvv4l2h264enc, nvv4l2decoder, nvvidconv, so the pipeline is not applicable. Hardware devices are different.