Added video quality control (fix #40)