Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Perform Simple Video Editing with Ubuntu/Mac OS (from terminal)

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

Hardware will only determine the time required to process a video. The better processing power, the faster video processing will be.

Source: https://superuser.com/questions/1584816/what-are-the-minimum-requirements-specs-for-ffmpeg

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.

Ask your favourite Ai to create a command for you. In this case, it is about resizing video to 720p while maintaining aspect ratio 😉.

Demo 🎥

This is a demo on how to convert a video from mov to mp4 using terminal.

Just paste the command in your terminal. It will straightaway do the conversion. You don’t have to buy or install any software to do simple video editing.

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: ❌

  1. Requires fast internet connectivity to upload and download video.
  2. On the mercy of video conversion platform to manage your video.
  3. The conversion could be deprioritized depending on the platform server availability.
  4. Free online video editor has limited file size limit.

The pros of using FFmpeg: ✅

  1. No need for fast internet connectivity.
  2. Video stays on your environment.
  3. Use your own server capacity.
  4. Didn’t have any hard limit on video size.
Online Video Conversion PlatformFFmpeg
Privacy
Requires Fast Internet Connectivity
Processing speedDepends on the online video conversion platform capability and availabilityDepends on your hardware capability
Video file size limitDepends. Usually at most at 1GBNo limit
CostFree with limited capabilityFree

Common task I do with FFmpeg


Convert mov to mp4 for smaller video filesize

This mostly common for Macbook user that record screen. Video produced with .mov do have significant file size, larger than .mp4.

$ ffmpeg -i input.mov output.mp4

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

Resizing an image to have 1:1 aspect ratio

$ ffmpeg -i input.png -vf "scale=720:720:force_original_aspect_ratio=decrease,pad=720:720:(ow-iw)/2:(oh-ih)/2" output.png

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.