[Development] Encoding video via QtMultimedia?
Matthew Woehlke
mw_triad at users.sourceforge.net
Fri Nov 14 20:40:14 CET 2014
On 2014-07-27 02:00, liuyanghejerry wrote:
> I'm pretty new to QtMultimedia, and I searched around found no way to
> encode videos from QImage or QPixmap.
>
> There is indeed one QMediaRecorder, however it is only possible to
> record videos from QCamera, which is actually inherits QMediaObject, and
> the QMediaObject is very confusing cause it has some connections with
> QMediaService, QMediaControl...oh..
>
> Anyway, is it possible to encode video from QImage? If it is, how? If
> isn't, then any plans?
No one? Bummer... I had the exact same problem, but didn't find a
solution (there may be one, but it seems if there is, it is overly
complicated at best).
I ended up instead dumping my QImage's into a QProcess that is running
ffmpeg ('QImage::save(&process, "bmp")'). It works well except that it
lacks a simple way to get the encode process, so you end up just waiting
until it's done with no way of knowing where it's at.
--
Matthew
More information about the Development
mailing list