When I looked into this I found that MP4Box didn't accurately cut/split files (keyframes issue?).
So I used ffmpeg and found it be accurate. I wrote a script to do this for Windows.
To note: it's been written to process all .mp4 files in the directory/folder.
:: Name: mp4-split-ffmpeg.cmd
:: Purpose: Configures ffmpeg to losslessly split/crop an mp4 file
:: Author: jaybeee @ themixingbowl.org
:: Revision: Nov 2015 - v0.1
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
:: variables begin with v
:: set name of this script without file extension
SET vMe=%~n0
:: set name of the parent directory where this script resides
SET vParent=%~dp0
:: set location of ffmpeg ** CHANGE ME **
SET vffmpeg="C:\Program Files (x86)\ffmpeg\bin\ffmpeg.exe"
:: Ask for the user to enter the Start & End times in hours, minutes, seconds
echo ** Enter Start Time of where to begin split in hh mm ss.mmm format when prompted **
SET /p vShh="Start Time (hh): "
SET /p vSmm="Start Time (mm): "
SET /p vSss="Start Time (ss.mmm): "
echo ** Enter End Time of where to end split in hh mm ss.mmm format when prompted **
SET /p vEhh="End Time (hh): "
SET /p vEmm="End Time (mm): "
SET /p vEss="End Time (ss.mmm): "
:: convert Start & End input time to seconds
SET /A vStart=(%vShh%*3600)+(%vSmm%*60)+(%vSss)
SET /A vEnd=(%vEhh%*3600)+(%vEmm%*60)+(%vEss)
:: set this variable to Start Time minus 1 second for the fastest seek time
SET /A vFastSeekStart=%vStart%-1
ECHO ffmpeg will now split the file starting at %vStart% seconds and ending at %vEnd% seconds...
ECHO %vFastSeekStart%
:: call ffmpeg to split/crop (copy) out the audio using -ss (start time) & -to (end time) (-t [duration time])
:: time can be: [HH:MM:SS.mmm] eg 01:59:58.123 OR in seconds: [S+.mmm] eg 7198.123
:: Please note: -hide_banner will suppress printing the banner info. Ensure you are running an up to date ffmpeg version
MKDIR split-mp4
FOR %%f IN ("*.mp4") DO %vffmpeg% -i "%%f" -ss %vStart% -to %vEnd% -codec copy -movflags faststart -hide_banner "split-mp4\%%~nf-split.mp4"
:: Finish
ECHO Finished mp4 split
:: pause can be used to view the extraction details
PAUSE
:END
ENDLOCAL
ECHO ON
@EXIT /B 0
I've also just had a test with the latest MP4Box and on the files I tested on it resulted in the same split file, so maybe I've not found a good test file or they've resolve any issues they had. To answer your question I use -splitx. Anyway, here's the MP4Box Windows script I created :
:: Name: mp4-split.cmd
:: Purpose: Configures mp4box to extract a new mp4 file using the user entered Start & End time values
:: Author: jaybeee @ themixingbowl.org
:: Revision: Aug 2016 - v0.1
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
:: variables begin with v
:: set name of this script without file extension
SET vMe=%~n0
:: set name of the parent directory where this script resides
SET vParent=%~dp0
:: set location of mp4box ** CHANGE ME **
SET vmp4box="C:\Program Files\GPAC\mp4box.exe"
:: Ask for the user to enter the Start & End times in hours, minutes, seconds
echo ** Enter Start Time of where to begin split in hh mm ss format when prompted **
SET /p vShh="Start Time (hh): "
SET /p vSmm="Start Time (mm): "
SET /p vSss="Start Time (ss): "
echo ** Enter End Time of where to end split in hh mm ss format when prompted **
SET /p vEhh="End Time (hh): "
SET /p vEmm="End Time (mm): "
SET /p vEss="End Time (ss): "
:: convert Start & End input time to seconds
SET /A vStart=(%vShh%*3600)+(%vSmm%*60)+(%vSss)
SET /A vEnd=(%vEhh%*3600)+(%vEmm%*60)+(%vEss)
ECHO MP4Box will now split the file starting at %vStart% seconds and ending at %vEnd% seconds...
:: call mp4box to extract a new file using -splitx from Start to End in seconds
MKDIR split-mp4
FOR %%f IN ("*.mp4") DO %vmp4box% -splitx %vStart%:%vEnd% "%%f" -out "split-mp4/%%~nf.mp4" -new
:: Finish
ECHO Finished splitting mp4
:: pause can be used to view the extraction details
PAUSE
:END
ENDLOCAL
ECHO ON
@EXIT /B 0