GStreamer pipeline help

Hello,
Im trying to get a simple rtsp stream working in python, shouldn’t be too hard, and I did get it to work for a while, but as I was testing with some random streams, something broke. With same pipeline image suddenly became grayscale and there are different channels in bottom, as shown in the attached image??

I my pipeline is

cv2.VideoCapture('rtspsrc location=rtsp://10.42.0.161:5540/ch0 latency=0 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! videorate ! videoscale ! video/x-raw,format=(string)I420,framerate=30/1,width=600,height=400 ! queue ! appsink sync=false', cv2.CAP_GSTREAMER)

I have tried few formats, and even different streaming app, but it’s all the same :(

Using next closest command on PC doesn’t have these issues…

gst-launch-1.0 rtspsrc location=rtsp://10.42.0.161:5540/ch0 latency=0 ! rtph264depay ! h264parse ! avdec_h264 ! videorate ! videoscale ! video/x-raw,format=I420,framerate=30/1,width=600,height=400 ! queue ! autovideosink sync=false

Hi,
It is more like an issue in the source. Maybe the network is not stable?
There is another user hitting issue in unstable RTSP source:
https://devtalk.nvidia.com/default/topic/1057456/jetson-tx2/jetpack3-3-tx2-gstreaer-could-not-read-from-connection/post/5364271/#5364271

You may try to run ‘sudo jetson_clocks’. Max performance probably can help the case.

edit: I found that I had mistake in conversion to jpeg for jupyter notebook. Was reading stream as BGR, but it was in I420.

All working now.
Thanks @DaneLLL for effort :)