[Interest] QtQuick and Video

Pritam pritam_ghanghas at infosys.com
Mon Nov 5 14:08:07 CET 2012

On Monday 05 November 2012 05:24 PM, Robert Voinea wrote:
> Hi
> Has anyone tried the QtQuick 1.0/1.1 and Video combination?
> I have to implement a simple interface for several video streaming sources in
> QML (one video "window" and several buttons that change the video source) and
> I don't seem to get it right.
> I am using ubuntu 12.10.
> QtMultimediaKit is installed, and phonon-backend-vlc... and phonon-backend-
> gstreamer. In system settings I have set vlc as the preffered phonon
> backend... But it get this on the console when I try to load a simple video
> (captured with VLC from my laptop's webcam):
> 	(test:11708): GStreamer-CRITICAL **: gst_object_ref: assertion `object !=
> NULL' failed
> 	(test:11708): GStreamer-CRITICAL **: gst_object_ref: assertion `object !=
> NULL' failed
> 	(test:11708): GStreamer-CRITICAL **: gst_element_set_state: assertion
> `GST_IS_ELEMENT (element)' failed
> Apparently phonon ignores the vlc backend and always uses gstreamer.
> (any ideea how can I force phonon to use the vlc backend instead of
> gstreamer?)
> At this point I don't use streams... but a single file (OGG/Theora).
> This is my test file:
> import Qt 4.7
> import QtMultimediaKit 1.1
> Rectangle
> {
> 	id: rootWindow
> 	width: 1024
> 	height: 768
> 	Video
> 	{
> 		id: video
> 		width: 640
> 		height: 480
> 		anchors
> 		{
> 			centerIn: parent
> 		}
> 		fillMode: Video.PreserveAspectFit
> 		source: 'test.ogv'
> 	}
> }
> I have tried with both gstreamer and vlc backends. I don't care which one I
> have to use as long as I can set the source as an URL...
> At the moment I am considering writing my own QML element that displays a
> video stream using (probably) the native vlc API... or something like this:
> http://www.meegoexperts.com/2011/09/phonon-video-player-qml/.
> Thank you in advance! :)

QtMultimediaKit or QtMultimedia doesnt depend on phonon. The backend for 
them on Linux is GStreamer.
If you have gstreamer installed and still not able to play, test that 
gstreamer plugins required for your media are installed.
To test that, you can try playing your media in Totem, it has plugin 
discovery built in. If it plays problem is with your Qt Build (if you 
built Qt yourself) or your qt code. If doesn't play it will tell you 
which  plugins to install.


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

More information about the Interest mailing list