Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to test ffmpeg in PySide 6.4?

How to test ffmpeg in PySide 6.4?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pyside
9 Posts 3 Posters 1.4k 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.
  • G Offline
    G Offline
    greengoblin
    wrote on 31 Oct 2022, 20:27 last edited by
    #1

    I am trying to test media player with ffmpeg in PySide 6.4. From this link https://doc-snapshots.qt.io/qt6-6.4/qtmultimedia-index.html it says: "You can test the FFmpeg backend right now by using a Qt build that has FFmpeg enabled and setting the QTMEDIABACKEND environment variable to ffmpeg: export QTMEDIABACKEND=ffmpeg"

    This statement above seems to be for C++.
    Could somebody provide some tips on how to do that in PySide?
    I have installed the latest PySide 6.4
    Thank you

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 31 Oct 2022, 20:34 last edited by
      #2

      Hi and welcome to devnet,

      I would define it in the terminal where you start your script.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply 31 Oct 2022, 20:58
      0
      • S SGaist
        31 Oct 2022, 20:34

        Hi and welcome to devnet,

        I would define it in the terminal where you start your script.

        G Offline
        G Offline
        greengoblin
        wrote on 31 Oct 2022, 20:58 last edited by
        #3

        @SGaist thank you for the quick reply.

        I apologize but I did not get your comment. I need to define what and how?
        Do I need to add another package to my pyside6.4 package (which I installed using pip)?
        I grepped the pyside6.4 package that was installed and could not find any occurrence of ffmpeg in it.
        I am new to pyside (and Qt) and have never tested a functionality which is not yet in production before.

        Thank you for your understanding.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Nov 2022, 20:16 last edited by
          #4

          Let's go from the start:

          • what are you using to start your Python application ?
          • do you know what an environment variable is ?
          • which OS are you running ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply 1 Nov 2022, 21:00
          0
          • S SGaist
            1 Nov 2022, 20:16

            Let's go from the start:

            • what are you using to start your Python application ?
            • do you know what an environment variable is ?
            • which OS are you running ?
            G Offline
            G Offline
            greengoblin
            wrote on 1 Nov 2022, 21:00 last edited by
            #5

            Please see below

            1. python <myapp.py> from command prompt
            2. I have set and used them in Windows.
            3. Windows 10

            Thank you

            J 1 Reply Last reply 1 Nov 2022, 21:05
            0
            • G greengoblin
              1 Nov 2022, 21:00

              Please see below

              1. python <myapp.py> from command prompt
              2. I have set and used them in Windows.
              3. Windows 10

              Thank you

              J Offline
              J Offline
              JonB
              wrote on 1 Nov 2022, 21:05 last edited by JonB 11 Jan 2022, 21:06
              #6

              @greengoblin said in How to test ffmpeg in PySide 6.4?:

              python <myapp.py> from command prompt

              The suggestion is just before that line try putting in:
              set QT_MEDIA_BACKEND=ffmpeg

              Whether this is intended to work under Windows I don't know.

              G 1 Reply Last reply 1 Nov 2022, 23:21
              0
              • J JonB
                1 Nov 2022, 21:05

                @greengoblin said in How to test ffmpeg in PySide 6.4?:

                python <myapp.py> from command prompt

                The suggestion is just before that line try putting in:
                set QT_MEDIA_BACKEND=ffmpeg

                Whether this is intended to work under Windows I don't know.

                G Offline
                G Offline
                greengoblin
                wrote on 1 Nov 2022, 23:21 last edited by
                #7

                @JonB Thank you but this did not work.

                As per my initial question, this statement " by using a Qt build that has FFmpeg enabled" is bothering me. How can I confirm that the version of PySide 6.4 that I installed indeed has ffmpeg? That's why I was asking if I need to install anything else.

                Thank you

                J 1 Reply Last reply 2 Nov 2022, 08:57
                0
                • G greengoblin
                  1 Nov 2022, 23:21

                  @JonB Thank you but this did not work.

                  As per my initial question, this statement " by using a Qt build that has FFmpeg enabled" is bothering me. How can I confirm that the version of PySide 6.4 that I installed indeed has ffmpeg? That's why I was asking if I need to install anything else.

                  Thank you

                  J Offline
                  J Offline
                  JonB
                  wrote on 2 Nov 2022, 08:57 last edited by
                  #8

                  @greengoblin
                  My suspicion is that this would have nothing to do with the PySide. Rather however the Qt6.4. it uses has been built. And assuming the PySide6 comes with a pre-compiled Qt6.4 I don't know how you would know, and that might well have been built without the necessary flag/support.

                  Thank you but this did not work.

                  Does this mean it behaved no differently from before, i.e. no message about the environment variable/ffmpeg now?

                  G 1 Reply Last reply 2 Nov 2022, 12:33
                  0
                  • J JonB
                    2 Nov 2022, 08:57

                    @greengoblin
                    My suspicion is that this would have nothing to do with the PySide. Rather however the Qt6.4. it uses has been built. And assuming the PySide6 comes with a pre-compiled Qt6.4 I don't know how you would know, and that might well have been built without the necessary flag/support.

                    Thank you but this did not work.

                    Does this mean it behaved no differently from before, i.e. no message about the environment variable/ffmpeg now?

                    G Offline
                    G Offline
                    greengoblin
                    wrote on 2 Nov 2022, 12:33 last edited by
                    #9

                    I made some progress. I recreated a new virtual environment and reinstalled PySide. However, when I set the environment variable I get an error. Note that I am using the example player that comes with PySide

                    (ffmpeg) C:\ffmpeg>
                    (ffmpeg) C:\ffmpeg>set QT_MEDIA_BACKEND=ffmpeg

                    (ffmpeg) C:\ffmpeg>python player.py
                    could not load multimedia backend "ffmpeg"
                    QtMultimedia is not currently supported on this platform or compiler.

                    (ffmpeg) C:\ffmpeg>

                    If I do not set the variable, the player starts fine.

                    1 Reply Last reply
                    0

                    1/9

                    31 Oct 2022, 20:27

                    • Login

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