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. Using ffmpeg and Qt
Forum Updated to NodeBB v4.3 + New Features

Using ffmpeg and Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 2.3k Views 2 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.
  • S Offline
    S Offline
    Saviz
    wrote on 9 Apr 2023, 20:20 last edited by
    #1

    I made a simple program using ffmpeg to work with multimedia. I accomplished this by calling ffmpeg using QProcess and I gained valuable experience with it. During this implementation I noticed that there are certain problems that come with it such as not having full control over the library and the functionality of it.

    I am always excited to know how other more experienced programmers accomplish this.

    So here is my question:

    • From your personal experience, what is a better solution to using ffmpeg and other third party libraries in Qt?

    • Do you use QProcess to call the executable in a separate process or do you integrate the libraries in your program?

    • What are the drawbacks of each method?

    • What is your preferred method?

    Thank you for taking the time to read and respond to my topic.

    J 1 Reply Last reply 10 Apr 2023, 15:29
    0
    • K Offline
      K Offline
      Kent-Dorfman
      wrote on 10 Apr 2023, 01:32 last edited by
      #2

      ffmpeg is based on the libavcodec libraries. best results will always be to learn the API and use the libraries directly. ffmepg utility is a victim of years of incremental development, so the user-itnerface sux and in many cases is just plain buggy. ffmpeg also uses the amateurish hack of embeddedin console control sequences right in the program diagnostics output instead of using an intermediate like libcurses. While it is a popular and necessary swiss army knife of multimedia conversion, it is not well written.

      S 1 Reply Last reply 10 Apr 2023, 02:10
      1
      • K Kent-Dorfman
        10 Apr 2023, 01:32

        ffmpeg is based on the libavcodec libraries. best results will always be to learn the API and use the libraries directly. ffmepg utility is a victim of years of incremental development, so the user-itnerface sux and in many cases is just plain buggy. ffmpeg also uses the amateurish hack of embeddedin console control sequences right in the program diagnostics output instead of using an intermediate like libcurses. While it is a popular and necessary swiss army knife of multimedia conversion, it is not well written.

        S Offline
        S Offline
        Saviz
        wrote on 10 Apr 2023, 02:10 last edited by
        #3

        @Kent-Dorfman As much as I am impressed by the capabilities of the ffmpeg library, I have to admit that you are indeed correct! ffmpeg is not written well. As a result I am worried I might spend months trying to figure out the API and come to no conclusion. Is there a better alternative that offers similar capabilities in a C++ language? (Except for QtMultimedia of course)

        S K 2 Replies Last reply 10 Apr 2023, 02:14
        0
        • S Saviz
          10 Apr 2023, 02:10

          @Kent-Dorfman As much as I am impressed by the capabilities of the ffmpeg library, I have to admit that you are indeed correct! ffmpeg is not written well. As a result I am worried I might spend months trying to figure out the API and come to no conclusion. Is there a better alternative that offers similar capabilities in a C++ language? (Except for QtMultimedia of course)

          S Offline
          S Offline
          sjlee
          wrote on 10 Apr 2023, 02:14 last edited by
          #4

          @Saviz

          Hi, I recommend to research ffplay that uses ffmpeg libraries and SDL. You can embed SDL into your Qt app.

          S 1 Reply Last reply 10 Apr 2023, 02:17
          1
          • S sjlee
            10 Apr 2023, 02:14

            @Saviz

            Hi, I recommend to research ffplay that uses ffmpeg libraries and SDL. You can embed SDL into your Qt app.

            S Offline
            S Offline
            Saviz
            wrote on 10 Apr 2023, 02:17 last edited by
            #5

            @sjlee Very nice. I will check it out. Thank you.

            1 Reply Last reply
            0
            • S Saviz
              10 Apr 2023, 02:10

              @Kent-Dorfman As much as I am impressed by the capabilities of the ffmpeg library, I have to admit that you are indeed correct! ffmpeg is not written well. As a result I am worried I might spend months trying to figure out the API and come to no conclusion. Is there a better alternative that offers similar capabilities in a C++ language? (Except for QtMultimedia of course)

              K Offline
              K Offline
              Kent-Dorfman
              wrote on 10 Apr 2023, 14:22 last edited by
              #6

              @Saviz said in Using ffmpeg and Qt:

              Is there a better alternative that offers similar capabilities in a C++ language?

              IMHO, no...It is the standard for open source multimedia conversion.

              1 Reply Last reply
              0
              • S Saviz
                9 Apr 2023, 20:20

                I made a simple program using ffmpeg to work with multimedia. I accomplished this by calling ffmpeg using QProcess and I gained valuable experience with it. During this implementation I noticed that there are certain problems that come with it such as not having full control over the library and the functionality of it.

                I am always excited to know how other more experienced programmers accomplish this.

                So here is my question:

                • From your personal experience, what is a better solution to using ffmpeg and other third party libraries in Qt?

                • Do you use QProcess to call the executable in a separate process or do you integrate the libraries in your program?

                • What are the drawbacks of each method?

                • What is your preferred method?

                Thank you for taking the time to read and respond to my topic.

                J Offline
                J Offline
                JoeCFD
                wrote on 10 Apr 2023, 15:29 last edited by
                #7

                @Saviz gstreamer is another option for multimedia if you use qml to make GUI. You do not need qprocess to run it.

                1 Reply Last reply
                0

                1/7

                9 Apr 2023, 20:20

                • Login

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