Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

.exe file fails to read a VideoStream from a camera connected via rtsp?

I have a little project that should read VideosStream from rtsp camera to do some other tasks. I could run its original file without any issue. However, after making an executable file with pyinstaller --onefile, it couldn't derive VideoStream and gave the error

 Traceback (most recent call last):
  File "", line 60, in <module>
cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4044: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

[7340] Failed to execute script hc_yolo_all.

It is seen that frame = cv2.resize(frame, (416,416)), line 60, of is receiving an empty frame and therefore, output an error.

Where do you think the issue lies in?

I, to be honest, don't know whether it is related to opencv or rtsp or pyinstaller, so I've tagged those three.