added option --max-segment-duration
fixed bug in an SC mode