Is there any open-source code can extract content-based music features like tempo, beats, etc.?

My application scenario is like this:

1. A music repository which contains more than 20,000 songs
2. Extract features and auto-tag these songs by the "Program" which could be suggested by you.
3. Auto classify these songs by the tags.