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?
Forum Updated to NodeBB v4.3 + New Features

How to test ffmpeg in PySide 6.4?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pyside
9 Posts 3 Posters 1.5k 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.
  • G Offline
    G Offline
    greengoblin
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

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

        G Offline
        G Offline
        greengoblin
        wrote on 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

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

            JonBJ 1 Reply Last reply
            0
            • G greengoblin

              Please see below

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

              Thank you

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #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
              0
              • JonBJ JonB

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

                JonBJ 1 Reply Last reply
                0
                • G greengoblin

                  @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

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on 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
                  0
                  • JonBJ JonB

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

                    • Login

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