Check video dimension availability before setRatio

Fixes #702