I'm developping a Windows Phone 8.1 Silverlight application based on Camera raw stream. I need to make video samples before sending it to a distant server.
I've implemented a custom VideoSink class that overrides the 4 methods :
- OnCaptureStarted
- OnCaptureStopped
- OnFormatChange
- OnSample
I focused on the OnSample method, which give me the time of the sample, the frame duration and the sample data as a bytes array.
I'm recording from CaptureSource using this VideoFormat :
_video_capture_device.DesiredFormat = new videoFormat(PixelFormatType.Format8bppGrayscale, 640, 480, 30);
I get successfully the sample data as bytes array, but I can't find any way to encode it into a MP4 file. I've also tested using FileSink class, but it doesn't permit to access to raw data.
Did someone already get this problem or maybe have an issue ?
Thanks ! McSime