QProcess :: setStandardOutputFile creates only 0kb file

I use a simple QProcess-Project on a WindowsXP machine:

QString program = "U:\\ffmpeg.exe";
QStringList arguments;
arguments << "-i" << "U:\\clock.avi" << "U:\\tmp_jpeg\\foo-%03d.jpeg";

process.setStandardOutputFile("U:\\log.txt", QIODevice::Append);
process.start(program, arguments);

The process works just fine, ffmpeg creates all the files I want. But the log file remains completely empty. The same thing happens when I want to write standard output in qDebug () ... Why is this happening and how can I fix it?

+3
source share
1 answer

, : " " " ". , ( std::cout std::cerr). , , stderr - , ..

ffmpeg, , stdout (, , ), stderr. , setStandardErrorFile() .

+8

Source: https://habr.com/ru/post/1721066/


All Articles