I've got the project (ASP.NET Core, on Linux) where are the several tasks, which relate to the video converting and extracting frames from the video file.
I thought about the two possible options:
- using
ffmpeg
console utility - using
P/Invoke
with thelibavcodec
library and others, whichffmpeg
uses
The second option is miles harder and may be very impractical, because it reminds me developing the new wrapper/library, instead of using the ready products.
I've done googling, but there aren't well-done projects for the C#/ASP.NET Core on Linux platform. There are some good for C++ and Python, but NOT for the C# on Linux/.NET Core.
I decided to look at the first option, which I suppose would be more easier and practical. But, there are some weak places, which can produce many problems. We understand (I suppose), that using the 1st option, the end-developer shall use the process forking. So, there could be possible problems with the process idle and other possible issues...
I'm asking about your practice, because it's my first experience on Linux platform with the video converting/sampling using C#. I've used the Expression Encoder .NET library on Windows platform, but it's other story and it makes no sense, right now.
May be, there are other options, which I can't see right at the moment. I dislike the 1st option because of possible unhandled exceptions, because ffmpeg
with such role becomes the black box for the ASP.NET Core backend.