[FFmpeg-user] start FFplay without console window?

Michael Koch astroelectronic at t-online.de
Fri Oct 30 16:14:26 EET 2020


Am 30.10.2020 um 13:53 schrieb Moritz Barsnick:
> Hallo Michael,
>
> On Fri, Oct 30, 2020 at 01:29:04 +0100, Michael Koch wrote:
>> Is it possible to start FFplay (from a C# application) so that only the
>> video window is visible, while the console window is hidden or minimized?
> That's more of a C#/Windows question than an ffmpeg question. (Assuming
> you're not using C# on a different platform here. ;-)) Windows seems to
> require opening a console for launching such an external GUI.
>
> I think this SO answer, with its amendments and comments, should cover
> it (untested):
>
> https://stackoverflow.com/a/19756925

In the meantime I found another solution.
This starts FFplay with two windows (console and video):

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "ffplay";
startInfo.Arguments = "-f lavfi testsrc2=s=vga";
Process p = Process.Start(startInfo);

This starts FFplay without the console window:

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
startInfo.FileName = "ffplay";
startInfo.Arguments = "-f lavfi testsrc2=s=vga";
Process p = Process.Start(startInfo);

Michael



More information about the ffmpeg-user mailing list