I summarize here the results of converting from webm to mp4 using the many command line options suggested.
We assume here that if you're asking this question, then you're forced to use webm because the Android device emulator within Android Studio
generated it for you, and you're on a Mac so you'd really like to use iMovie
to edit the video.
1
ffmpeg -i vid.webm vid-1.mp4
Ref
Takes 17.8 sec. Output file is 1.5 MB.
2
ffmpeg -i vid.webm -crf 1 -c:v libx264 vid-2.mp4
Takes 18 sec. Output file is 7.6 MB.
3
ffmpeg -i vid.webm -crf 0 -c:v libx264 vid-3.mp4
Ref
Takes 21 sec. Output file is 11.9 MB.
4
ffmpeg -fflags +genpts -i vid.webm -r 24 vid-4.mp4
Ref
Takes 0.16 sec. Output file is 1.5 MB.
5
ffmpeg -i vid.webm -c copy vid-5.mp4
Ref
Takes 2.8 sec. Output file is 64.6 MB.
6
ffmpeg -i vid.webm -strict experimental vid-6.mp4
Ref
Takes 18 sec. Output file is 1.5 MB.
7
ffmpeg -i vid.webm -c copy -strict experimental vid-7.mp4
Ref
Takes 0.16 sec. Output file is 64.6 MB.
8
ffmpeg -i vid.webm -c:v copy -strict experimental vid-8.mp4
Also Ref
Takes 0.69 sec. Output file is 64.5 MB.
Only numbers 1, 2, 3, 4, and 6 can be imported to iMovie
(10.2).
The version of ffmpeg
used is 4.3.
This is a first step. I am leaving out the more complicated quality comparison.
Perhaps the worst trap waiting for you is that iMovie
really wants to produce a 1920x1080 movie, and so you may well get two large black bars on the side. If you're editing a demo of your app in portrait mode, you'll be wasting a lot of space. If you can, ideally you'll want to produce a video in that resolution.
The most immediate sequel question is: Assuming you truly have no need for the heavily pushed Final Cut Pro
(because you're a programmer, not a video editor), will FCP allow you to set your own resolution?