Optimal-state Dynamics Estimation for Physics-based Human Motion Capture from Videos