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.
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:
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:
Thanks thats got RTSP working although its telling me H264 codec plugin missing. Ive installed gstreamer1-plugins-good, bad & ugly but i cant get it going.
[libopenh264 @ 0x5555e38355a0] Unable to create decoder
[libopenh264 @ 0x5555e38355a0] Unable to create decoder
[libopenh264 @ 0x5555e3834e50] Unable to create decoder
[ERROR:0@5.591] global cap_ffmpeg_impl.hpp:1309 open Could not open codec libopenh264, error: -1313558101
Where do i find the codecs for H.264, H.265, AV1, VP9, AAC, AV1 & Opus please?
so if nothing for Rocky 10, try Fedora maybe? Either that or you can download source rpm from Fedora and build it with mock on aarch64 and then use it. Or perhaps request EPEL package the above h264 packages for aarch64.