Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GStreamer: unable to query position of stream #4592

opencv-pushbot opened this issue Jul 27, 2015 · 2 comments


Copy link

commented Jul 27, 2015

Transferred from

|| Antonio Trande on 2013-07-02 17:38
|| Priority: Normal
|| Affected: branch '2.4'
|| Category: highgui-video
|| Tracker: Bug
|| Difficulty: Medium
|| PR: 
|| Platform: x64 / Linux

GStreamer: unable to query position of stream

Hi all.

This warning appears when I try to load a video file in 'qgifer' software ( in Fedora 19 with opencv-2.4.5 installed:

$ qgifer
ffmpeg version 1.2.1
built on Jun 21 2013 12:33:57 with gcc 4.8.1 (GCC) 20130603 (Red Hat 4.8.1-1)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil      52. 18.100 / 52. 18.100
libavcodec     54. 92.100 / 54. 92.100
libavformat    54. 63.104 / 54. 63.104
libavdevice    54.  3.103 / 54.  3.103
libavfilter     3. 42.103 /  3. 42.103
libswscale      2.  2.100 /  2.  2.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  2.100 / 52.  2.100
FramePlayer::openSource new video loaded:  "/home/sagitter/Videos/big_buck_bunny.ogv" 
codec name:  "" 
warning: GStreamer: unable to query position of stream (/builddir/build/BUILD/opencv-2.4.5/modules/highgui/src/cap_gstreamer.cpp:660)
total frames:  0 
dragging B 
preview destroyed...

I don't know if it is related to opencv or not.


Antonio Trande on 2013-07-03 13:46
-   Assignee set to Alexander Smorkalov
Alexander Smorkalov on 2013-07-04 15:47
The code that generates warning is:
        format = GST_FORMAT_DEFAULT;
        if(!gst_element_query_duration(pipeline, &format, &value)) {
            CV_WARN("GStreamer: unable to query position of stream");
            return false;

This warning looks like some GStreamer issue. Try to update GStreamer and install appropriate plug-ins for it.
I cancel the ticket.
-   Status changed from New to Cancelled
Antonio Trande on 2013-07-05 15:08
Hi Alexander.

> This warning looks like some GStreamer issue.

Well, GStreamer maintainer says that this problem is outside of GStreamer: [] :) 
The code you are showed is in 'opencv-2.4.5/modules/highgui/src/cap_gstreamer.cpp' file; do you think may be a conflict between GStreamer-0.10 and GStreamer-1.0 ?
Alexander Smorkalov on 2013-07-06 09:15
As I know, GStreamer 1.0 is incompatible with 0.1. It can case problem here.
-   Status changed from Cancelled to Open
Antonio Trande on 2013-07-07 17:51
Alexander Smorkalov wrote:
> As I know, GStreamer 1.0 is incompatible with 0.1. It can case problem here.

This is a big problem because in Fedora 19 Gnome-based gstreamer-1.0 is a main dependency of Gnome. If I try to remove gstreamer-1.0 and leave just old gstreamer-0.10, the package manager removes various main packages (Gnome-shell, Nautilus, GDM, ...).

The GStreamer warning in question appears by using other applications related with opencv, too.
Alexander Smorkalov on 2013-07-10 21:09
I reproduce your issue with OpenCV laplace example.
GStreamer version: 0.10.36
OS: OpenSuse Linux 12.2
-   Affected version changed from 2.4.0 - 2.4.5 to branch '2.4'
-   Difficulty set to Medium
-   Category set to highgui-video
Alexander Smorkalov on 2013-09-12 10:51
-   Target version set to Next Hackathon

This comment has been minimized.

Copy link

commented Nov 16, 2015

@asmorkalov anything I can do to help resolve this? I also encountered the error and would like to get it opencv working on Fedora-like systems.


This comment has been minimized.

Copy link

commented Jan 14, 2016

@alalek alalek closed this Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.