What I want to happen: the equivalent of this: split -n 4 output.mp4
, which generates 4 files. Only the first file is "valid mp4" that you can play. The other 3 files rely on the previous file.
A similar request can be seen here: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2013-May/015090.html
Why I want this to happen: running FFMPEG in the browser, which means 1) file size limit, 2) I don't have the Linux command split
to help me out, just FFMPEG. If I can get FFMPEG to output files of X MB each, I can iteratively delete files as soon as I've read them.
EDIT: as a commenter asked, yes it is possible to run several ffmpeg commands if necessary.
The right solution is not using segments. The following example command generates several 4 valid mp4 files. That's not exactly what I want.
ffmpeg -i ../flv.flv -segment_time 5 -f segment -t 20 %d.mp4
This other solution also does not work (it's the same output as previous incorrect solution):
ffmpeg -i ../flv.flv -ss 00:00:00 -t 5 1.mp4
ffmpeg -i ../flv.flv -ss 00:00:05 -t 5 2.mp4