I recorded a 1:07 long screen record video to showcase how the pSEO keyword ideas database works. While the video could have been directly uploaded to YouTube and Twitter, I wanted to enhance the watchers’ experience a bit by making it a bit faster and adding nice music.
And a single terminal command did all of this; first, watch the video below, and then I’ll show how.
And it all took me just a few seconds.
Editing videos with FFmpeg
First, you will need to install the FFmpeg tool for your computer and then start with the command. You can get it from their official website.
For the raw video, I had the following requirements:
- Make the video a bit faster
- Compress the video for social media, and
- Add music at a low volume
I opened the terminal, where my raw video
your_raw_video.mov and the music
audio.mp3 were present. I copy-pasted the following command into the terminal, hit enter, and got the final video
your_final_video.mp4 within seconds (not even minutes).
ffmpeg -i your_raw_video.mov -i audio.mp3 -vcodec libx264 -crf 28 -filter_complex "[0:v]setpts=0.75*PTS[v];[1:a]volume=0.6,atrim=0:50.2[a]" -map "[v]" -map "[a]" your_final_video.mp4
And this single terminal command did the following thing to the raw video:
- Made the video 1.33x faster
- Compressed the video by 92%, and
- Added music at 60% volume
The raw screen record video was 1 minute and seconds long and 71.4 MB in file size, and the final video was 50 seconds long and 5.4 MB in file size.
If I had used a video editor tool like iMovie or Adobe Premier Pro, it must have taken me several 5–10 minutes, at least. But FFmpeg did all this in less than 20 seconds.
Now, isn’t that wild?