[Interest] QProcess performance issues
Matthew Woehlke
mw_triad at users.sourceforge.net
Tue May 12 23:36:59 CEST 2015
On 2015-05-12 14:21, Matthew Woehlke wrote:
> I have an application that generates a series of images (QImage) and
> writes them to disk as a video. I am encoding the video using an
> external FFmpeg process, which I start and communicate with via
> QProcess. I feed this the images via its stdin, using QImage::save to
> write them to the QProcess in BMP format (FFmpeg options '-f image2pipe
> -c:v bmp -i -').
>
> This works fine on Linux. On Windows, it is APPALLINGLY slow; on the
> order of seconds per frame. Also, on Windows, it takes a very long time
> (minutes) before even the initial output from FFmpeg appears. (I'm using
> QProcess::ForwardedChannels, although switching to default and just
> letting the output buffer doesn't seem to make a difference.)
After further testing, it seems that the problem is caused by writing to
the process's stdin? Is there some issue with writing to a QProcess's
input pipe on Windows? (We are writing quite a lot - many MiB's - of
data...)
(BTW, this is with Qt 4.8.6.)
--
Matthew
More information about the Interest
mailing list