This is an oft asked question without any good answer. m4a/m4v are locked formats used to protect the digital rights management policies of Apple for things purchased on iTunes. There have been various efforts at cracking these formats, and some succeed from time to time, but with each new release of iTunes, it appears that Apple changes the game a bit. Certainly I know that the last successful "cracker" of these formats I was aware of became inoperative after the release of iTunes 7.
All that having been said, I *suspect* it is of dubious legality to break these formats. Apple is within its legal rights to protect the media it sells. You shouldn't expect something for nothing.
That having been said, I have followed the efforts to crack these formats with some interest because, as an ethical person myself, I bridle at not being able to do what I wish with media that I have paid for. I buy a CD and I can rip it, record it, play it... do whatever I want with it.... AS LONG AS I don't redistribute it. I can't do any of these things with iTunes music/videos, and as a result, I buy only the bare minimum I can get away with.
The above of course is a HUGELY divisive topic, best left to the realm of a bar, over what a friend of mine euphamistically calls "a cold adult beverage"!