I want to use python-opecv to displayer video frame with vpudec. but only use vpudec as appsink input，the color will be black and white；When add videoconvert after vpudec the displayer will
be very slow.
environment BSP 5.4.3 opencv version 4.2.0
Anyone who can help me fix it?
if __name__ == '__main__':
mode = r'filesrc location=/home/root/qq.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue ! h264parse ! vpudec ! appsink'
#mode = r'filesrc location=/home/root/qq.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue ! h264parse ! vpudec ! videoconvert ! queue ! appsink'
cap = cv2.VideoCapture(mode,cv2.CAP_GSTREAMER)
ret,frame = cap.read()
if ret is False:
key = cv2.waitKey(20)
if key == 49:
what board do you use? did you install phyton2 opencv successfully on yocto, right?
IMX8MM and IMX8MQ board to test.
Of cause ,the python opecv installed sucuess. Because I have run the python script on the platform.
I'm just confused about the situation now.
one can refer to the command from the link as below: