Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFmpeg: How do I split a 100GB MP4 file into several 1GB files?

I've tried using the -fs switch, but it only creates a single file. The -f segment option allows me to use the -segment_time option, but that only limits the video duration, not its size.

So, suppose I want to use ffmpeg to split a 100GB MP4 file into several 1GB MP4 files, what's the switch?

like image 401
Zopiro Avatar asked Jan 05 '16 13:01

Zopiro


1 Answers

One way to do this in ffmpeg is... to not use ffmpeg ;)

What I would suggest instead is to use MP4Box:

MP4Box -splits 1048576 path/to/file

(The argument -splits needs the file size in kilobytes; 1GB in kilobytes is 1048576.)

like image 188
Liam Dempsey Avatar answered Oct 16 '22 11:10

Liam Dempsey