Well your QImages are going to display device optimized, your video needs to be YUV (or some other video format) There exists a multitude of utlities that can take images and use them as frames. FFMPeg is one. GraphicsMagick (Like ImageMagick but MIT licensed) is another.  Availible as exe or library
 
Sent: Tuesday, January 26, 2016 at 3:14 PM
From: "Phil Weinstein" <ph...@indra.com>
To: interest@qt-project.org
Subject: Re: [Interest] Getting QImages into QMediaRecoder to create video files (e.g. avi, mp4, or animated gif)?
Unfortunately, Qt commercial license support folks are confirming that, currently (as of Qt 5.6), there is no way to get a sequence of programmatically generated QImages (e.g. renders from an application QWidget) into the QMediaRecorder class.  ("There is no API for that").

Related -- they also could not offer any information about a Google WebM / VP8 solution.  That really looks like a promising approach, though the integration is technically challenging.  As far as I can tell, that really is the only virtually bullet-proof legal approach to generating synthetic videos (i.e. animations generated programmatically, saved as video files).  http://www.webmproject.org/about/

- Phil

On 1/24/2016 11:50 AM, Phil Weinstein wrote:
Relative to this topic, "Video file generation from Qt application, other than FFmpeg" (on this "interest" e-mail list, in the wrong place, and also thread: https://forum.qt.io/topic/63105/video-file-generation-from-qt-application-other-than-ffmpeg) there's been suggestions in related Qt forums, possibly referring to the Qt5 QMediaRecorder class, that video file generation can be done in "just" Qt.

In the Qt5 documentation, there is just a little information about using QCamera in conjunction with QMediaRecorder to create video files ("record video to disk") ...

However, I'm not seeing any way to get QImages or QPixmaps into either of these classes (QCamera or QMediaRecorder), nor their base classes.  So I don't see how these can be used to generate video files from synthetic (program-created) images.  (Ultimately, the frame images would come from "rendering" our QWidgets to QPixmaps or QImages).

Also, there doesn't seem to be any information about whether anything special has to be done with respect to video codecs for creating video files (e.g. avi, mp4, or animated gif).  I'd like to give it a try, but that's not doable (nor meaningful) if we can't get QImages and QPixmaps into these Qt5 video-handling classes.
---

_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to