H264 data changing after serial communication in Python

27 views Asked by At

I am using Raspberry4 , i have USB camera module that have 2 device ports (video0 - Raw video , video2 - H264 video) . I using gstreamer pipeline as capture device

cam = cv2.VideoCapture('gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-h264,width=640,height=480,framerate=10/1 ! x264enc ! h264parse ! videoconvert ! appsink', cv2.CAP_GSTREAMER)

I am reading frames from it , and writing to serial port.

In another device i am trying to read sent bytes , and convert them back to np array to use in cv2.imshow().

When i print received bytes and bytes in sender code , i see that they are different (received bytes are changed , i see it when print np.array ) and i can not show received frame.

I surfed many sites looking for the answer, but couldn't . What do you think about it?

0

There are 0 answers