Screen record more than 2 minutes

Yes, if you set newCommandTimeout to 0 the timeout is disabled, set the capability like so:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("newCommandTimeout", 0); // disables new command timeout

driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Or reduce sleep if you can to e.g. 30 sec

@simon_lombard, its good idea but I did try to do Thread.sleep of 120000 and I got video file of 1 minute, maybe it record only the time that actual commands sends to Appium?
Here are the server logs in that case Also I debug it now and stop for 3 minutes and the video is 1:10 min,

@Aleksei it’s just for the example :slight_smile: ,I have shorter timings

Please also set the arguments for start screen record as mentioned above:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("newCommandTimeout", 0); // disables new command timeout

driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

((CanRecordScreen) getDriver()).startRecordingScreen(new IOSStartScreenRecordingOptions()
                .withFps(25)
                .withVideoScale("320:-2")
                .withVideoType("h264") // require ffmpeg
                .withTimeLimit(Duration.ofMinutes(10)));

Already there (from the post above)

Your latest log file show they are not there:

2022-01-19 07:45:34:003 [W3C (90ae318f)] Calling AppiumDriver.startRecordingScreen() with args: [null,"90ae318f-c4ee-4d5b-a7f1-01c3546b7d80"]

Please try again and capture new logs of newCommandTimeout capability + args above

@simon_lombard
here is it (sorry for the delay)
Now I did Thread.sleep of 3 minutes and it looks ok so the video was 4.15 minutes so the limitations changed?

Using 24 fps will make the video run faster, but all actions should be in the video. Please check that all actions are shown in the video (that the video end point is at the right place / that nothing is cut off). If everything is in the video then you can try 30fps to slow the video down, the video length should then be the right speed/length then.

Looks like everything is inside, but too fast at the end to see the detail, so maybe better to do the 30fps

1 Like

Aleksei mentioned adding a a few seconds sleep before terminating the video, that might help to see detail at the end

Good idea, will add it.

1 Like