Error running videoPlayerExample on Odroid

I successfully installed oF on my Odroid-U3 running Ubuntu 14 (trusty) using the method described here. So far all examples are up and running perfectly well (surprisingly well at times), except for VideoPlayerExample.

This compiles fine but gives this error when run:

checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
[ error ] ofGstVideoPlayer: allocate(): cannot get pipeline caps
Segmentation fault
make: *** [run] Error 139

This all looks similar to a problem encountered by a few windows users, but as far as I can tell it has nothing to do with sound. Any ideas?

@mysteryDate – does this happen with all video codecs?

@arturo Could this be a missing gstreamer plugin / codec?

@bakercp – So far, yes, I ran through a few of the videos provided here (it’s old, but it was the best place I found to download a whole whack a videos with different codecs), but got the same error every time, except for the occasions when I received additional errors:

[ error ] ofGstUtils: startPipeline(): unable to puase pipeline
[warning] ofGstUtils: getDurationNanos(): couldn't query time duration
[ error ] ofGstVideoPlayer: allocate(): cannot get pipeline caps
[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded

I assume this is due to codecs/file formats that oF is not ready for.

OF in linux uses gstreamer which in turn uses ffmpeg which supports lots of formats, so if you’ve tried several videos i doubt it’s a codec issue, you can actually test it by opening the videos with the default player, totem, in ubuntu, if it works there it should work in OF. I fixed a problem some days ago on arch linux in the raspberry pi where the caps of the pipeline weren’t available until the first frame was read so it might be the same problem.

Yeah, the videos definitely run on GNOME mplayer (which came with my distro). So I should build the development version from Github? I’ll try that tomorrow.

mplayer uses it’s a different library than OF, if you can try with totem just to be sure? but yes trying with the version from github would be useful to know if this has been already fixed

Unfortunately I don’t have much space on my Odroid, and the development version of oF is much larger than the release. I apologize if this is a stupid question, but is there any way to just get the arm7 necessary code out of the github reop and compile it?

@arturo, I’m having similar issues (on an Odroid-XU3). While GNOME mplayer is able to reproduce all videos correctly, I tried installing totem, and I get a ‘Video devices uses an unsupported pixel format.’ on all video files (despite their encoding).

I’m also having trouble with ofVideoGrabber (even on the example under examples/video/videoGrabber). I get the camera’s feed, but there’s something wrong with the color channels, even though all 3 of the RGB channels are non-zero, the red channel is practically 0, and there’s tons of green on the final image. What’s even weirder is that this happens mostly when there’s little light on the scene: if I point the camera to a bright lamp or to a window, the image suddenly starts looking fine, tough every couple of seconds it goes back to being mostly green for a couple of seconds.

I tried the same gstreamer pipeline myself, replacing the of sink with autovideosink, and the camera works fine, so it looks as if OF is the culprit. The gstreamer pipeline is:

gst-launch-1.0 v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=20/1 ! videoconvert ! autovideosink

Thanks!

edit: I experimented a little bit more. On higher resolutions, it’s never the whole screen that goes greenish, but only a horizontal bar. It kinda looks like ofGstUtils is failing to process some part of gstreamer’s output properly, like some kind of synchronism is temporarily lost.

I uploaded an example of how the camera feed looks like when the errors occur. Sometimes the whole frame is fine, sometimes the whole frame is greenish, and sometimes (as can be seen in the example) it’s only a portion of the image. When this happens, it’s easy to see that some channels (the blue channel, in that case) are disaligned.

I also uploaded all 3 RGB channels, which I extracted doing

frame.setFromPixels(vidGrabber.getPixels());
red.setFromPixels(vidGrabber.getPixels().getChannel(0));
green.setFromPixels(vidGrabber.getPixels().getChannel(1));
blue.setFromPixels(vidGrabber.getPixels().getChannel(2));

frame, red, green and blue are all of type ofImage. The .png files were created doing

ofSaveImage(frame.getPixels(),"frame.png");

GstVideoGrabber_error_split.zip (832.1 KB)

Thank you for your time!