Menu
Zero One Labs
  • Home
  • About
  • Scripts
  • Snippets
Zero One Labs

How to combine videos on macOS’s Terminal

Posted on December 11, 2019December 11, 2019 by Zan

Here’s a quick tech tip on how to combine multiple small videos into one on the Mac with the command shell (Terminal).

Let’s say you saved an Instagram story that contains multiple videos to your phone and you want to combine them into a single video to share with your loved ones. It’s pretty simple.

After saving the videos on your phone, transfer them to your Mac (either with AirDrop, DropBox, Google Drive, Apple’s Messages/iMessage, or Email). Save them to your Desktop on your Mac. Let’s assume the videos are called “video1.mp4” and “video2.mp4“.
From your Mac open up the application “Terminal” (It’s in the “Applications” -> “Utilities” folder) and type (or copy/paste) the following commands (press the return key at the end of each line):

cd ~/Desktop/

cat video1.mp4 video2.mp4 > new_video.mp4

What this does, is tell the program “Terminal” to change it’s working location to your Desktop. The second line basically says

“concatenate the two following files, in the following order (the files are separated by spaces), and output/save the final product to a new file called ‘new_video.mp4’.”

Of course, you will need to change “video1.mp4” and “video2.mp4” to the actual file names. For instance it might look something like this:

cat VID_1234_8675309_666.mp4 VID_1234_8675309_667.mp4 > new_video.mp4

Keep in mind that there are spaces between the word “cat”, the filenames, the greater-than sign, and the new file name. This is important, as the spaces let the program know that each command, phrase, and character are distinct from each other.

Happy concatenating!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Login with your Social ID

Categories

  • Articles
  • Bash
  • Mac
  • PackageMaker
  • Python
  • Scripts
  • Terminal
  • Uncategorized
My LinkedIn
©2023 Zero One Labs | Powered by WordPress & Superb Themes