I've just installed gstreamer on my Debian Jessie linux. I actually plan to use it within QtMultimedia framework. And though I'm familiar with vlc...I'm new in gstreamer's world.
I tried to run the following very basic qml program:
Window {
visible: true
MediaPlayer {
id: mediaplayer
source: "file:///home/kai/Videos/testx264.mp4"
}
VideoOutput {
anchors.fill: parent
source: mediaplayer
}
MouseArea {
id: playArea
anchors.fill: parent
onPressed:
{
mediaplayer.play()
console.log("error = ", mediaplayer.errorString)
}
}
}
When I try to play the video, I get the sound but no video. In the application output I get the logs below:
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high, codec_data=(buffer)0164001fffe1001e6764001fac56240b435f9f016a040402800000030080000032478c18c4c001000668e88e1f2c8b, width=(int)720, height=(int)404, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'."
qml: error = Cannot play stream of type: <unknown>
However, if I launch gstreamer command line as follow, I can get the video playing correctly:
gst-launch-1.0 filesrc location=/home/kai/Videos/testx264.mp4 ! decodebin name=decoder decoder. ! videoconvert ! xvimagesink decoder. ! audioconvert ! pulsesink
I don't really understand what's happening. I was wondering if my version of Qt was maybe statically link with some gst stuff ? I have installed Qt 5.5 with regular Linux installer.
Should I set some specific settings ? Should I recompile a specific Qt component respectively ?
Z.