I7210I
January 13, 2022, 5:53pm
1
Hello,
I try to implement reording on my screen and I only get one minute of record, my method looks like that:
((CanRecordScreen) getDriver()).startRecordingScreen(new BaseStartScreenRecordingOptions() {
@Override
public BaseStartScreenRecordingOptions withTimeLimit(Duration timeLimit) {
return super.withTimeLimit(Duration.ofMinutes(2));
}
});
what I missed?
Thanks
wreed
January 13, 2022, 6:39pm
2
Have you been following this thread? Seems like a lot of good info on screen recording here:
I7210I
January 13, 2022, 6:58pm
3
Thanks,
I read it, but, I don’t see I have that option (to change the FPS for example) in the options, maybe it’s Java issue?
I gave example in above thread in Java.
I7210I
January 13, 2022, 8:23pm
5
You right I missed it
But, At the end it said that even tough that the FPS are 30 still the video duration is shorter than intended, there is fix for that instead of doing it outside?
Thanks
Are all test details on video present? Do you mean that video just faster and that is why duration less?
I7210I
January 13, 2022, 8:33pm
7
Yes, as it written there.
Also What you wrote there is just for IOS? since it’s IOSStartScreenRecordingOptions
With ios appium does screen record itself. With android native recorder used.
Why you care if video a bit faster while all test recorded?
if it really needed you can use full power of ffmpeg to correct it in any way e.g. add filter Simon mentioned in thread.
I7210I
January 13, 2022, 8:52pm
9
I didn’t understand what’s the difference in the recordings, and so for each platform I will need to start an new instance per platform?
about the speed, I just want it to be normal
Aleksei
January 13, 2022, 9:01pm
10
once again:
with iOS appium does recording and saves it to file itself.
with Android appium asking to start record using native android recorder. stops later and just taking file from phone.
that is why with iOS much more parameters to tune record.
I7210I
January 13, 2022, 9:07pm
11
So for Android project better to use like here? ?
And I understand that there is no one solution for both platforms?
Aleksei
January 13, 2022, 9:26pm
12
you have problem with iOS or Android?
I7210I
January 13, 2022, 9:28pm
13
right now it’s iOS but I should start testing in Android too that’s why I ask
Aleksei
January 13, 2022, 9:36pm
14
with Android it not happens, you just start iOS recorder with one settings and android with others in code.
I7210I
January 13, 2022, 10:14pm
15
@Aleksei
Great, I will do it sunday than.
Thank you again all
I7210I
January 16, 2022, 8:33am
16
@Aleksei
I saw that even if I do an Thread.sleep(65000) the video is not generated, and what I did is:
((CanRecordScreen) getDriver()).startRecordingScreen(new IOSStartScreenRecordingOptions()
.withFps(25)
.withVideoScale("320:-2")
.withVideoType("h264") // require ffmpeg
.withTimeLimit(Duration.ofMinutes(10)));
What is wrong now?
Please provide server logs
I7210I
January 18, 2022, 6:29pm
18
In Debug mode where I stop the running for 1 min
app logs
Server logs
just in case of Thread.sleep of 65000
and app logs
I think the reason why the video is too short is because the default timeout when no commands are issued to the driver is 60 seconds.
Please try setting the newCommandTimeout
capability to 0, details about capability https://appium.io/docs/en/writing-running-appium/caps/
In your logs you can see:
2022-01-18 18:08:02:131 [Appium] Closing session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
I7210I
January 18, 2022, 8:35pm
20
So just to clarify, you saw that there is 60 sec that no command issued?