'Record in Android Emulator flickers

I have tried recording in Android Studio with different emulated devices and programs, but all my records flicker heavily.

The screen of the emulator itself doesn't flicker.

I have tried using Nexus 5X, Nexus 7 and Pixel 2 on 25 and 28 API level.

I'm running the emulator on Windows 10 with Intel Core i7-4720HQ, 16GB memory and NVIDIA GeForce GTX 970M.

I have set the mode to Maximum Performance in NVIDIA Control Panel.

When I record the same programs with real phone, everything works fine.

The version of Android Studio is up-to-date.



Solution 1:[1]

I had the same problem and I have solved it by changing a parameter in the emulator's config.ini file

To solve it, you go to the path in your machine where the emulator devices are located, example: C:\Users\XXXX\.android\avd\

Enter the directory of the emulator that you want to fix, open the config.ini file in a text editor and where it says:

hw.gpu.mode = auto

You replace it with:

hw.gpu.mode = guest

Save the changes and restart the emulator.

Solution 2:[2]

I had the same issue and was able to solve it by changing Emulated Performance to "Software-GLES 2.0" in the AVD settings. In the notes, it says that this setting is supposed to be used to work around issues with the computer's graphic card. (This solution is similar to the one of @padDad, just with a different setting)

Screenshot of solution in AVD Manager

Solution 3:[3]

I managed to fix this problem by changing Emulated Performance to Hardware -GLE 2.0 from AVD

Emulated Performance to Hardware -GLE 2.0

Solution 4:[4]

Try to change the preferred graphic processor to "Integrated graphics". At my computer it is not solved the problem, but it reduce the flickers dramatically.

NVIDIA Control Panel -> Manage 3D settings ->Program Settings:

Then, select the emulator (qemu-system-x86_64.exe) or add it to the list, and select Integrated graphics instead of NVIDIA processor

S

Solution 5:[5]

Try by unchecking "Use Emulator Recording (webm)".

enter image description here

Solution 6:[6]

I was experiencing the same problem playing back recordings from an Android emulator. I worked around this problem by setting the emulator property hw.gpu.mode off.

Solution 7:[7]

If for some reason trying above method, i.e. changing emulated performance to either software or hardware, still does not work for you then try this as well:

enter image description here

  • Making [ bitrate ~ desired framerate ] works for me hence 24 instead of default 4 Mbps

  • Instead of 1080 x 2220 I used 1088 x 2224 in order to make it multiple of 16.

When saving the video try saving it in .mp4 format instead of .webm (if not already mp4)

enter image description here

I have followed steps mentioned here in order to record my emulator screen: How to screen record emulator in android studio

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Facciorusso
Solution 2 daniswhoiam
Solution 3 Suraj Rao
Solution 4 marc_s
Solution 5 Shaido
Solution 6 Dharman
Solution 7 VoidOfLimbo