Results 1 to 2 of 2

Thread: Qprocess that call ffmpeg in mac

  1. #1
    Join Date
    Jan 2013
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Question Qprocess that call ffmpeg in mac

    Hi guys, I would use Qprocess in a GUI Application in mac for call of ffmpeg, I have created the code in this way:

    ..
    #include <QProcess>
    ..

    after

    void MainWindow:n_pushButton_2_clicked()
    {
    QProcess gzip;

    gzip.start("mkdir", QStringList() << "/..PATH../byebye");

    if (!gzip.waitForFinished())
    qDebug() << "Make failed:" << gzip.errorString();
    else
    qDebug() << "Make output:" << gzip.readAll();

    QProcess p;

    p.start("ffmpeg", QStringList() <<"-i"<< "/..PATH../reg.mov"<< "-acodec"<< "pcm_s32le"<<"/..PATH../output.wav");

    if (!p.waitForFinished())

    qDebug() << "Make2 failed:" << p.errorString();
    else
    qDebug() << "Make2 output:" << p.readAll();

    }

    But I have in output:

    Make output: ""
    Make2 failed: "No such file or directory" http://www.qtcentre.org/images/smilies/frown.png

    the first Qprocess make a new dir in the path, but the second Qprocess don't find the file that exist in that path.

    I don't understand if is a visibility or permission denied problem, because if the path are the same and the file .mov exist, why the Qprocess don't find this?

    Thank you very much!

  2. #2
    Join Date
    Apr 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Android

    Default Re: Qprocess that call ffmpeg in mac

    You probably already know this, but just in case be sure that ffmpeg is in the path of the user account, which is running the application. To put it simply, does the application have a way to locate ffmpeg? If not, this can be achieved in one of two ways, add the path to its location to the users PATH or by explicitly supplying the full path to ffmpeg.

    For example, if the full path to where ffmpeg is installed is

    /usr/local/bin/ffmpeg

    You could add /usr/local/bin/ to the users path, or specify the full path to ffmpeg in your call, like this...

    p.start("/usr/local/bin/ffmpeg", QStringList() <<"-i"<< "/..PATH../reg.mov"<< "-acodec"<< "pcm_s32le"<<"/..PATH../output.wav");

    I hope that is clear
    -J

Similar Threads

  1. Replies: 6
    Last Post: 3rd April 2012, 16:20
  2. Replies: 0
    Last Post: 20th September 2011, 08:53
  3. Call QProcess without GUI
    By mattia in forum Newbie
    Replies: 8
    Last Post: 5th November 2007, 14:39
  4. QProcess error to call mogrify
    By mattia in forum Newbie
    Replies: 2
    Last Post: 29th October 2007, 12:46
  5. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 01:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.