# Can't read mp4 on alma linux ( = RHEL) system

**URL:** <https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505>\
**Category:** C++\
**Tags:** videoio\
**Created:** [May 12, 2026, 3:50pm UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505 "2026-05-12T15:50:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave-007](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dave-007](https://forum.opencv.org/u/dave-007)\
**Post date:** [May 12, 2026, 3:50pm UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505/1 "2026-05-12T15:50:17Z")

</div>

greetings,

i’m running into an error when i try to open and read an mp4 video, something about ‘missing a plugin’.

here is the program :

```auto
#include <iostream>
#include <filesystem>
#include <opencv2/opencv.hpp>

using namespace cv;
using namespace std;

int main(int argc, char *argv[])
{
        if (!filesystem::exists(argv[1])) {
                cerr << "Video file not found: " << argv[1] << "\n";
                return 1;
        }

        VideoCapture cap(argv[1]);
        if (cap.isOpened()) {
                cap.release();
                cout << "OK!\n";
        } else {
                cerr << argv[1] << ": can't open video for reading\n";
        }
}

```

running the program :

```auto
$ opencvread /data/ocr/1777366691553627/danse.mp4
[INFO:0@0.009] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/videoio_registry.cpp (223) VideoBackendRegistry VIDEOIO: Enabled backends(7, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); V4L2(970); CV_IMAGES(960); CV_MJPEG(950); UEYE(940)
[INFO:0@0.010] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/backend_plugin.cpp (369) getPluginCandidates VideoIO plugin (FFMPEG): glob is 'libopencv_videoio_ffmpeg*.so', 1 location(s)
[INFO:0@0.013] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/backend_plugin.cpp (379) getPluginCandidates - /usr/lib64: 0
[INFO:0@0.013] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/backend_plugin.cpp (383) getPluginCandidates Found 0 plugin(s) for FFMPEG
[INFO:0@0.018] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (1104) open OpenCV | GStreamer: /data/ocr/1777366691553627/danse.mp4
[INFO:0@0.018] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (1137) open OpenCV | GStreamer: mode - FILE
[WARN:0@0.036] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (2386) handleMessage OpenCV | GStreamer warning: your GStreamer installation is missing a required plugin
[WARN:0@0.036] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (2401) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module qtdemux0 reported: Internal data stream error.
[WARN:0@0.038] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (1356) open OpenCV | GStreamer warning: unable to start pipeline
[WARN:0@0.038] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (862) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
MFX: Can't initialize session
[INFO:0@0.038] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_images.cpp (282) icvExtractPattern Pattern: /data/ocr/1777366691553627/danse.mp%01d @ 4
[INFO:0@0.040] global /builddir/build/BUILD/opencv-4.6.0/modules/videoio/src/cap_images.cpp (313) open CAP_IMAGES: Stop scanning. Can't read image file: /data/ocr/1777366691553627/danse.mp4
/data/ocr/1777366691553627/danse.mp4: can't open video for reading

```

(the error “warning: your GStreamer installation is missing a required plugin” sure is helpful… 😖 )

i’ve verified that gstream’s libraries are installed :

```auto
$ sudo dnf list installed | grep -i gstream
gstreamer1.x86_64 1.22.12-3.el9 @appstream
gstreamer1-plugin-libav.x86_64 1.22.1-1.el9 @epel
gstreamer1-plugins-base.x86_64 1.22.12-5.el9_7 @appstream
gstreamer1-plugins-good.x86_64 1.22.12-5.el9_7 @appstream

```

i found the following when calling cv::getBuildInformation() :

```auto
  Video I/O:
    DC1394: NO
    GStreamer: YES (1.18.4)
    v4l/v4l2: YES (linux/videodev2.h)
    Intel Media SDK: YES (/lib64/libmfx.so -lstdc++ /lib64/libdl.a /lib64/libva.so /lib64/libva-drm.so)

```

can anyone tell me what’s going wrong and how i can fix the problem?  
what “required plugin”? where could this be?  
reading MP4 video is pretty fundamental, i’m surprised it would be problematic right out of the box.

many thanks

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [May 12, 2026, 8:18pm UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505/2 "2026-05-12T20:18:22Z")

</div>

OpenCV should be trying to use ffmpeg for this.

the other backends aren’t responsible. they figure that out by trying, and failing, to interpret the argument string.

opencv 4.6.0 is very much outdated. you are probably running into a bug that has long since been fixed.

try this again with the latest release.

if the issue still occurs in the latest release, then you can submit a bug report.

this could also be an issue with your system/distro. if you got your opencv precompiled as a package from some maintainer affiliated with the distro, get them involved.

---

<div class="post-metadata">

**Author:** ![dave-007](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dave-007](https://forum.opencv.org/u/dave-007)\
**Post date:** [May 13, 2026, 9:20am UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505/3 "2026-05-13T09:20:23Z")

</div>

hi crackwitz,

thanks for the reply.

> [@crackwitz](#):
>
> OpenCV should be trying to use ffmpeg for this.

do you mean to say that opencv is fork/exec’ing ffmpeg to do its work for it?

> [@crackwitz](#):
>
> opencv 4.6.0 is very much outdated. you are probably running into a bug that has long since been fixed.
> 
> try this again with the latest release.
> 
> if the issue still occurs in the latest release, then you can submit a bug report.
> 
> this could also be an issue with your system/distro. if you got your opencv precompiled as a package from some maintainer affiliated with the distro, get them involved.

no, this is just a straight dnf install of opencv for alma linux. apparently, we have the [latest possible release](https://www.rpmfind.net/linux/rpm2html/search.php?query=opencv&submit=Search+...&system=almalinux&arch=x86_64). i guess i’ll be compiling this from scratch.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [May 13, 2026, 2:52pm UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505/4 "2026-05-13T14:52:04Z")

</div>

> [@dave-007](#):
>
> fork/exec’ing ffmpeg

no.

ffmpeg is a library too. I’m saying OpenCV can call ffmpeg’s APIs, as part of VideoWriter and VideoCapture.

---

<div class="post-metadata">

**Author:** ![dave-007](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@dave-007](https://forum.opencv.org/u/dave-007)\
**Post date:** [May 19, 2026, 9:01am UTC](https://forum.opencv.org/t/cant-read-mp4-on-alma-linux-rhel-system/24505/5 "2026-05-19T09:01:33Z")

</div>

> [@crackwitz](#):
>
> fork/exec’ing ffmpeg
> 
> no.

then i am reassured. 😀

> [@crackwitz](#):
>
> ffmpeg is a library too. I’m saying OpenCV can call ffmpeg’s APIs, as part of VideoWriter and VideoCapture.

ah. yes. you mean the libAV libraries (libavcodec.a, libavdevice.a, …) also used to build ffmpeg, and ffprobe. sorry, nomenclature skewered me. 😆

in any case, that’s all beside the point, which is that upgrading to 4.13 now allows opening of MP4 videos. thanks very much for your help. 🙂
