https://github.com/huysentruitw/process-manager
Managed library for managing and queing spawned processes
https://github.com/huysentruitw/process-manager
csharp dotnet ffmpeg imagemagick processmanager
Last synced: 9 months ago
JSON representation
Managed library for managing and queing spawned processes
- Host: GitHub
- URL: https://github.com/huysentruitw/process-manager
- Owner: huysentruitw
- License: apache-2.0
- Created: 2015-12-09T18:46:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-26T11:17:17.000Z (over 6 years ago)
- Last Synced: 2025-08-12T01:26:00.298Z (10 months ago)
- Topics: csharp, dotnet, ffmpeg, imagemagick, processmanager
- Language: C#
- Size: 12.7 KB
- Stars: 29
- Watchers: 4
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ProcessManager
[](https://ci.appveyor.com/project/huysentruitw/process-manager/branch/master)
## Overview
ProcessManager is a managed (C#) library that can be used to queue and start processes like you would with `Process.Start()` but better. Maximum number of simultaneous processes can be configured, processes can be queued and events will notify your code when a process is started, finished or outputs data to standard output or standard error.
This library is great for running lengthy, CPU intensive, tasks like image or video conversions.
## Get it on NuGet
Install-Package ProcessManager
## Usage
```C#
var manager = new Manager(4); // Max 4 processes will be started simultaneously
manager.Start();
manager.ProcessErrorDataReceived += (sender, e) => Console.WriteLine(e.Data);
manager.ProcessOutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
foreach (var videoFileName in Directory.EnumerateFiles("videos"))
{
var info = new ProcessInfo(
"ffprobe.exe",
string.Format("-v quiet -print_format json -show_format -show_streams \"{0}\"", videoFileName));
manager.Queue(info);
}
```