Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I record video in Android Studio in another format, instead of WebM?

I'm developing an app in Android Studio, and it's useful to be able to record video from the emulator (via the button in the Logcat tab). However, in recent versions of Studio (I'm now on 3.4.1) the default video format has changed to WebM.

WebM videos are really big and awkward to work with. Is there an easy way to request a different format, e.g. MP4?

Inside the emulator settings, there's a different recording UI that allows you to save as .webm or .gif. I'm actually using GIFs right now, but it's not the best workaround. I'd prefer to use the Android Studio UI as it's more convenient.

like image 853
Iain Merrick Avatar asked Jun 24 '19 12:06

Iain Merrick


People also ask

How do I record MP4 on Android?

Click Start Recording to start the recording. Click Stop Recording to stop the recording. In the Save As dialog, save the MP4 file. In the Screen Recorder dialog, click one of the buttons to show the file location, open the recording in a player, or dismiss the dialog.


2 Answers

You can still record videos from the command line:

adb shell screenrecord /sdcard/video.mp4

When you are done recording, press Ctrl+C.

Then you can copy the file to your computer (current folder)

adb pull /sdcard/video.mp4

If you want you can delete the file from the sdcard

adb shell rm /sdcard/video.mp4

like image 132
kosev Avatar answered Oct 19 '22 07:10

kosev


I found this solution from issue tracker which posted in question comment and deleted answer.

Just need to uncheck Use Emulator Recording (webm) after you start Screen Record in Logcat.
Then the recording will be mp4 format

like image 6
Linh Avatar answered Oct 19 '22 06:10

Linh