For splitting large video files by size in Termux without re-encoding, ffmpeg is limited for exact size splits in MP4 format. But here are some alternatives you can try:
- mp4box (from GPAC)
mp4box can split MP4 files by time or size with less re-encoding.
Install with:
pkg install gpac
Example to split by size (~1GB):
mp4box -splits 1024 input.mp4
This will split input.mp4 into ~1024 MB parts.
- split (standard UNIX tool)
Splits files by bytes but does not preserve MP4 structure.
You get raw file chunks that won't play individually.
Usage:
split -b 1G input.mp4 part_
Use only if you want to split for storage or transfer and rejoin later with cat.
- mkvtoolnix (for MKV files)
If you convert MP4 to MKV, mkvmerge can split by size.
Install:
pkg install mkvtoolnix
Example:
mkvmerge -o output.mkv --split size:1024M input.mkv
This requires conversion but MKV supports splitting better.