How to change source pixel format from YUYV to MJPG

It is not supported in default deepstream-app. You have to modify the code and rebuild the application. The cpp file is


Default source bin is

v4l2src ! videoconvert ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12'

For MJPG source, it should be

v4l2src ! image/jpeg ! jpegdec ! videoconvert ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12'