It's very useful for demo videos used on softwares/SaaS websites. This simple command is what I've been using to make all of my videos on https://devutils.app and https://blackmagic.so:
ffmpeg -i input-video.mp4 -vcodec libx264 -crf 28 output-video.mp4
(You need to install ffmpeg
first)
Here is the before & after. Judge for yourself:
Before: 9.8MB
After: 0.97MB
You can adjust the -crf 28
parameter for even small file size, but I find the video quality start to decrease dramatically after 28
.
Other useful ffmpeg commands to make demo videos:
Speedup:
ffmpeg -i input.mp4 -filter:v "setpts=0.75*PTS" faster.mp4
Get the poster image (first frame of the video):
ffmpeg -i input.mp4 -vframes 1 poster.jpg -y
Hello there, I'm Tony Dinh.
I quit my high paying job to work on my side projects with a mission to make a living from my apps and live an independent life. 🌴
https://tonydinh.com/subscribe
❤️ Thanks for reading!