question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't play iOS screen recording

See original GitHub issue

The problem

I’m trying to implement screen record on my tests and after implementing on Android with ease I’m facing some issues on iOS, namely I can’t play iOS screen record videos. File produced after stop recording seems to have data but can’t be played (maybe it is corrupted?).

Environment

  • Appium version (or git revision) that exhibits the issue:
  • Last Appium version that did not exhibit the issue (if applicable): /
  • Desktop OS/version used to run Appium: MacOS 10.15.1
  • Node.js version (unless using Appium.app|exe): v13.5.0
  • Npm or Yarn package manager: Npm 6.13.4
  • Mobile platform/version under test: iOS 13.2
  • Real device or emulator/simulator: Real Device
  • Appium CLI or Appium.app|exe: CLI v1.16.0 ffmpeg version 4.2.2 Java client 7.3.0

Details

Trying to open produced file on Quicktime returns error: The file isn’t compatible with QuickTime Player. Trying on VLC file contains 0 seconds. However, file has over 1mb, meaning that it contains data. I’ve tried tried using different VideoType codecs, with/out IOSStartScreenRecordingOptions and result is pretty much the same.

Link to Appium logs

https://gist.github.com/gfioretti/02c153c0f904cbcf205b7ebd3a546026

Code To Reproduce Issue [ Good To Have ]

Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.

Please git clone https://github.com/appium/appium and from the sample-code directory, use one of your favourite languages and sample apps to reproduce the issue.

In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
hbanafalcommented, Dec 22, 2020

This works for me

((CanRecordScreen) mobileDriver).startRecordingScreen(
                    new IOSStartScreenRecordingOptions().withTimeLimit(Duration.ofSeconds(1200)).withVideoType("h264")
                            .withVideoFilters("scale=trunc(iw/2)*2:trunc(ih/2)*2").enableForcedRestart());
0reactions
ajschwietermancommented, Jan 21, 2020

Go to Issue #13113. Change the VideoType to “h264”. Worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Screen Recording Not Working on iPhone after iOS 16.2 ...
Launch Settings App → Find General → Tap Restrictions (Enter passcode) → Scroll down the screen to last until you appear Game Center...
Read more >
Fix: iOS 15 Screen Recording Not Working on iPhone iPad
For iOS 11 or earlier: Go to Settings > General > Restrictions > Game Center and turned off-screen recording, restart your device, and...
Read more >
[SOLVED] Why can't I screen record - 2021 Guide - CopyTrans
How to screen record on iPhone · On your iPhone, go to Settings > Control Center > Screen recording; · Tap on ➕...
Read more >
Why Is My Screen Recording Not Working? How to Fix it [Solved]
If you've enabled low power mode on your iPhone, you might not record your screen successfully or can't save the recordings. Try to...
Read more >
Record the screen on your iPhone, iPad, or iPod touch
Go to the Photos app and select your screen recording. Some apps might not allow you to record audio or video. You can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found