Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qprocess don't work, when I use FFmpeg commands.
Forum Updated to NodeBB v4.3 + New Features

Qprocess don't work, when I use FFmpeg commands.

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 745 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NintyS
    wrote on last edited by
    #1

    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";
    
    }
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      replace ~ with the full path - it's a shell feature.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • N Offline
        N Offline
        NintyS
        wrote on last edited by
        #3

        I must connect all arguments and I now have this "Output file #0 does not contain any stream" I go search in internet.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @NintyS said in Qprocess don't work, when I use FFmpeg commands.:

          I go search in internet.

          Please read my post above ...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • N Offline
            N Offline
            NintyS
            wrote on last edited by
            #5

            @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.

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              Please show your arguments you've tested without ~ and why does your filename ends with '\n' ? This will not work.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              2
              • N Offline
                N Offline
                NintyS
                wrote on last edited by
                #7

                Ok, my bad, I give arguments without spaces and with path this will be working :) ( ThX m8 )

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved