[Lazarus] Problems using RunCommandIndir with Lazarus 2.0.0
bo.berglund at gmail.com
Tue Mar 5 20:48:58 CET 2019
On Sat, 02 Mar 2019 09:56:07 +0100, Bo Berglund via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
>Now for another RunCommandInDir problem:
>When I run the command to extract the information a black command
>window is briefly flashed on screen and then disappears.
>Is there some way to make this window minimized or invisible while it
So I have solved the general problems of using RunCommandInDir with
ffmpeg. It does work.
But if I command a video edit with multiple cuts being extracted and
later combined there is a succession of many black command windows
being shown on top of the main GUI form for a fraction of a second up
to a couple of seconds.
It really looks very ugly.
Is there absolutely no way to hide or minimize these windows during
I am using Lazarus 2.0.0 with fpc 3.0.4 (64 bit versions) in Windows 7
This is till a problem that fits the topic of this thread...
This is the function I call in a loop once for each cutout part of the
function ExtractVideoSection(InputFile, OutputFile: string; Start,
Duration: integer; OverwriteOutput: boolean = true): boolean;
arguments: array of string;
Result := false;
if not FileExists(InputFile) then exit;
if (not OverwriteOutput) and FileExists(OutputFile) then exit;
if FileExists(OutputFile) then DeleteFile(OutputFile);
executable := 'ffmpeg.exe';
arguments := '-ss';
arguments := FormatTimeDiff(Start);
arguments := '-i';
arguments := InputFile;
arguments := '-to';
arguments := FormatTimeDiff(Duration);
arguments := '-c';
arguments := 'copy';
arguments := OutputFile;
arguments := '-hide_banner';
Result := RunCommandIndir(ExtractFileDir(OutputFile), executable,
arguments, returnstr, [poWaitOnExit,poStderrToOutPut]);
Every invocation of RunCommandInDir() causes a command window to be
shown on screen.
Developer in Sweden
More information about the lazarus