zoukankan      html  css  js  c++  java
  • 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;
                }
  • 相关阅读:
    php知识点
    CommonsChunkPlugin知识点
    待学习
    svn知识点
    es6知识点
    webpack2新特性
    排序算法
    交流措辞
    js继承
    多行编辑软件
  • 原文地址:https://www.cnblogs.com/Googler/p/3626071.html
Copyright © 2011-2022 走看看