While we're here, I'm looking for a decent .NET Core library for wrapping or p/invoking FFMpeg. Preferably the latter, because I'd like to operate on .NET IO streams to be able to fit it into my general media decoding pipeline.

Unfortunately, all the ones I've found so far have their own, mostly-undocumented abstractions and they only operate on files on disk. The only input parameter they provide is file path as a string, and I'd rather not have to round trip a temporary file. It's all through static methods on a static class, so I can't even create an extension method to accept a FileInfo object.

Maybe I just need to use the CLI tool and pipe standard IO.

I'd recommend subprocess execution for being able to monitor progress and abort early alone. You can't cleanly kill a thread in a process, but killing a whole process is bread and butter to an OS.

In production scenarios you'd want that process to run in an isolated jail. Video formats are very complex and I don't have faith that fuzzers have found every exploit.

This would be for transcoding of input design assets to suitable web-standard output formats in a trusted environment, i.e. not a public user-facing tool, and I'm actually only really using it for audio, but I think your point still makes sense.

I am using CliWrap to create my own wrapper for the functionality I need from FFmpeg. Works pretty well!

https://github.com/Tyrrrz/CliWrap