Mediaserver is the process in Android that cans all your media files and builds a library. When it uses alot of battery this indicates that it has to rescan your files all the time. In most cases it's caused by a bad SD card but it may also be a corrupt media file you have.
If you have an external memory card in your phone, first try the phone for a few days without that card. If media server is not draining the battery without memory card, try formatting the card or test another card.
You can also try clearing data for the app called Media Storage under Settings -> Apps -> All and then restart your phone. Please note that media server will rescan all files when you do this so it might take a while before you see your files and it will use some battery until the scan is complete.
http://talk.sonymobile.com/t5/Xperia-M2-M2-Aqua/Battery-Drain-Issue-due-to-Mediaserver/m-p/817807/hi...