Unsolved Qprocess don't work, when I use FFmpeg commands.
-
Hello, i have soon deadline and I need a fast help. I use Qprocess to run FFmpeg commands but nothing work. I mean no errors but commands which recording don't record and I don't see Andy new files in folder where files must be saved.
readAllStandardError give me nothing.
This is the code: ```
void MainWindow::Recording(){ qDebug() << "Nagrywam!"; Qrec.setProcessChannelMode(QProcess::MergedChannels); Qrec.setProgram("/Users/nintyswinty/Desktop/Dev/Qt/build-PlazaPCO-Desktop_Qt_5_15_1_clang_64bit-Debug/ffmpeg"); Qrec.setArguments({"-framerate", "30", "-f", "avfoundation", "-i", "1", "-f", "avfoundation", "-framerate", "30", "-i", "0", "-c:v", "libx264", "-crf", "0", "-preset", "ultrafast", "~/Desktop/PlazaPCO/" + QString::fromStdString(date) + ".mkv\n"}); Qrec.start(); Qrec.waitForFinished(); qDebug() << "Koniec - nagrywam"; }
-
replace
~
with the full path - it's a shell feature. -
I must connect all arguments and I now have this "Output file #0 does not contain any stream" I go search in internet.
-
@NintyS said in Qprocess don't work, when I use FFmpeg commands.:
I go search in internet.
Please read my post above ...
-
@Christian-Ehrlicher said in Qprocess don't work, when I use FFmpeg commands.:
Please read my post above ...
I have read this and this don't change any thing. If I use "~" or path there is the same problem.
-
Please show your arguments you've tested without ~ and why does your filename ends with
'\n'
? This will not work. -
Ok, my bad, I give arguments without spaces and with path this will be working :) ( ThX m8 )