Get high quality with correct frame rate video recording on iOS

I am creating Appium Python tests on Device Farm on both Android and iOS.
I need to record the screen with a correct and constant framerate.
For Android I solved by creating the video with appium and it seems fine, but for iOS there seems to be a frame rate problem.
I tried recording video using Control Center Screen Recorder directly on an iPhone I have and the video looks good, but I need to find a way to move the video file from AWS iPhone Photos to the S3 bucket where I’m uploading all the results of the test.
I tried using the appium pull_file method driver.pull_file('@com.apple.Photos:documents/Videos/filename.mp4') and some variations but it returns “object not found” or “failed to receive any data”. How should I use it?
I tried to use osxphotos library, but it doesn’t see iPhone photos nor videos.
Is there a different way to record the video? Or to get the video from iPhone Photos? Thanks in advance

maybe try appium-xcuitest-driver/docs/reference/execute-methods.md at master · appium/appium-xcuitest-driver · GitHub (only works on iOS 17+)

thanks for your reply, I will use it in the future, but at the moment AWS iPhone has iOS 15, is there something else I can use?

Nothing I know about

Hie man maybe try using CanRecordScreen library? Record and save them into your PC then upload them from your PC to server?
My Videos can be High Quality too as long as I set good Recording Options
You can check

An example of a snippet that gives you HQ recording:

//Declare the driver
public static CanRecordScreen screenRec;

//Declare path to save video:
public static String videoPath = "";

public static void startRecording(String Platform){
 videoPath = "<video path>"; //e.g "Home/Tester/Downloads/Extracted/my_recording.mp4"
screenRec = iosDriver;
screenRec.startRecordingScreen(new IOSStartScreenRecordingOptions().withTimeLimit(Duration.ofMinutes(10)).withVideoType("mpeg4").withVideoQuality(IOSStartScreenRecordingOptions.VideoQuality.HIGH));
}

public static void stopRecording() throws IOException {
        String finalRec = screenRec.stopRecordingScreen();
        byte[] data = Base64.decodeBase64(finalRec);
        Path destinationP = Paths.get(videoPath);
        Files.write(destinationP,data);
    }

in AWS there is only python. Does this library exist for python?

@raffa This library CanRecordScreen is an Appium Library so yes it should be on Python too. Its basically appium library so it doesn’t matter what Language you use as long as language is supported by appium.

ok, so you are talking about the basic start_recording_screen of appium. As in the link I shared, this method has a frame rate issue, the fps does not match the source fps and if I record a 20s video it lasts 15 seconds or less

Try to use these settings:

new IOSStartScreenRecordingOptions().withTimeLimit(Duration.ofMinutes(10)).withVideoType("mpeg4").withVideoQuality(IOSStartScreenRecordingOptions.VideoQuality.HIGH)

The max length per recording is 30mins so you can surely record upto 30mins before video automatically cuts off. VideoQuality set to High always gives my high quality recordings. I have never seen any frame drops