You can record video and audio from the Android Emulator and save the recording to a WebM or animated GIF file.
The screen recording controls are in the Record and Playback tab of the Extended Controls window.
Tip: You can open the screen recording controls by pressing Control+Shift+R (Command+Shift+R on macOS).
To begin screen recording, click the Start recording button in the Record and Playback tab. To stop recording, click Stop recording.
Controls for playing and saving the recorded video are at the bottom of the Record and Playback tab. To save the video, choose WebM or GIF from the menu at the bottom of the tab and click Save.
You can also record and save a screen recording from the emulator using the following command on the command line:
adb emu screenrecord start --time-limit 10 [path to save video]/sample_video.webm