MacOS – Is it possible to make iTunes write rating on the file itself

itunesmacosmediaplayer

I'm on Yosemite (10.10.2) and using iTunes (12.1.0.50).
I read that iTunes saves the rating of the songs on its own database, not the audio files tags themselves. Is there a way to make iTunes to write the ratings on the files? Because if I move the audio file to any other place, the rating won't be recognized.

Best Answer

If anyone else needs something like this I wrote a quick piece of code using Qt 5.4 and taglib 1.14.0 that reads the iTunes database and writes the play count and rating into each mp3 file. You'll have to build it yourself or download the binary; it seems to work for me: https://github.com/carlonluca/ITunesEmbed. Backup your library before using it.