`
暴风雪
  • 浏览: 377881 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

[ffmpeg]通过Qt调用ffmpeg命令

阅读更多
 poc = new QProcess(this);
    QString command = QString("D:/ffmpeg-bbezxcy-compressMode-0.0.1/bin/ffmpeg -i F:rawvideo/1.mp4 -pass 1 -y F:/rawvideo/1xxx1.mp4");
   connect(poc, SIGNAL(readyReadStandardOutput()), this, SLOT(sltOnReadOutput()));
    connect(poc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(onFinished(int, QProcess::ExitStatus)));

    //poc->start("D://ffmpeg.bat");
    poc->setProcessChannelMode(QProcess::MergedChannels);
    poc->start(command);

 在Qt的槽中这样获取ffmpeg的字符串

void QtClass::sltOnReadOutput(){
    QString s = poc->readAllStandardOutput();
}

 

1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics