I'm trying to play a video using QtMediaPlayer in Raspberry pi 2 B. The source code is as follows:
QMediaPlayer *media;
QVideoWidget *video;
...
...
media = new QMediaPlayer(parent);
video = new QVideoWidget(parent);
media->setVideoOutput(video);
media->setMedia(QUrl::fromLocalFile("/home/pi/Desktop/test3.mp4"));
media->play();
But the result is a blank video screen and the following error:
** (Bus:2148): WARNING **: ffmpegcolorspace-vo: size 1105920 is not a
multiple of unit size 829440
Error: "GStreamer encountered a general stream error."
System Information
Running latest raspbian Jessie OS, Installed Qt5.3, Installed gstreamer0.10-plugins-good/bad/ugly/ffmpeg and Installed Mpeg-2 License
Here is the video test3.mp4
I ran this code in Windows with Qt5 installed; it is working there. But it's not working in the Raspberry pi. Please tell me what I'm missing here.
Trying Pipe from Shell
GST_DEBUG=3 ./yourapp
gst-launch-0.10 videotestsrc ! ffmpegcolorspace ! autovideosink