I am working on a framework for mobile automation using Appium.The tests run on browserstack real devices. I am trying capture screen recordings of tests using the inbuilt Appium methods startRecording() and stopRecording(). It works fine with android tests. But with iOS somehow , the video is generated but when I try to play it it gives an error "Cannot decode".
If the tests run on browserstack what is the best way to decode and play them?
To start Recording I use,
((CanRecordScreen) AppiumDriverBase.getDriver()).startRecordingScreen(
new IOSStartScreenRecordingOptions());
To stop recording and save the file ,
byte[] data = Base64.decodeBase64(base64String);
.
.
Files.write(Paths.get(fullFilenamePath), data);
Note: I have installed ffmpeg on my local.