Which version of opencv has ability to read GIF file?

Environment: Ubuntu16.04, OpenCV3.4.15, C++

I try to read GIF file with c++ API of the module videoio of OpenCV3.4.15; unfortunately, it is not work correctly!
But, opencv-python(v4.4.x) is succeed to work in python environment.
What’s wrong with it???

imread() cannot do this (it’s STILL a patent issue !), no matter which version.

the “workaround” trick is, to load it using
cv::VideoCapture("some.gif", CAP_FFMPEG)

i really doubt this.

I mean I adopted VideoCapture in python; but it failed in c++, maybe I have to rebulild the lib

maybe you need to specify the CAP_FFMPEG explicitly

( or maybe, you dont have support fo that in c++ ? check cv::getBuildInformation(); )

still failed. the VideoCapture occurs “(Frame:68385): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion ‘G_IS_DBUS_CONNECTION (connection)’ failed”

that looks like you failed to specify CAP_FFMPEG