Skip to main content

join-mp4-on-macos

Join MP4 Files on macOS (via Terminal)​

If your MP4 files were split during recording (same codec, resolution, bitrate), you can merge them losslessly using ffmpeg.


1. Install ffmpeg​

brew install ffmpeg

2. Create a file list​

Create a text file named files.txt with the following content:

file 'part1.mp4'
file 'part2.mp4'

(Adjust filenames and order as needed.)


3. Merge without re-encoding​

ffmpeg -f concat -safe 0 -i files.txt -c copy output.mp4
  • -f concat → concatenate files
  • -c copy → no re-encoding (fast & lossless)

Alternative: Re-encode (if formats don’t match)​

ffmpeg -i "concat:part1.mp4|part2.mp4" -c:v libx264 -crf 18 -preset fast -c:a aac output.mp4

⚠️ This will re-encode (slower, but ensures compatibility).