Using ffmpeg to split video files by size
<p>I'm trying to write a batch file using ffmpeg to automate the redundant daily task of taking footage from work that's recorded in 4gb blocks (which is standard in most DSLR cameras &amp; GoPro's), and split the clips into 2gb files for streaming purposes. The idea is to have the script check external drive FOOTAGE's folder @import and split files after 2gb (since the max size is 4gb, this will alleviate the need for more than one split). </p>

<p>I'm also trying to amend the filenames of the split files, so FILE1 is 4gb, it splits into FILE1_1 and FILE1_2 which are 2gb each, respectively. Everything I've tried has just copied the original file into two new, identical files - no split or anything.</p>

<p>After doing some Googling and reading some of the answers here, I found this post, but it's based on duration, not size (recording video footage at varying levels of quality makes this pointless): <a href="https://stackoverflow.com/questions/32443815/split-into-equal-parts-and-convert-many-mp4-videos-using-ffmpeg">Split into equal parts and convert many mp4 videos using ffmpeg</a></p>

<p>Can someone help me with this? I haven't come across any usable solutions utilizing what I understand to be the method, using -fs limit_size, and I really want to understand how this works.</p>

<p>UPDATE: Also found this, but it hasn't been updated in four years and I don't see anything in there regarding splitting that will prove helpful:</p>

<p><a href="https://github.com/kcm1700/VideoSplitter/blob/master/" rel="noreferrer">https://github.com/kcm1700/VideoSplitter/blob/master/</a></p>