View Full Version : Phonon::VideoPlayer black widget

7th September 2012, 16:24
I'm using an Ubuntu VM and produced a very basic media player using Phonon::VideoPlayer. To get it working I had to install two libraries:

sudo apt-get install libphonon-dev
sudo apt-get install gstreamer0.10-ffmpeg

This was working fine and the videos played. However, now I'm getting an empty black frame and I'm not sure what's changed. It doesn't look like the code has changed (I've checked SVN logs and looked at the revision graphs) and the movie files are in the same location (I have .avi, .flv and .mov files). I definitely haven't changed my VM setup or monkeyed about with system settings.

I've reinstalled the above libraries but that didn't make any difference so I'm at a loose end.

Does anyone have an idea what this could be? Usually the problems people have with Phonon is getting it working in the first place but that's not my issue.

The code is straightforward taken from a class defined with
MoviePlayer::MoviePlayer(QWidget *parent) : QWidget(parent) which is just a QWidget on a .ui form.

Phonon::VideoPlayer* vp = Phonon::VideoPlayer(Phonon::VideoCategory, this);

Any help is appreciated, thanks

Added after 1 15 minutes:

Further to this, the qmediaplayer demo works fine using the same videos. This would indicate the problem isn't due to codecs not being installed.

I'm currently going through the code in that project to see what is different. I'll post any findings here...

Found the problem...

QApplication::setColorSpec(QApplication::ManyColor );

This was preventing the videos from being displayed so commenting that out work.

Could someone explain this please?