avisplit ?

-t Split the input file based on time/framecode (hh:mm:ss.ms)
-c Together with -t. Merge all segments into one AVI-File again instead generating seperate files.

a command line with many thousands of -t entries may blow up ... try it.
_________________________
LittleBlueThing Running twin 30's