ofVideoPlayer on ubuntu and OF 0.06

I’ve been trying to get video playback working on Ubuntu 8.10. I just downloaded the latest OF and ran both install scripts (for code blocks and dependencies). Simple projects like the graphics examples work fine, but anything having to do with video fails.

Here’s a typical message I get from the video player:

** Message: don’t know how to handle video/x-svq, svqversion=(int)3, codec_data=(buffer)0000007c7374736400000000000000010000006c53565133000000000000000100032005534d4920000003c3000003c3014000f0004800000048000000000000000110536f72656e736f6e20566964656f20330000000000000000000000000000000018ffff00000012534d49205345514800000002ddc000000000, width=(int)320, height=(int)240, framerate=(fraction)600/7
OF_WARNING: GStreamer: cannot query time duration

** (:8475): WARNING **: gstvideo: failed to get caps of pad appsink0:sink
OF_ERROR: GStreamer: cannot query width and height
OF_ERROR: GStreamer Plugin: Embedded video playback halted; module player reported: You do not have a decoder installed to handle this file. You might need to install the necessary plugins.
Segmentation fault

Any suggestions? I’m just getting started with video on Linux.

ok, so I was actually able to answer my own question from a previous post. Here are the steps

  1. Install Totem if not installed
  2. Run Totem and load video
  3. Get Totem to search for and install appropriate codecs
  4. Try OF again and it should work

yes, you were just missing the codecs… there was a way to even make the same oF app ask about the codecs and install them through apt-get but it’s distribution dependent and implied adding another more library to projects.

Hi I have a similar problem.
I can open and see the movie with Totem without problem
but in the example I got this error:
I am in ubuntu 8.10 and codeblocks

OF_ERROR: GStreamer: unable to set pipeline to paused

(:20741): GStreamer-CRITICAL **:
Trying to dispose element player, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(:20741): GStreamer-CRITICAL **:
Trying to dispose element test, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(:20741): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GstPlayBaseBin’

(:20741): GStreamer-CRITICAL **:
Trying to dispose element fakesink, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(:20741): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GstPlayBaseBin’

(:20741): GStreamer-CRITICAL **:
Trying to dispose element decodebin0, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

OF_ERROR: GStreamer Plugin: Embedded video playback halted; module source reported: Resource not found.

(:20741): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GstElement’

(:20741): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)’ failed

(:20741): GStreamer-CRITICAL **:
Trying to dispose element typefind, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

OF_ERROR: GStreamer Plugin: Embedded video playback halted; module source reported: Resource not found.

(:20741): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GstElement’

(:20741): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)’ failed

(:20741): GStreamer-CRITICAL **:
Trying to dispose element source, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

Segmentation fault

Hey diego

can you post some minimal code with which you get this error? is just the videoplayer example?

hi arturo
this is just the videoplayer example
I haven’t change anything

thanks
diego

Among all the gstreamer errors you posted there’s:

OF_ERROR: GStreamer Plugin: Embedded video playback halted; module source reported: Resource not found.

it seems it cannot find the video, make sure it’s in the data folder inside bin and verify the name. need to make this error message more understandable, but almost sure the problem is it’s not finding the video file. also note linux file names are case sensitive.

hi arturo
You are right I change the path to
fingerMovie.loadMovie(“data/movies/fingers.mov”);
but now I got this problem

** Message: don’t know how to handle video/x-svq, svqversion=(int)3, codec_data=(buffer)0000007c7374736400000000000000010000006c53565133000000000000000100032005534d4920000003c3000003c3014000f0004800000048000000000000000110536f72656e736f6e20566964656f20330000000000000000000000000000000018ffff00000012534d49205345514800000002ddc000000000, width=(int)320, height=(int)240, framerate=(fraction)600/7
OF_WARNING: GStreamer: cannot query time duration

** (:10120): WARNING **: gstvideo: failed to get caps of pad appsink0:sink
OF_ERROR: GStreamer: cannot query width and height
OF_ERROR: GStreamer Plugin: Embedded video playback halted; module player reported: You do not have a decoder installed to handle this file. You might need to install the necessary plugins.
Segmentation fault

gracias
diego

Not sure if this will help, but do you have the following packages on your system?

gstreamer0.10-plugins-good
gstreamer0.10-plugins-bad
gstreamer0.10-plugins-ugly

If not try and install them…

hi
It works now.
I update to ubuntu 9.04 and the videoplayer example is working perfectly…
thanks for your help
diego

I am trying to work with video on Linux (Ubuntu 9.04, aka Jaunty). Using OF 0.06.

When I run the moviePlayer example the movie plays, but not really the way it should. In particular stepping frame by frame does not work properly (hardly at all - it seems to vary between runs though. sometimes I can sort of step but it skips frames, the video only updates every 5 frames or so.

It dumps these errors:
OF_ERROR: GStreamer: cannot query position.

I’ve installed libgstreamer0.10-0, gstreamer0.10-plugins-good, and more… I am not sure this is a codec issue, though.
I’ve also installed Totem, it plays ok, but scrubbing the video back or forward is similar to in the moviePlayer example, it drops frames.

Is everybody getting these errors or just me?

No I don’t think its just you, I recent wrote a heavy video based OF project and ran into lots of issues and weird behaviour.
Firstly though, the new Gstreamer based video player is much much faster than the old FOBS one, and it’s threaded as well (which the windows Quicktime player isn’t!)
However some codecs behave strangely and start-stop-pause behaviour can be problematic. I guess the best thing to do is report all the errors you find in as much detail and maybe Arturo who wrote the player can track some of those bugs down…in the meantime, try different formats…some codecs behave better than others, both in OF and Linux in general.

hey sorry totally missed this one.

yes the frame by frame functionality doesn’t work very well in linux yet. there’s an issue with getting the framerate and framesize of the movie in gstreamer so i used some ugly hack to get that info by waiting till the movie is playing, only if the movie doesn’t start at speed 1x the reported framerate is incorrect so you can get larger or shorter lengths in frames than the movie actually is. that’s why you’re getting some non existent frames in between the real ones.

Hi Arturo,

I’m having the following problem when executing the moviePlayerExample in Debian Sidux.

  
  
(<unknown>:11179): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed  
  
(<unknown>:11179): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed  
  
(<unknown>:11179): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed  
  
(<unknown>:11179): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed  
  
(<unknown>:11179): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL' failed  
  
(<unknown>:11179): GStreamer-CRITICAL **: gst_element_get_bus: assertion `GST_IS_ELEMENT (element)' failed  
  
(<unknown>:11179): GStreamer-CRITICAL **: gst_bus_have_pending: assertion `GST_IS_BUS (bus)' failed  
  
(<unknown>:11179): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL' failed  
Segmentation fault  
  

Any idea what this can be?

Rick

I installed the good, bad and ugly dependencies for gstreamer and now I’m a step further: I get the same message as otherside ('don’t know how to handle video/x-svq)

I tried to install ‘totem’ but this fails because of a version conflict. Is anyone familiar with this, I only recently started using linux.

  
  
The following packages have unmet dependencies:  
  totem: Depends: totem-plugins (>= 2.26.2-1) but 2.24.3-3 is to be installed  
         Depends: totem-gstreamer (>= 2.26.2-1) but 2.24.3-3 is to be installed or  
                  totem-xine (>= 2.26.2-1) but 2.24.3-3 is to be installed  
  totem-gstreamer: Depends: totem-common (< 2.25) but 2.26.2-1 is to be installed  
  totem-mozilla: Depends: totem-gstreamer (>= 2.26.2-1) but 2.24.3-3 is to be installed or  
                          totem-xine (>= 2.26.2-1) but 2.24.3-3 is to be installed  
  totem-xine: Depends: totem-common (< 2.25) but 2.26.2-1 is to be installed  
  

thank,
Rick

Because I could not install totem I had to find another way to get the video/x-svq codec to work. This did the trick:

  
  
apt-get install gstreamer0.10-ffmpeg  
  

Totem is the default media player on Ubuntu so should already be installed. If you are new to Linux I suggest Ubuntu as it’s well supported and is the official OF distribution…

I recently updated to Lucid and now experience some problems that weren’t there before. Maybe someone can help me on this one:

I’m running the opencvExample, which worked fine before the update (after I installed gstreamer0.10-ffmpeg).
Now the application window opens shows only black/grey squares, no movies. Run via shell I get the following log output:

  
  
OF_VERBOSE: loading file:///[...]/of_preRelease_v0061_linux_FAT/apps/addonsExamples/opencvExample/data/fingers.mov  
OF_ERROR: GStreamer: unable to set pipeline to paused  
  
OF_ERROR: ofVideoPlayer couldn't load movie  

When I’m running via codeblocks I get something like a still from the movie in different sizes and this:

  
  
** (<unknown>:11387): WARNING **: gstvideo: failed to get caps of pad appsink0:sink  
OF_ERROR: GStreamer: cannot query width and height  
OF_VERBOSE: Gstreamer: speed change to 1.000000  
OF_ERROR: ofVideoPlayer  couldn't load movie  
  

Any suggestions?

yes this is a known problem with lucid, it’s already fixed in github, the needed files are:

http://github.com/openframeworks/openFr-…-tUtils.cpp
http://github.com/openframeworks/openFr-…-GstUtils.h

Hooray!!! It’s working again!
Thanks a lot :slight_smile: