How to add BGR support in nvvidconv ?

Hello,

We are using gstreamer pipeline to capture the rtsp video stream. The pipeline is as follow:

gst-launch-1.0 rtspsrc location=rtsp://:@192.168.1.108:554 latency=200 drop-on-latency=true ! queue ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw,format=RGBA,width=1280,height=720 ! autovideosink

It works but out stream is RGBA. But we need the stream in BGR format, but there is no support for BGR in ‘nvvidconv’ for BGR format.

So, How we can add the support for BGR format in ‘nvvidconv’ ?
Is any other hardware video convertor is available with in-built BGR format ? If any , please suggest us.

Best Regards.

Hi,
Please share what Jetson platform you use. ‘GPU-Accelerated Libraries’ doesn’t seem to be correct category for the issue.

Are you able to swap?

As in create an rgba vector to hold the bytes per frame.

rgba = std::vector(numberOfBytes,0);

then bgra = std::vector(numberOfBytes,0);

for(uint i{0}; i < numberOfBytes; ++i){
bgra[i] = rgba[i+3];
bgra[i+3] = rgba[i];
bgra[i+2] = rgba[i+2];
bgra[i+4] = rgba[i+4];
}

Hi,
If you use Jetson platforms, it is hardware limitation the BGR is not supported. There is a similar query:
https://devtalk.nvidia.com/default/topic/1064944/jetson-nano/-gstreamer-nvvidconv-bgr-as-input/post/5392836/#5392836