How to split a 220 gb movie file with terminal

I recorded an mp4 file in my Macpro 2013 with Mojave. The file is now about 225 gigabytes.

Is there a way to convert it (maybe in terminal or another app.) in 12 parts as this Fiile1.mp4 File2.mp4 etc?

I tried an old app Split and Concatenat which still works but gives me as a result "recording.mp4.aaa" then "recording.mp4.aab" and so on.

Is there a way to simply splitting getting the movie sequencce numner as Fiile1.mp4 and so on?

Thanks


Mac Pro

Posted on Apr 7, 2025 10:43 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 12, 2025 09:36 AM

One can first get the duration in seconds of the video in the Terminal:

ffprobe -i "The 47 Ronin".mp4 -show_format -v quiet | sed -n 's/duration=//p'

13365.289796

bc <<<"scale=2;13365.289796 / 10.0"
1336.52
ffmpeg -i "The 47 Ronin".mp4 -acodec copy -vcodec copy -f segment -segment_time 1336.52 -reset_timestamps 1 -segment_start_number 1 ./Foo_Split/out_%03d.mp4


That generates exactly 10 MP4 files. The first is the introductory credits and video while the last is the end of the movie with END.


Seems like this would allow you to split your 225 GB video into 10 files with the proper duration time for your video as I have done above.





6 replies
Question marked as Top-ranking reply

Apr 12, 2025 09:36 AM in response to DanWan

One can first get the duration in seconds of the video in the Terminal:

ffprobe -i "The 47 Ronin".mp4 -show_format -v quiet | sed -n 's/duration=//p'

13365.289796

bc <<<"scale=2;13365.289796 / 10.0"
1336.52
ffmpeg -i "The 47 Ronin".mp4 -acodec copy -vcodec copy -f segment -segment_time 1336.52 -reset_timestamps 1 -segment_start_number 1 ./Foo_Split/out_%03d.mp4


That generates exactly 10 MP4 files. The first is the introductory credits and video while the last is the end of the movie with END.


Seems like this would allow you to split your 225 GB video into 10 files with the proper duration time for your video as I have done above.





Apr 12, 2025 07:53 AM in response to DanWan

I just downloaded the source code of FFmpeg (e.g. FFmpeg-7.1.1.xz) on both Mojave 10.14.6 and Sequoia v15.4. After expanding the source folder in the Downloads folder, I did the following in the Terminal:


FFmpeg requires the GNU C compilation suite and I wasn't going there…


Mojave 10.14.6 (Parallels Desktop Pro 20.2.2 guest)


Using Command Line Tools for Xcode 11.3.1/Clang v11.0

cd ~/Downloads/ffmpeg-7.1.1
./configure --disable-x86asm
# a log of output and ignored warnings
make
make install
make clean


Sequoia 15.4 (M4 Mac Mini Pro)


Using Command Line Tools for Xcode 16.3/Clang 17.0

cd ~/Downloads/ffmpeg-7.1.1
./configure
make
make install
make clean


In either case, the installation places several libraries and executables into the /usr/local tree. There is a make uninstall in that source folder if you decide later to remove the FFmpeg installation.


I happen to have a 4h1m 1941 The 47 Ronin.mp4 that is about 800+ MB. Decided to use it for a split test set at 10 minutes (FFmpeg also allows start and end time stamps) and before I started that, I created a Foo_Split folder in my ~/Movies folder.


Again, in the Terminal for either operating system:

ffmpeg -i "The 47 Ronin".mp4 -threads 4 -vcodec copy -f segment -segment_time 10:00 -reset_timestamps 1 ./Foo_Split/out_%03d.mp4


After a bunch of FFmpeg segment output lines, you can see the result in the output folder with audio and visual playback in QuickTime.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to split a 220 gb movie file with terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.