I am using the video recording sample provided by microsoft here. I want to change the resolution of the video being recorded in my app. Currently its recording in highest resolution by default. How to do so?
videoCaptureDevice.DesiredFormat = new VideoFormat(PixelFormatType.Unknown, 480, 640, 30);
The above statement is throwing Argument Exception.
Also, if possible let me know how to capture from the front camera?
How to achieve this? Please help.
The Solution is (With my knowledge)
This will produce the lowest resolution video
Use AudioVideoCaptureDevice to recoed video
You may try this one.
NB: Remember that it may only used for wp8 or later version.
Second parameter for
AudioVideoCaptureDevice.OpenAsync
is the resolution. And you can get the resolutions usingAudioVideoCaptureDevice.GetAvailableCaptureResolutions(sensor)
.