当前位置:   article > 正文

[ffmpeg]通过Qt调用ffmpeg命令

qt调用ffmpeg命令行
  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. //poc->start("D://ffmpeg.bat");
  6. poc->setProcessChannelMode(QProcess::MergedChannels);
  7. poc->start(command);

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

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

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/758473
推荐阅读
相关标签
  

闽ICP备14008679号