Fixed width and height mismatch and added video variable
Optimised setting recording length output