Optimized duration of stream