Im trying to run a Python program on Rocky 10 which uses OpenCV to connect to an IP camera using RTSP.
I installed the python3-opencv package and its dependencies from EPEL (see below) but I am getting errors when connecting to the camera:
ERROR:0@5.536] global cap_ffmpeg_impl.hpp:1309 open Could not open codec libopenh264, error: -1313558101
[ERROR:0@5.536] global cap_ffmpeg_impl.hpp:1317 open VIDEOIO/FFMPEG: Failed to initialize VideoCapture
[ WARN:0@5.619] global cap_gstreamer.cpp:2823 handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin: Real Time Streaming Protocol (RTSP) source
[ WARN:0@5.619] global cap_gstreamer.cpp:2839 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module uridecodebin0 reported: No URI handler implemented for "rtsp".
[ WARN:0@5.619] global cap_gstreamer.cpp:1698 open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@5.620] global cap_gstreamer.cpp:1173 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
rpm -qi python3-opencv
Name : python3-opencv
Version : 4.10.0
Release : 8.el10_0
Architecture: aarch64
Install Date: Tue 04 Nov 2025 06:06:33 PM UTC
Group : Unspecified
Size : 9702815
License : BSD-3-Clause AND Apache-2.0 AND ISC
Signature : RSA/SHA256, Sat 22 Mar 2025 10:43:27 AM UTC, Key ID 33d98517e37ed158
Source RPM : opencv-4.10.0-8.el10_0.src.rpm
Build Date : Fri 21 Mar 2025 09:16:50 PM UTC
Build Host : buildhw-a64-05.iad2.fedoraproject.org
Packager : Fedora Project
Vendor : Fedora Project
URL : https://opencv.org
Bug URL :
Summary : Python3 bindings for apps which use OpenCV
Description :
This package contains Python3 bindings for the OpenCV library.
Is there a missing package I can install to fix this? Ive previously run this program on Debian without issue so I know the program is not at fault.
Thanks
Not sure if it is needed but have you tried to install gstreamer1-rtsp-server.x86_64
Note that there are also plugins ‘rtsp’ and ‘rtspsrc’.
gstreamer1-rtsp-server did not work
do you know what the package names are for these struggling to find them?
Very easy to find out, since we know gstreamer is the key part, then you can check what gstreamer packages are available to install. You’ll then see from that a load of ones mentioning gstreamer1-plugins. Since RTSP no doubt is a plugin, would be why the server package didn’t help, since that would be if you want to run your own RTSP server. If you are looking to connect to a RTSP server, or playback RTSP, then that would be the plugin.
Based on my example below, we can check what is included in a package by listing it’s contents, and then grepping/filtering for certain phrases, like rtsp:
[root@rkelb ~]# dnf repoquery -l gstreamer1-plugins-good | grep -i rtsp
/usr/lib64/gstreamer-1.0/libgstrtsp.so
it would therefore potentially suggest that package is a place to start, eg: dnf install gstreamer1-plugins-good. Failing that, you can then repeat the repoquery command against all remaining gstreamer packages:
[root@rkelb ~]# dnf list *gstreamer*
Available Packages
PackageKit-gstreamer-plugin.x86_64 1.2.8-8.el10 appstream
gstreamer1.x86_64 1.24.11-1.el10 appstream
gstreamer1-devel.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-bad-free.x86_64 1.24.11-2.el10_0 appstream
gstreamer1-plugins-bad-free-devel.x86_64 1.24.11-2.el10_0 crb
gstreamer1-plugins-bad-free-libs.x86_64 1.24.11-2.el10_0 appstream
gstreamer1-plugins-base.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-base-devel.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-base-tools.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-good.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-good-gtk.x86_64 1.24.11-1.el10 appstream
gstreamer1-plugins-ugly-free.x86_64 1.24.11-1.el10 appstream
gstreamer1-rtsp-server.x86_64 1.24.11-1.el10 appstream
gstreamer1-svt-av1.x86_64 2.3.0-1.el10_0 epel
libcamera-gstreamer.x86_64 0.3.2-3.el10_0 appstream
libnice-gstreamer1.x86_64 0.1.22-7.el10_0 epel
pipewire-gstreamer.x86_64 1.2.7-1.el10 appstream
vlc-plugin-gstreamer.x86_64 1:3.0.21-16.el10_0 epel
of which there are quite a few.
You can also check to see if it’s already there
gst-inspect-1.0 rtsp