I want to decode, edit and encode an AVI file

JasonBB

Member
Joined
Aug 17, 2023
Messages
5
Programming Experience
10+
Hello people,
I am developing a C# App to edit my AVI file. I want to decode, edit and encode it.
This is the process I would like:
1. load each frame from my AVI file into a bitmap.
2. modify the bitmap.
3. write the bitmap back into the file.
4. repeat for all frames
Is there a nice and simple way to do this?
Regards,
Jason
 
Yes, with ffmpeg

If you're going to make frames into bmp you're going to need a biiig hard drive

If you're doing something like watermarking the video or overlaying text, just ask ffmpeg to do it directly
 
thanks :)
I actually want to just read each frame of my AVI into a 'raw' format inside my App - then add some custom information which changes each frame.
I don't want to write the raw frame to a file - just edit it.
Then I want to write the modified frame back into my AVI file.
 
I want to change the color of about 100 pixels. The new colors will come from a txt file.
I have found an interesting website - www.aforgenet.com
This is a PNG of my error when I try to use that system.
This code is from the website - My only change is the filename:
AforgeError2.png

My project starts from a video example in which the animation plays OK. So the file is OK. Just my new function causes an error.
Any idea what I'm doing wrong?
Thanks
 
I think that's a question for whomever the author of the AVIReader class is.
 
yes lots of samples. The video player sample works well, so I'm adding my code to it. I just got the sample out of the ZIP again then added my really simple code.
Unfortunately I must have broken something else. Because now I get this error on the reader.Open command.

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
 
Well, it seems that AForgeNet and OpenCV both do not support reading and writing sound data. I need audio capabilities for my project.
Does anyone know of anything that supports reading and writing AVI files with audio and video?
 
Back
Top Bottom