fix calculating video orientation