Slow Motion Camera 240fps? How to?

I am trying to use MediaRecorder to record 240fps slow motion video on a Galaxy S9. The built-in camera app does this no problem with the “Slow Motion” selection. This, set for 30fps, works:

recorder = new MediaRecorder();
recorder.SetVideoSource(VideoSource.Camera);
recorder.SetOutputFormat(OutputFormat.Mpeg4);
recorder.SetVideoFrameRate(30);
recorder.SetVideoSize(1920, 1080);
recorder.SetVideoEncodingBitRate(17000000);
recorder.SetVideoEncoder(VideoEncoder.H264);
recorder.SetOutputFile(path);
recorder.SetPreviewDisplay(viewer.Holder.Surface);

But increasing the VideoFrameRate > 30, still records 30fps… I’ve tried a variety of values for the above, removed some settings, etc with no luck.

I have also tried the CamcorderProfile approach, but this doesn’t work either. In particular these:

CamcorderProfile.HasProfile(CamcorderQuality.HighSpeed1080p)
CamcorderProfile.HasProfile(CamcorderQuality.HighSpeed720p)

return false - as do all HighSpeed profiles. Though its clear the camera can do them.

Some posts I’ve read say that Camera2 is needed, however I’ve tried a variety of sample Xamarin projects for Camera2… none of these record > 30fps (Xamarin_Android___Camera2Video for example). I’ve not been able to find the Xamarin_Android version of Android-Slow-Motion-Camera2, though I’ve seen indications that it exists.

My goal is to record 240fps and play back at 30fps. Which I think requires some use of SetCaptureRate, but since I can’t get it to record 240fps, I haven’t gotten that far. SetVideoEncodingBitRate likely needs to be some other value too.

I’ve posted about this in forums of all kinds, with no responses at all. What am I missing here? Is this an Xamarin limitation? I’ve also read the suggestion that only system apps can do high speed recording. If that’s the case, why do CamcorderQuality.HighSpeed… options even exist. So, I’m not convinced.

Hello,
You can check out this post. I think this is the answer of your query.

Thanks for responding. But, if what you’re suggesting is that all I need to do is “recorder.SetVideoFrameRate(240);”. This does not work. It still records 30 fps.

The solution MAY have something to do with CameraConstrainedHighSpeedCaptureSession use, but I haven’t found out how to use that yet.

Hello, I think you might get better assistance if you submit a support request here

I did submit there… but as of yet no response. In case anyone stumbles upon this I found this article which suggests Samsung doesn’t allow this on certain models…

I also started exploring an approach using the Samsung camera app, using intent but this is very limited as far as I can tell, and you can’t set framerates, nor trigger record/stop, you seem to have to do it manually. So, this is not very useful.