You can do simple video editing with your Linux/Unix machine by using terminal. This means, you don’t have to buy any software or exploring complicated Graphical User Interface (GUI) video editing software. This can be easily done with FFmpeg.
Cost 💰
Free. FFmpeg is free to install and free to use.
System Requirements
None.
Known OS that support FFMpeg: Ubuntu, Mac OS
I’m not familiar with terminal. How can I benefit from FFmpeg? 🥲
ChatGPT/ Copilot/ Claude/ any Ai chatbot will definitely help. You just need to ask Ai to generate a command for you.
Demo 🎥
This is a demo on how to convert a video from mov to mp4 using terminal.
I’m using Mac. How to install FFmpeg? 🖥️
Simple. Run this command on your zsh terminal (using brew).
$ brew install ffmpeg
This will install the ffmpeg binary and all of dependencies that are used by ffmpeg. Your Mac needs to have brew installed first.
I’m using Ubuntu. How to install FFmpeg? 🐧
Simple. Run this command on your Ubuntu terminal (using apt).
$ sudo apt update
$ sudo apt install ffmpeg
This will install the ffmpeg binary and all of dependencies that are used by ffmpeg. Ubuntu out-of-the-box comes with apt package manager.
Verdict
The cons of using online video conversion: ❌
- Requires fast internet connectivity to upload and download video.
- On the mercy of video conversion platform to manage your video.
- The conversion could be deprioritized depending on the platform server availability.
- Free online video editor has limited file size limit.
The pros of using FFmpeg: ✅
- No need for fast internet connectivity.
- Video stays on your environment.
- Use your own server capacity.
- Didn’t have any hard limit on video size.
Online Video Conversion Platform | FFmpeg | |
Privacy | ❌ | ✅ |
Requires Fast Internet Connectivity | ❌ | ✅ |
Processing speed | Depends on the online video conversion platform capability and availability | Depends on your hardware capability |
Video file size limit | Depends. Usually at most at 1GB | No limit |
Cost | Free with limited capability | Free |
Common task I do with FFmpeg
Resizing video to 720p while maintaining aspect ratio
$ ffmpeg -i input.mp4 -vf "scale=-1:720" -c:a copy output.mp4
Combine video
This requires you to create a txt file containing all the video filename you want to combine. Create a videos.txt file and list the video filename.
file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'
Then, execute the following command in terminal:
$ ffmpeg -f concat -safe 0 -i videos.txt -c copy output.mp4
Trimming a video
$ ffmpeg -i input.mp4 -ss 00:01:00 -t 00:00:30 -c copy output.mp4
Conclusion
Relying on online converters to convert, trim, resize, or combine videos is not an option when dealing with sensitive information. Using online video conversion services can risk leaking confidential information. Therefore, using FFmpeg allows you to manipulate videos internally without uploading them to unknown servers on the internet.