Recent

Author Topic: Problem solving with Tprocess  (Read 651 times)

clintonb

  • New Member
  • *
  • Posts: 18
Problem solving with Tprocess
« on: March 13, 2023, 07:13:36 pm »
I have spent the better part of 2 hours trying to execute ffmpeg with no luck.  I have now reduced it to a simple input and output file and execture but havent been able to get any output.  Is there anyway i could actually see the command that it is executing?

runme:=Tprocess.create(nil);
     runme.executable:='/usr/bin/ffmpeg';
     runme.options:=runme.options+[powaitonexit];

     runme.parameters.add(' -i '+opendialog1.filename);

     runme.parameters.add(' /home/[name]/Desktop/output.mp4');
     runme.parameters.add(' -y');

     runme.execute;
     
I have read the previous posts but as far as i can see its identical but still no output.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11939
  • FPC developer.
Re: Problem solving with Tprocess
« Reply #1 on: March 13, 2023, 08:10:47 pm »
Code: Pascal  [Select][+][-]
  1.      runme.parameters.add(' -i '+opendialog1.filename);


Those are two parameters.  -i and  the filename. Treat them with seperate .adds

Leledumbo

  • Hero Member
  • *****
  • Posts: 8774
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem solving with Tprocess
« Reply #2 on: March 14, 2023, 10:15:02 am »
Code: Pascal  [Select][+][-]
  1.      runme.parameters.add(' -i '+opendialog1.filename);


Those are two parameters.  -i and  the filename. Treat them with seperate .adds
And no need for manually added space, it will be internally taken care of.

 

TinyPortal © 2005-2018