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. Generating .avi or .mpg animations from Qt? (from sequence of QImages or QPixmaps)
Forum Update on Monday, May 27th 2025

Generating .avi or .mpg animations from Qt? (from sequence of QImages or QPixmaps)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.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.
  • P Offline
    P Offline
    Phil Weinstein
    wrote on last edited by
    #1

    We are generating on-screen animations in Qt 4.8.6 widgets on Windows (just redrawing, based on a repeating QTimer). Does Qt4 or Qt5 proper support (or will Qt5 soon support) generation of .mpg / .mpeg (MPEG) or .avi files for generated animations? I'm imagining that this would be done by providing a sequence of QImages or QPixmaps having consistent dimensions, perhaps with a specified frame rate. Short of that, are there any well supported third-party Qt packages for doing this?

    Thanks in advance,
    Phil Weinstein
    CADSWES, University of Colorado

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Take a look on "Camera Example":http://qt-project.org/doc/qt-5/qtmultimediawidgets-camera-example.html
      Is it what you are looking for ?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Phil Weinstein
        wrote on last edited by
        #3

        Thank you andrey. Re: The QtMultimediaWidgets 5.3 Camera Example. Maybe.

        But I don't see (a) any application-level API or Qt API in there which receives a QImage from the application, OR (b) virtual methods which are provided a QPainter to draw in (called asynchronously). Or something.

        What am I missing? WHERE DO I get my sequence of QImages (or QPixmaps) to a place in that code which generates movie files (MPEG or something)?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          AFAIK there is no such API in Qt.
          Looks like Camera Example will not work for you.
          You may try to use ffmpeg or gstreamer to encode images into video.

          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