Classes are really worth the expense. Most studios have an intro price to try it out. Mine has a $35 for two weeks unlimited for new people.
It would be worth it just to do this trial period and attend as many classes as possible to make sure you have correct form and posture. Like anything, doing yoga incorrectly, in poor alignment and with bad form can cause injury. Then, after that, practicing at home and doing a once or twice monthly class to keep your form up to snuff is a good idea. Unless you are experienced in practice and know where your alignment needs work, using online videos can be dangerous.
They say money doesn't buy happiness -- well happiness doesn't buy horses!