ofVideoPlayer: opening video while still streaming data?

Hi there,

a tricky question regarding ofVideoPlayer: I’m trying to open a video fijle while still streaming TV capture data into it.
However, even if I wait a couple of seconds until the video is properly initialized, I either get gstreamer errors (“cannot seek position”) or the player shows me a “snapshot” of the video up to the point where ofVideoPlayer opened it.

Maybe this is more a gstreamer issue than an openframeworks issue…
Nevertheless, I would appreciate any help -

thanks a lot in advance,

there’s a flag for streams that is only set if the name of the video is a url instead of a file, so if you’re opening a file it won’t work. you can try opening it with


or whatever the name of the video is to see what happens

also does totem plays it properly? you can also to open it with gst-launch and more or less the same pipelne that the videoplayer uses:

gst-launch-0.10 playbin uri=videofile.avi


thanks for the hints - unfortunately, I now ran into a different problem with some of regular video files (no streams).

The attached video ‘test.avi’ plays with mplayer, totem, and also with gst-launch:

gst-launch-0.10 playbin uri=file:///tmp/test.avi

When opening it with openframeworks, however, I get lots of these:

OF_WARNING: GStreamer: cannot query time duration

OF_ERROR: GStreamer: cannot query width and height

and the video does not play. Might re-encoding to a different format help here?

thanks in advance for your help!


you forgot the attachment : )

grrr… sorry about that.
Anyway, I figured out that with using a local absolute path and not a URL it works.
Sorry for the confusion -