startRecordingScreen Options

Hi, Can someone explain how to use startRecordingScreen in appium (java)

I tried the below code for iOS simulator, though it doesn’t throw any error; I am unable to get the expected output.

testdriver.startRecordingScreen(new IOSStartScreenRecordingOptions().withVideoType(IOSStartScreenRecordingOptions.VideoType.MP4).
withTimeLimit(Duration.ofSeconds(10)).
withUploadOptions(ScreenRecordingUploadOptions.uploadOptions().withRemotePath("./file-screenshots/recording.mp4")));

//Other navigations for tests
testdriver.stopRecordingScreen();

Is this the correct usage ?

I see from source code - that it returns output as Base64 encoded content. If video type is specified as mp4 - does it still return the Base64 encoded content or in mp4 format ?
how do I get the recorded video in the mentioned remote path ?