C# MP3文件属性读取
using (TempFile tempFile = new TempFile()) { using (FileStream fs = new FileStream(tempFile.FileName, FileMode.Create, FileAccess.Write, FileShare.Read, 0x1000)) using (Stream input = propertyBag.GetResponse()) { input.CopyToStream(fs); } UltraID3 id3 = new UltraID3(); id3.Read(tempFile.FileName); propertyBag["MP3_Album"].Value = id3.Album; propertyBag["MP3_Artist"].Value = id3.Artist; propertyBag["MP3_Comments"].Value = id3.Comments; propertyBag["MP3_Duration"].Value = id3.Duration; propertyBag["MP3_Genre"].Value = id3.Genre; propertyBag["MP3_Title"].Value = id3.Title; }
posted on 2014-03-26 17:13 RockyLOMO 阅读(1163) 评论(0) 编辑 收藏 举报
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步