I think I may have figured out the cause and a makeshift solution for this bug, at least one that (finally) works for me, and that I have not seen mentioned often elsewhere.
On my tablet (Nexus 7 2nd gen), I had seen the mediaserver bug very often and practically given up trying to solve it.
However, on my phone (I9505G aka SGS4 GPe), I hadn't seen the bug once. Both devices were running 100% stock Android 4.3. Then one day I noticed the bug rearing its ugly head on my phone too. I hadn't copied ANY new files to the device recently, so that threw any theories about "corrupt media files" out the window. I racked my brains and realized the only thing I'd done differently in the past 24 hours was played a game (Rayman Jungle Run) on the phone, which I usually only use for calls, emails, and e-books. On my tablet however, I play Rayman Jungle Run often.
So, I just ran this sequence of tests on both my phone and tablet, with the same results.
- Full charge. Fresh boot. Run for several hours. RESULT: No mediaserver drain.
- Launch Rayman, play for 1 minute. Return to home screen but do not force close the app. Wait a little while. RESULT: Mediaserver drain begins.
- Force close the Rayman app (I used an Elixir shortcut to do this, but using the apps menu should work fine). Wait a couple hours. RESULT: Mediaserver drain has stopped!
I did a lot of searches on the web and only found one other reference to similar phenomenon, and that post referenced the Rayman game as well as another game called Super Hexagon or something. The apparent lesson here is that certain apps have the ability to trigger the mediaserver bug. In my case at least, it has nothing to do with what media files I have on the device, or what Google services I allow/prevent running (these are both things I see frequently quoted as supposed solutions).
I would also hypothesize that if you have an app which triggers the mediaserver drain, and this app autoruns at startup or any periodic time intervals, then the only surefire solution in that case would be to uninstall the app, unfortunately. This could explain why some people do not find that rebooting helps... if the offending app runs at startup, of course the drain will begin right away also.