Hello!
I am trying to run an ffmpeg command from within a lazarus program on Linux. It should take a radio stream, extract the metadata and write to a file. I know the command works because if I type into a terminal (using
http://c2.auracast.net:8048/stream as an example)
/usr/bin/ffmpeg -i
http://c2.auracast.net:8048/stream -f ffmetadata FFMETADATAFILE -y
it saves metadata info in my home directory with a text file FFMETADATAFILE.
I have searched for various ways of doing this from a pascal program, based on "executing an external program" but none of them seems to work. The latest effort runs without an error, but the output file never appears:
procedure TForm1.Button9Click(Sender: TObject);
// run ffmpeg
var AProcess : TProcess;
begin
AProcess:= TProcess.Create(nil);
Aprocess.Executable:='/usr/bin/ffmpeg';
Aprocess.Parameters.Add(' -i');
Aprocess.Parameters.Add('
http://c2.auracast.net:8048/stream'); Aprocess.Parameters.Add(' -f ffmetadata');
Aprocess.Parameters.Add(' FFMETADATAFILE');
Aprocess.Parameters.Add(' -y');
AProcess.Execute;
AProcess.Free;
end;
What am I doing wrong, please?