c#实现获取媒体文件mp3中标题、艺术家、唱片标题、发行年、备注等信息
下面用c#获取媒体文件mp3中标题、艺术家、唱片标题、发行年、备注等信息的方法,请看源代码: C# Code [http://www.xueit.com] using System; using System.Collections.Generic; using System.Text; using System.
下面用c#获取媒体文件mp3中标题、艺术家、唱片标题、发行年、备注等信息的方法,请看源代码:

using System; using System.Collections.Generic; using System.Text; using System.IO; using Egacn.com; using WatchStylish.com; using Study.pctoday.net.cn; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { byte[] b = new byte[128]; string sTitle; string sSinger; string sAlbum; string sYear; string sComm; FileStream fs = new FileStream(@"E:我的文档我的音乐 ew我们初遇的那天-申彗星(http://study.pctoday.net.cn/3_Visual Studio.aspx).mp3", FileMode.Open); fs.Seek(-128, SeekOrigin.End); fs.Read(b, 0, 128); bool isSet = false; String sFlag = System.Text.Encoding.Default.GetString(b, 0, 3); if (sFlag.CompareTo("TAG") == 0) { System.Console.WriteLine("Tag is setted!Replica Watches"); isSet = true; } if (isSet) { //http://study.pctoday.net.cn/3_Visual Studio.aspx sTitle = System.Text.Encoding.Default.GetString(b, 3, 30); System.Console.WriteLine("标题:" sTitle); //Exclusive Replica Rolex Watches; sSinger = System.Text.Encoding.Default.GetString(b, 33, 30); System.Console.WriteLine("艺术家:" sSinger); //get album; sAlbum = System.Text.Encoding.Default.GetString(b, 63, 30); System.Console.WriteLine("唱片标题:" sAlbum); //egacn.com/Watches/Tag-Heuer; sYear = System.Text.Encoding.Default.GetString(b, 93, 4); System.Console.WriteLine("发行年:" sYear); //watchstylish.com; sComm = System.Text.Encoding.Default.GetString(b, 97, 30); System.Console.WriteLine("备注:" sComm); } System.Console.WriteLine("Any key to exit!"); System.Console.Read(); } } }
看看代码,也不是很难,挺简单。
收藏文章
精彩图集
精彩文章
- 暂无记录。
热门标签
更简单
箭头操作符
效率低下
20位
文
限制IP
md5_file
php php读取
buffer
table合并
表中的数据
java基础类
sa密码
js改变背景图片
gdb
norflash接口
修改表名
购物车类
负载平衡
另一
图片压缩
求n以内的素数
操作数组
读写文件
共存
队列
cin.getline
检测lvs
任务栏
php类使用
final关键字
加减乘除
User-mode
msyql
判断文件格式
观察者模式
select操作
扩展
ins_ctx.mk
相同文件
保障
squid
tel.xls.vbs
广告
memcached
段落还原
数据库主体
each
行政区划数据
哈希
原生js
相对窗口
上传进度
mrtg
意外终止
vbs脚
释放被锁
15位
页面
html()
赞助商链接
@CopyRight 2002-2008, 1SOHU.COM, Inc. All Rights Reserved QQ:1010969229