I tried to build desktop application with PyQt5+opencv for image recognition system. I’m using GStreamer pipline to get rtsp streaming by
rtsp_url = “rtspsrc location=rtsp://192.168.1.50/live1.sdp latency=0 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! appsink”
cap = cv2.VideoCapture(rtsp_url, cv2.CAP_GSTREAMER)`
I can run the .py script properly from terminal with python3 ./myapp.py , but after creating myapp.desktop and launching it, i get no image frame from gstreamer.
I’ve already tested with cv2.VideoCapture(0) and cv2.VideoCapture(rtsp_url,cv2.CAP_FFMPEG), it works properly from both terminal and .desktop.
Is there any necessary to adjust gstreamer setting to launch from .desktop?
Also, the following is my app.desktop file.
#!usr/bin/env python3
[Desktop Entry]
Name=MyApp
Version=1.0
Comment=MyApp_version1
Exec=python3 /home/waing/Codes/pythonQtTest_GUI/qtpythontest.py
Icon=/home/waing/HumanDetectionSystem/Myapp_Logo.png
Path=/home/waing/Codes/pythonQtTest_GUI/
Terminal=true
Type=Application
the result of cv2.getBuildInformation()
Is there anything that I need to change? Thanks in Advance, Waing