[Solved] QML Video on the desktop
Page |
1 |
I’m so impatient waiting for QML to play well with video. When do you think it will get to the point that I can install Qt on my Ubuntu
machine and write a simple video application using the QML Video Element and have it just work? 4.8?
20 replies
Hi,
Sorry to hear the Video element is not working well for you. Can you give more specifics about the problems you are having? What version of Qt Mobility are you using? In general, your best bet for getting issues resolved is to report them via the bug tracker [bugreports.qt.nokia.com].
Regards,
Michael
I have tried installing QtMobility, all of the different versions, on my last attempt I had Qt 4.7 installed with the latest QtMobility and still could not get the simple Video Element example to work. I guess others have gotten it working but my post here is mainly to express frustration with the fact that getting it to work is not a straight forward process and I have trolled the internet looking for solutions to the various errors I was getting with no success. This is not my first time around the block as a developer.
I’m concerned that Qt is putting desktop development on the back burner. At the same time, I’m really interested in playing with QML, but I need multi-media functionality. There is no point in starting a project using phonon at this point.
Okay, I reinstalled Qt sdk 4.7 and QtMobility beta II. Gstreamer errors during install were resolved by adding the required dev libraries for gstreamer. Remaining errors were for opengl which I ignored. Made sure that qmake was in my path and LD_LIBRARY_PATH was set as in instructions. After compiling I noticed that the multimedia kit stuff was not contained in the ../install/lib directory. Why not?
Created a new Quick project in QtCreator and pasted the example using the Video Element from Qt Docs …
- import Qt 4.7
- Video {
- id: video
- width : 800
- height : 600
- source: "video.avi"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- video.play()
- }
- }
- focus: true
- Keys.onSpacePressed: video.paused = !video.paused
- Keys.onLeftPressed: video.position -= 5000
- Keys.onRightPressed: video.position += 5000
- }
Not sure what changes are needed for video.qmlproject ??
edit: Highlighting added / Denis Kormalev
Isn’t it a bit strange that you need Qt Mobility to make multimedia work on the desktop?
Andre, see this [developer.qt.nokia.com]
I’m concerned that Qt is putting desktop development on the back burner. At the same time, I’m really interested in playing with QML, but I need multi-media functionality. There is no point in starting a project using phonon at this point.
Duff, the focus is definitely on Qt Quick and it should work equally well on desktop as compared to mobile platforms. Desktop development is definitely not on the back burner.
Okay, good to hear that from someone at least. Looks like a new version of QtMobility has come out. I’ll try to get the video working with QML video element once again. I understand this QML stuff is still new, so I am definitely not bailing on it. Hopefully, the documentation and build process will come around soon and make getting up and working with it a simpler process. I’ll follow up here with my results with QtMobility 1.1 Final. I guess I’ll uninstall the SDK since that is no longer supported any more. Should I go with Qt 4.7 or 4.7.1? Any suggestions? Also, there is a nice project [piacentini.blog.br] going on to support gstreamer with Qt for more complete gstreamer support. Not applicable to QML at the moment but still worth keeping in mind.
Yay!! It works! After installing Qt 4.7.1 and Qt Mobility 1.1 final, I was able to run the example QML video element with qmlviewer. As for LD_LIBRARY_PATH, I am on ubuntu and setting the path as instructed in the installation instructions (.profile) does not work for Ubuntu. I went the ld.so.conf.d route instead. I guess that worked. interesting that the .pro file was not necessary to get the example working.
Anyway, it looks like I finally get to have some fun with QML. Thanks for the help and suggestions.
@Andre I had same issue on Windows. There was another thread in the forum discussing the same issue but the last time I checked there was not any solution.
In my case, I just gave up Qt Mobility and used VLC with some own binding between QML and VLC. It worked for me as I only needed to play video w/o any overlay QML stuffs on top of video.
You must log in to post a reply. Not a member yet? Register here!







