Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAbstractVideoSurface and QVideoProbe issues
QtWS25 Last Chance

QAbstractVideoSurface and QVideoProbe issues

Scheduled Pinned Locked Moved Solved General and Desktop
qtmultimediaqmediaplayerqt5.4qabstractvideosqvideoprobe
9 Posts 4 Posters 4.2k Views
  • 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.
  • S Offline
    S Offline
    s.gatich
    wrote on 23 Mar 2015, 08:19 last edited by A Former User 7 Jun 2016, 13:18
    #1

    Hello.
    I have a problem with getting frames from QMediaPlayer. I try to connect it with QVideoProbe object, or with an object of class derived from QAbstractVideoSurface. If I connect media player with QVideoWidget object, it plays the video correctly, so the problem is not concerned with codecs.

    If I connect media player with cVideoSurface (class derived from QAbstractVideoSurface), function present() is never called. When I test my program in debug mode, breakpoint in this function is never reached.

    If I connect media player with QVideoProbe, it never emits the signal videoFrameProbed(). I connect the signal with slot in my MainWindow class, the breakpoint is never reached too.

    This problem hinders me to finish my project, this is a final step, and I've tried many options, but without success. I've created a simple test project, which shows similar behaviour of classes listed above. It can be downloaded here:

    https://www.dropbox.com/s/h0lnxxgxb71x3po/TestProject.rar?dl=0

    The archive contains MP4 video to play in the project. You can choose three options:

    • QVideoProbe as output;
    • cVideoSurface as output;
    • QVideoWidget as output;
      One option at the time, others are commented. The code is careless, because it's a test.

    I work in Windows XP and use Qt Creator 3.3 (MinGW 32 bit), Qt 5.4. Thanks for your attention, I will be happy to get an answer to my question, especially from Yoann Lopez.

    All the best,
    Sergey.

    G 1 Reply Last reply 23 Mar 2015, 09:37
    0
    • C Offline
      C Offline
      cincirin
      wrote on 23 Mar 2015, 09:19 last edited by cincirin
      #2

      See Qt Multimedia on Windows Limitations
      "the DirectShow plugin does not support any low-level video functionality such as monitoring video frames being played or recorded using QVideoProbe or related classes"

      S 1 Reply Last reply 23 Mar 2015, 09:30
      1
      • C cincirin
        23 Mar 2015, 09:19

        See Qt Multimedia on Windows Limitations
        "the DirectShow plugin does not support any low-level video functionality such as monitoring video frames being played or recorded using QVideoProbe or related classes"

        S Offline
        S Offline
        s.gatich
        wrote on 23 Mar 2015, 09:30 last edited by s.gatich
        #3

        @cincirin

        Thanks. Does it mean that I should simply rebuild my project in Windows Vista or newer? Should I make any changes in order to choose Media Foundation instead of DirectShow, or it will be chosen automatically?

        1 Reply Last reply
        0
        • S s.gatich
          23 Mar 2015, 08:19

          Hello.
          I have a problem with getting frames from QMediaPlayer. I try to connect it with QVideoProbe object, or with an object of class derived from QAbstractVideoSurface. If I connect media player with QVideoWidget object, it plays the video correctly, so the problem is not concerned with codecs.

          If I connect media player with cVideoSurface (class derived from QAbstractVideoSurface), function present() is never called. When I test my program in debug mode, breakpoint in this function is never reached.

          If I connect media player with QVideoProbe, it never emits the signal videoFrameProbed(). I connect the signal with slot in my MainWindow class, the breakpoint is never reached too.

          This problem hinders me to finish my project, this is a final step, and I've tried many options, but without success. I've created a simple test project, which shows similar behaviour of classes listed above. It can be downloaded here:

          https://www.dropbox.com/s/h0lnxxgxb71x3po/TestProject.rar?dl=0

          The archive contains MP4 video to play in the project. You can choose three options:

          • QVideoProbe as output;
          • cVideoSurface as output;
          • QVideoWidget as output;
            One option at the time, others are commented. The code is careless, because it's a test.

          I work in Windows XP and use Qt Creator 3.3 (MinGW 32 bit), Qt 5.4. Thanks for your attention, I will be happy to get an answer to my question, especially from Yoann Lopez.

          All the best,
          Sergey.

          G Offline
          G Offline
          gs_chris
          wrote on 23 Mar 2015, 09:37 last edited by
          #4

          @s.gatich
          I am not sure that I am directly addressing your issue, but I am not able to reproduce your problem. I took your code, commented out everything between line 28-46, uncommented the line with "player_->setVideoOutput( surface_ );", and ran the program. The output shows continous "success" lines from the getFrame method..

          S 1 Reply Last reply 23 Mar 2015, 09:44
          2
          • G gs_chris
            23 Mar 2015, 09:37

            @s.gatich
            I am not sure that I am directly addressing your issue, but I am not able to reproduce your problem. I took your code, commented out everything between line 28-46, uncommented the line with "player_->setVideoOutput( surface_ );", and ran the program. The output shows continous "success" lines from the getFrame method..

            S Offline
            S Offline
            s.gatich
            wrote on 23 Mar 2015, 09:44 last edited by
            #5

            @gs_chris Thanks. Please tell me what OS do you run? I suppose it's Vista or newer, am I right?

            As cincirin wrote, DirectShow does not support low-level processing. But Win XP (I use it) only contains DirectShow, it does not support Media Foundation.

            G 1 Reply Last reply 23 Mar 2015, 11:54
            0
            • S s.gatich
              23 Mar 2015, 09:44

              @gs_chris Thanks. Please tell me what OS do you run? I suppose it's Vista or newer, am I right?

              As cincirin wrote, DirectShow does not support low-level processing. But Win XP (I use it) only contains DirectShow, it does not support Media Foundation.

              G Offline
              G Offline
              gs_chris
              wrote on 23 Mar 2015, 11:54 last edited by
              #6

              @s.gatich yes, I'm on Windows 8. That will be the reason

              S 1 Reply Last reply 23 Mar 2015, 12:08
              0
              • G gs_chris
                23 Mar 2015, 11:54

                @s.gatich yes, I'm on Windows 8. That will be the reason

                S Offline
                S Offline
                s.gatich
                wrote on 23 Mar 2015, 12:08 last edited by
                #7

                @gs_chris Thanks again. I will rebulid my project, and, if succeed, put "solved" on the topic.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  s.gatich
                  wrote on 25 Mar 2015, 10:47 last edited by
                  #8

                  The problem was in Windows XP as expected. Qt doesn't support low level video processing with DirectShow, therefore I complied the project in Win 7. Moreover, MinGW connects the program with DirectShow, so I used MSVS compiler, and the program started to work correctly.

                  @gs_chris @cincirin

                  Guys, thanks for replies.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    karti gesar
                    wrote on 6 Jul 2016, 13:04 last edited by
                    #9

                    i am using window7 it not supporting

                    1 Reply Last reply
                    1

                    • Login

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