We had a rental house with terrible cat urine and feces smell in the basement carpet. I assumed we'd have to toss the carpet but the renter was able to get rid of 100% of the smell. I'm not sure how she did it but she told me she just used the vacuum. I suspect she sprinkled some sort of powder, probably baking soda, on there and then vacuumed it off.

This guy has a recipe he claims works. After this recent demonstration, I'd try it. It was amazing.

http://www.remove-cat-urine.com/THE-RECIPE.html

I can tell you shampoo and bleach won't touch the smell, though.