Java代码   收藏代码
  1. poc = new QProcess(this);  
  2.    QString command = QString("D:/ffmpeg-bbezxcy-compressMode-0.0.1/bin/ffmpeg -i F:rawvideo/1.mp4 -pass 1 -y F:/rawvideo/1xxx1.mp4");  
  3.   connect(poc, SIGNAL(readyReadStandardOutput()), this, SLOT(sltOnReadOutput()));  
  4.    connect(poc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(onFinished(int, QProcess::ExitStatus)));  
  5.   
  6.    //poc->start("D://ffmpeg.bat");  
  7.    poc->setProcessChannelMode(QProcess::MergedChannels);  
  8.    poc->start(command);  

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

Cpp代码   收藏代码
  1. void QtClass::sltOnReadOutput(){  
  2.     QString s = poc->readAllStandardOutput();  
  3. }  
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐