opencv vpudec appsink

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

opencv vpudec appsink

770件の閲覧回数
coindu
Contributor IV

Hi    

           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?

         

···

#!/usr/bin/env python3
import cv2
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)
while True:
ret,frame = cap.read()
a=len(frame.shape)
print(a)

if ret is False:
break

cv2.imshow('appFrame',frame)
key = cv2.waitKey(20)
if key == 49:
cv2.destroyAllWindows()
cap.release()

 ···

0 件の賞賛
3 返答(返信)

759件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what board do you use? did you install phyton2 opencv successfully on yocto, right?

0 件の賞賛

756件の閲覧回数
coindu
Contributor IV

     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. 

0 件の賞賛

739件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport
0 件の賞賛