Error:gst-stream-error-quark

Hi,
You need to modify deepstream-test1 from

v4l2src ! video/x-raw,framerate=30/1 ! videoconvert ! nvvideoconvert ! video/x-raw(memory:NVMM) ! nvstreammux ! ...

to

v4l2src device=/dev/video0 io-mode=2 ! 'image/jpeg,width=1920,height=1080,framerate=30/1' ! jpegparse ! jpegdec ! videoconvert ! nvvideoconvert ! nvstreammux ! ...

There is no existing python code, but a user shares C code . Please check
How to change source pixel format from YUYV to MJPG - #7 by jhchris713