Important: Please read the Qt Code of Conduct -

How to insert ffmpeg option to QProcess

  • Hi everyone. I have little problem with QProcess.
    i can run basic command,

    QProcess *vconv = new QProcess;
    QString input_file=" /home/gafi/copypastetoroot.avi";
    QStrng output_file="/home/gafi/copypastetoroot.mkv ";
    QString program = "ffmpeg";
    QStringList arguments;
    arguments << "-i" << input_file << output_file;
    vconv -> start(program, arguments);

    but if i add some option i got error "At least one output file must be specified"
    arguments <<"-i" << input_file << "-q:v 1" << output_file;

    i tried in terminal it run normally
    ffmpeg -i /home/gafi/copypastetoroot.avi -q:v 1 /home/gafi/copypastetoroot.mkv

    How to insert the options? thank you.

  • solved. i have to split each options and value into single string

Log in to reply