C# MP3文件属性读取
2014-03-26 17:13
405 查看
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; }
相关文章推荐
- C# 读取和编辑 MP3 ID3 属性的详细操作和说明 (ID3v2)
- c#实现对MP4等文件属性信息的读取以及对txt文件内容的读取
- 关于c# 读取dbf文件的数据库引擎驱动 (特别针对 shp图层的dbf属性文件)
- 用C#修改Mp3文件属性
- 在C#中用Linq从属性文件中读取键值对Key-Value Pair
- 【笔记】C#读取属性文件的类
- 用C#修改Mp3文件属性
- 在C#中用Linq从属性文件中读取键值对Key-Value Pair
- 用C#修改Mp3文件属性
- C# 读取Properties属性文件
- C#IO 文件读取笔记一(File类和Directory类相关属性,FileInfo类和DirectoryInfo类)
- java读取Properties属性文件的方法
- 如何用C#开发的程序,打开关联文本文件,并且读取文件
- 【转】C#读取文件时的共享方式
- C#读取pdf文件
- C#: 文件读取操作
- c#读取ini文件
- C#反射技术之一读取和设置类的属性
- Java读取属性配置文件
- C#中读取pdm文件信息(PowerDesigner读取方法)