开发者

read or write ratings from AAC file

I'm trying to figure out how to read the "ratings" from an AAC file on Windows 7. This data is somehow persisted in the file as the Windows 7 shell and开发者_StackOverflow WMP can read / write the ratings.

In MP3 the ratings data is stored in the PopularimeterFrame of the Id3v2 but AAC does not use Id3v2 tags.

Does anyone happen to know how to get at this info?

I'm using TagLib# to read meta data btw.


Figured this out.

Prerequisites: Windows API Code Pack

static void WriteAACData(FileInfo file, int rating, int playcount)
{
    ShellFile so = ShellFile.FromFilePath(file.FullName);
    uint fileRating = (uint)so.Properties.System.Rating.Value;
    System.Diagnostics.Trace.WriteLine(String.Format("Rating: {0}", fileRating));
    so.Properties.System.Rating.Value = (uint)rating;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜