C# wrapper over FFMPEG
I am capturing video and audio from IP cameras and USB cameras. I need the following component developed:
1. I need a wrapper (DLL) over ffmpeg containing the function (which will be called from c# code) that takes an Image Frame (in Memory Bitmap) and Audio Sample (In Memory Byte Array) as parameters and write it to a media file (WMV, MP4) which could be later played in a media player.
a. Provide WMV Codec support for WMV9 and WMV8
2. The wrapper should also allow recording video with and without audio (video only files) if audio is not available.
3. Provision for supplying video frame rate (In case not provided then the wrapper should be able to detect it automatically), video bit rate, video codec, file dimension, audio channel, audio frequency, audio codec, audio bits per sample, audio bit rate.
4. The CPU and Memory usage should be as low as possible.
5. We should be able to create multiple instances of the wrapper and use each to record a different video file at a time. (There can be as many as 32 recordings running simultaneously.)
6. The file size is an important factor while recording. So changes in bit rate or frame rates should reflect in file size i.e. if I select lower bit rate, then the file size should be smaller.
7. Should not have memory leaks.
8. If recording fails then it should provide proper recording failure reasons.
9. It is expected that recording should not have following issues :
a. Blurred video
b. Audio-Video sync issue
c. Low video quality, or pixilated video
d. Recorded video should be seekable frame by frame (indexed)
e. Recorded length of video should match the exact duration of recording while playing.
10. I will need a sample in c# explaining how to use the wrapper and all the parameters.