using gstreamer and vaapi

Hello,

I’m very new to OF and c++ (coming from Basic and Pascal)

I’m using OF on Linux (Ubuntu 13.10) with code:blocks. I started with the VideoPlayer Example and modified it in a way to simply play a HD video in full size.

Unfortunately I have big performance issues. The video (h246 1920x1080@60p in mp4 container) plays with approx. 5 frames/second. My machine is a Intel® Core™ i5-2430M CPU @ 2.40GHz × 4 with 6 GB RAM (but running a 32Bit Ubuntu with PAE). The Graphics is Intel® Sandybridge Mobile x86/MMX/SSE2 GPU Type: HD 3000.

if I play the video in OF I have always one cpu core running at 100%.
If I play using gstreamer directly

  
gst-launch-0.10 -v filesrc location=/path/to/my/movie/movie.mp4 ! qtdemux ! vaapidecode ! vaapisink  

I have a fluid video playback and none of my 4 CPU cores has more than 20% load.

I think the problem is that gstreamer in the OF environment is not using vaapi to decode the video, so there is no hardware acceleration. Unfortunately I have no idea how to achieve this.

Any help or hints are very welcome.

the main problem is that OF uses version 1.0 of gstreamer by default now and due to a last minute error ubuntu 13.10 didn’t packaged vaapi for gstreamer 1.0

even with that OF can use 0.10 but the current video player would need to be modified to use vaapi if it’s possible at all right now. vaapisink creates it’s own window where it receives gl buffers from the vaapi decoder but as far as i’ve seen there’s no easy way to get those buffers from an application so we can render them to a texture created externally to gst

Thanks for the reply. Can you recommend any distribution that has vaapi 1.0 suppport out of the repository? I’ve goggled for that but did not find something till now.

even if you had vaapi support it’ll be hard to get the videoplayer working with it but i think the latest fedora might have it, not sure though

I tried Manjaro Linux (an Arch Linux) and get gsteramer 1 with vaapi support working. But as you mentioned, it is to hard for me to get the videoplayer working with that. Currently I try my luck with QT and ffmpeg, but I would love to use OF.