Reputation: 1560
I have an AVI file that I would like to compress.
I have tried using Simple C# Wrapper for the AviFile Library but it was problematic because of 2 reasons:
Here is my code:
AviManager aviManager = new AviManager(aviFilePath, true);
VideoStream aviStream = aviManager.GetVideoStream();
VideoStream newStream;
AviManager newManager = aviStream.DecompressToNewFile(compressedAviPath, true, out newStream);
aviManager.Close();
//save and close un-/re-compressed file
newManager.Close();
Do you have any idea how I can:
Thanks, Guy.
Upvotes: 2
Views: 4478
Reputation: 7470
You can use EmguCv
//VideoWriter vw = new public VideoWriter(string fileName, int fps, int width, int height, bool isColor);
VideoWriter vw = new VideoWriter("test.avi", 30, 500, 500, true);
//Then write your frame
vw.WriteFrame(frame);
Upvotes: 2