✅ Trying to find a way to turn image sequence into video using c#

I am creating a program meant to "autoanimate avatars", right now it makes a sequence of images with green backgrounds and through emgu cv turns them into a mp4. It works well although it could be optimized. The issue is that once I put that mp4 into any editing program, it has a lot of video artifacts due to compression, so I am left with 2 options and I am not sure either is possible from investigating: A) Find a way to write in prores 4444 which can use transparency B) Find a way to export it without compression Included is my script
17 Replies
sibber
sibber3w ago
try ffmpeg maybe
pale palepale
pale palepaleOP3w ago
any idea where to start to use it? Also, is there a way where I can attach it to my program? so people downloading it don't need to install it aswell
dance?
dance?3w ago
i don't know how confident you are with ffmpeg, you can potentially just stream the sequence of images to ffmpeg without the need of saving them on file and have ffmpeg output the video also tbh to me prores in 4444 would be overkill for this attaching ffmpeg well consider it's a big program
Cattywampus
Cattywampus3w ago
ffmpeg is not overkill, if you use the installer it will add it to your PATH fat chance they're already installed in your path nowadays, lots of apps depend on it
Cattywampus
Cattywampus3w ago
I suggest dont do your own, use a library instead https://github.com/rosenbjerg/FFMpegCore
GitHub
GitHub - rosenbjerg/FFMpegCore: A .NET FFMpeg/FFProbe wrapper for e...
A .NET FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your C# applications - rosenbjerg/FFMpegCore
pale palepale
pale palepaleOP3w ago
So then in case people download it I should add that they should download ffmpeg separently? and I will try the library thank you
Cattywampus
Cattywampus3w ago
you cant really embed the binary of FFMPEG to your app, the free license won't allow you. you either tell them to download and install it so it will be in their system PATH OR you give them install wizard to download it and for them as part of your installer the license for ffmpeg is just that you can't embed their binary directly to your app IF YOU'RE FREE USER other than that it's completely free
pale palepale
pale palepaleOP3w ago
ahh okay then yeah ill tell them thanks currently checking if it works, although it seems that the version of c# used by this library needs some updating as it seems the use of "namespace" is outdated its gonna be a quite slow process as there are 200 files where the thing is outdated news, manage to use it but there is just one specific method to get the images to video, and as far as I can tell it doesnt have the options that the regular ffmpeg arguments has and testing ffmpeg arguments it seems it doesnt support the prores 4444 codec I tested
Cattywampus
Cattywampus3w ago
you can use custom codec for example you can use libaom-av1 to encode/decode av1 format its u to you
pale palepale
pale palepaleOP3w ago
with this you mean right?
No description
pale palepale
pale palepaleOP3w ago
I tried using the highlited one of these and it spat an error
No description
pale palepale
pale palepaleOP3w ago
did it like this
No description
pale palepale
pale palepaleOP3w ago
(sorry if the question are dumb, i am quite new to this, suprirsed I even managed to turn images to video)
Cattywampus
Cattywampus3w ago
the last time I used ffmpeg was years ago, I've explained everything I know 🙏 their docs should pretty well made, i mean its ffmpeg
pale palepale
pale palepaleOP3w ago
ill look if i can use this library to do direct ffmpeg commands, thank you DID IT, only issue is that in vlc i cant see anything but it works! thank you so much, I have other questions for my project but this is fully done, thank you so much I am going to try and upload my final file in case anyone wants to see how I did it in case they find themselves in the same situation (although I know its probably unoptimal)
Cattywampus
Cattywampus3w ago
feel free to close this thread if your issue was resolved

Did you find this page helpful?