Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] QML Video on the desktop
Forum Updated to NodeBB v4.3 + New Features

[Solved] QML Video on the desktop

Scheduled Pinned Locked Moved QML and Qt Quick
21 Posts 9 Posters 19.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duff
    wrote on last edited by
    #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?

    --Duff

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      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":http://bugreports.qt.nokia.com.

      Regards,
      Michael

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Isn't it a bit strange that you need Qt Mobility to make multimedia work on the desktop?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Duff
          wrote on last edited by
          #4

          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.

          --Duff

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kkrzewniak
            wrote on last edited by
            #5

            Can You post the errors You are getting when trying to compile the examples?

            Me, Grimlock, not "nice dino". ME BASH BRAINS!

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Duff
              wrote on last edited by
              #6

              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
              import Qt.multimedia 1.0

              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]

              --Duff

              1 Reply Last reply
              0
              • D Offline
                D Offline
                Duff
                wrote on last edited by
                #7

                Here is the error given when running the project ...

                Starting /home/brian/qtsdk-2010.05/qt/bin/qmlviewer /home/brian/video/video.qml
                file:///home/brian/video/video.qml:2:1: module "Qt.multimedia" is not installed
                import Qt.multimedia 1.1

                --Duff

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  borut123
                  wrote on last edited by
                  #8

                  try this one:

                  import QtMultimediaKit 1.1

                  1 Reply Last reply
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on last edited by
                    #9

                    [quote author="Andre" date="1288082191"]Isn't it a bit strange that you need Qt Mobility to make multimedia work on the desktop? [/quote]
                    Andre, see "this
                    ":http://developer.qt.nokia.com/forums/viewthread/1689/

                    [quote author="Duff" date="1288298273"]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.
                    [/quote]
                    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.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      Duff
                      wrote on last edited by
                      #10

                      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":http://piacentini.blog.br/2010/10/qtgstreamer-an-introduction/ 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.

                      --Duff

                      1 Reply Last reply
                      0
                      • ? This user is from outside of this forum
                        ? This user is from outside of this forum
                        Guest
                        wrote on last edited by
                        #11

                        4.7.1 has quite a few fixes if you see the change log

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          borut123
                          wrote on last edited by
                          #12

                          QML Video element works ok for me.
                          (Qt 4.7.1, Qt Mobility 1.1, QtCreator 2.1beta, Ubuntu 10.10)

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            Duff
                            wrote on last edited by
                            #13

                            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.

                            --Duff

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              borut123
                              wrote on last edited by
                              #14

                              Yes, it's quite simple to add video now.
                              Has anybody tried the same thing on other platforms except Ubuntu?

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                andre
                                wrote on last edited by
                                #15

                                My attempt at Windows 7 was a complete failure. While the library compiles, and I managed to get the component loaded, it simply does not show any video. The audio track for the video is audable though.

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  moo1
                                  wrote on last edited by
                                  #16

                                  @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.

                                  1 Reply Last reply
                                  0
                                  • X Offline
                                    X Offline
                                    xsacha
                                    wrote on last edited by
                                    #17

                                    [quote author="Andre" date="1288082191"]Isn't it a bit strange that you need Qt Mobility to make multimedia work on the desktop? [/quote]

                                    I think of QtMobility more of taking advantage of extra hardware (that not every device has) - in most cases these are things desktops don't have but mobile devices do.

                                    But, video is a bit different. Everything can and should play that. I think the reason why it is separate is it shares a lot of code with other mobility pieces (video record?) and is commonly required for mobile applications. In the past, Qt devs have used other things (like VLC mentioned above).

                                    • Sacha
                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      andre
                                      wrote on last edited by
                                      #18

                                      [quote author="moo1" date="1291424014"]@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.[/quote]
                                      Could you give some more details on that?
                                      I am trying to play some video (also don't need to overlay QML on top) using MPlayer, but so far I am not having much luck. Playing using VLC sounds like a good option!

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        andre
                                        wrote on last edited by
                                        #19

                                        [quote author="xsacha" date="1291425283"][quote author="Andre" date="1288082191"]Isn't it a bit strange that you need Qt Mobility to make multimedia work on the desktop? [/quote]

                                        I think of QtMobility more of taking advantage of extra hardware (that not every device has) - in most cases these are things desktops don't have but mobile devices do.

                                        But, video is a bit different. Everything can and should play that. I think the reason why it is separate is it shares a lot of code with other mobility pieces (video record?) and is commonly required for mobile applications. In the past, Qt devs have used other things (like VLC mentioned above).[/quote]
                                        Well, I still think it is a weird choice. My guess is that it allowed for a faster development outside the main Qt branch. Recording video is equaly valid on non-mobile devices. Think of using a webcam for instance. Most of the other API in QtMobility I totally get being in there. Not many desktops or laptops have too many sensors or are equiped with localization hardware after all, but multimedia needs to be available and Just Work (TM) on all supported platforms, I think.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          Mitricho
                                          wrote on last edited by
                                          #20

                                          Hi, moo1 and Andre! There was a huge bug in QtMobility "http://bugreports.qt.nokia.com/browse/QTMOBILITY-583":http://bugreports.qt.nokia.com/browse/QTMOBILITY-583. To fix it try to apply patch from here: "http://bugreports.qt.nokia.com/browse/QTMOBILITY-783":http://bugreports.qt.nokia.com/browse/QTMOBILITY-783. I've applied this patch and now qml video component works just fine.

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved