The problem with GSTREAMER_app_LIBRARY value (CMake). Set it to “…/lib/gstapp-1.0.lib” instead of “…lib/gstreamer-1.0/libgstapp.a”
Visual Studio doesn’t work with “.a” libraries.
After a successful build, copy “…/opencv…/build/lib/python3/Release/cv2.cpxx-win_amd64.pyd” file to the python folder “…/Lib/site-packages”
Don’t forget to add the directories to the python script:
import os
os.add_dll_directory("../gstreamer/1.0/.._x86_64/bin")
os.add_dll_directory("../opencv-../build/install/bin")
import cv2
...
cap = cv2.VideoCapture("videotestsrc ! videoconvert ! appsink")
...
Good luck!
P.S. for autocomplete, copy “pyi” folder “…/opencv-…/build/modules/python_bindings_generator/cv2” to the python folder “…/Lib/site-packages”