openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

ofVideoPlayer problems (not showing the images) #129

Closed KidCoding closed 11 years ago

KidCoding commented 11 years ago

Hi,

I have trouble with the ofVideoPlayer. I tried the example in the devApps directory. Here is the result:

[warning] GStreamer: cannot query time duration

* (videoPlayerSetVolumeExample:8302): WARNING* gstvideo: failed to get caps of pad app_sink:sink [error] GStreamer: cannot query width and height [ofAppEGLWindow::runAppViaInfiniteLoop:notice] ofNotifySetup() complete [warning] received a preroll without allocation [warning] received a preroll without allocation [warning] received a preroll without allocation [warning] received a preroll without allocation

So i checked the video codec. mplayer is able to decode the video but it lags a lot. omxplayer is also able to decode the video and doesn't lag at all. I don't know what is the issue...

NB: I am using ofSetupOpenGL(1024,768,OF_WINDOWS) without the window declaration in the main.cpp. I removed it because it is producing error about ofAppGlutWindow. I don't if should use the "GLES version" and what is the difference between both of them....

Do you have any idea about this issue?

Thanks, KiD

kalwalt commented 11 years ago

hi @KidCoding do you tried wth rpi or Pandaboard? Don't know if that in devapps works ... from a Pandaboard side you can try with that in example/video folder . to use them you must copy and paste the config.make and makefile from the template. And yes you must also use the GLles version the glut version will not works for many examples....

jvcleave commented 11 years ago

@KidCoding can you run the command dpkg -l | grep gst and put the output here? Also, what movie are you trying to play?

KidCoding commented 11 years ago

Ok, first of thanks for the fast reply.

my card is a raspberry.

@kalwalt I have copied the config.make (the makefile was already the correct one from template). I tried with the GLES2Renderer but I have the same error.

@jvcleave here is the result of the command

pi@raspberrypi ~ $ dpkg -l | grep gst ii gir1.2-gst-plugins-base-0.10 0.10.36-1 armhf Description: GObject introspection data for the GStreamer Plugins Base library ii gir1.2-gstreamer-0.10 0.10.36-1.1 armhf Description: GObject introspection data for the GStreamer library ii gstreamer0.10-ffmpeg:armhf 0.10.13-5 armhf FFmpeg plugin for GStreamer ii gstreamer0.10-gconf:armhf 0.10.31-3+nmu1 armhf GStreamer plugin for getting the sink/source information from GConf ii gstreamer0.10-plugins-base:armhf 0.10.36-1 armhf GStreamer plugins from the "base" set ii gstreamer0.10-plugins-base-apps 0.10.36-1 armhf GStreamer helper programs from the "base" set ii gstreamer0.10-plugins-good:armhf 0.10.31-3+nmu1 armhf GStreamer plugins from the "good" set ii gstreamer0.10-plugins-ugly:armhf 0.10.19-2 armhf GStreamer plugins from the "ugly" set ii gstreamer0.10-pulseaudio:armhf 0.10.31-3+nmu1 armhf GStreamer plugin for PulseAudio ii gstreamer0.10-tools 0.10.36-1.1 armhf Tools for use with GStreamer ii gstreamer0.10-x:armhf 0.10.36-1 armhf GStreamer plugins for X11 and Pango ii libgstreamer-plugins-base0.10-0:armhf 0.10.36-1 armhf GStreamer libraries from the "base" set ii libgstreamer-plugins-base0.10-dev 0.10.36-1 armhf GStreamer development files for libraries from the "base" set ii libgstreamer0.10-0:armhf 0.10.36-1.1 armhf Core GStreamer libraries and elements ii libgstreamer0.10-dev 0.10.36-1.1 armhf GStreamer core development files

I checked and pi (the user) is part of the video group

For the video, it's a mp4 file codec h264 - MPEG4 AVC res 1280x544.

Thanks, KiD

jvcleave commented 11 years ago

the difference between the window types is that the GLES2 renderer will allow shaders. I almost always use the type in https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/apps/devApps/raspberrypi_hello_world_gles2/src/main.cpp

it looks like you have the right gst stuff - a couple of things I would try

figure out if it is a codec problem: trim the video to 10 seconds max resize it to half it's dimensions, keeping the same codec settings

see if it is just OF not having enough memory/cpu: run sudo raspi-config and give the RPi more GPU memory with the memory split option

bakercp commented 11 years ago

@KidCoding can you post an update on this issue. Did you find a solution? If so, could you post and close, or we can continue the discussion. Thanks!

pikilipita commented 11 years ago

I can confirm that the original finger movie, photo jpeg codec, and h264 movies are playable ( tested with 360p resolution ) , but performances are quite low. Can we expect performances improvements in a near future on the raspberry pi?

danzeeeman commented 11 years ago

Is this still an issue @pikipika ? Performance problems can be added as another bug and we can close this unless it is still an issue. I updated the install dependancies script today to include the required gstreamer packages so it shouldn't be an issue when doing a fresh bring up.

jvcleave commented 11 years ago

It appears the movies are playing and most of the performance questions can be answered here https://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/21