static void Main(string[] args)
{
byte[] b = new byte[128];
string sTitle;
string sSinger;
string sAlbum;
string sYear;
string sComm;
FileStream fs = new FileStream(@"d:/mp3.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!");
isSet=true;
}
if (isSet)
{
//get title of song;
sTitle = System.Text.Encoding.Default.GetString (b,3,30);
System.Console.WriteLine ("Title:" + sTitle);
//get singer;
sSinger = System.Text.Encoding.Default.GetString (b,33,30);
System.Console.WriteLine ("Singer:" + sSinger);
//get album;
sAlbum = System.Text.Encoding.Default.GetString (b,63,30);
System.Console.WriteLine ("Album:" + sAlbum);
//get Year of publish;
sYear= System.Text.Encoding.Default.GetString (b,93,4);
System.Console.WriteLine ("Year:" + sYear);
//get Comment;
sComm= System.Text.Encoding.Default.GetString (b,97,30);
System.Console.WriteLine ("Comment:" + sComm);
}
System.Console.WriteLine("Any key to exit!");
System.Console.Read();
}
相关推荐
python爬虫教程:编写Python脚本来获取mp3文件tag信息的教程
这篇文章主要介绍了编写Python脚本来获取mp3文件tag信息的教程,代码基于Python2.x,文中的注释很详细,需要的朋友可以参考下 下面利用一个python的实例程序,来学习python。这个程序的目的就是分析出所有MP3文件的Tag信息并输出。 import os # 导入os模块,提供文件路径,列出文件等方法 import sys # 导入sys模块,使用sys.modules获取模块...
delphi得到MP3音乐文件里面的信息
数字签名=C1C7263FA648800B669BF659B2E12E34。采集日期=2023-11-23 18:25:26。采集软件=MKM - 我的知识管理。关键字=得到音乐文件里面的信息。//得到音乐文件里面的信息。{得到音乐文件里面的信息。
Python 使用mutagen写入MP3文件标签信息
向歌曲插入歌名,歌手,专辑名和封面图片,以后写一个自己的MP3PLAYER项目时就用得着了 from mutagen.id3 import ID3, APIC, TIT2, TPE1, TALB import os def SetMp3Info(path, info): songFile = ID3(path) songFile['APIC'] = APIC( # 插入封面 ...
MP3文件附加信息解析之我理解
查找了其它地方的网站关于MP3 文件的格式说明之后我就做了一个java 的小程序去解析当前流行的MP3文件的附加信息,比如歌手名 ,专辑 ,和专辑图片等 首先说明一下, 当前Mp3大体就两种 附加信息就有两种,一种是在文件尾部的128个字节,一种是 在文件头的可变长的信息 对于文件尾的固定128字节信息的解析网上其它地方有,可以去查,我只是做了一个解析V2.3格式的 方法
深入解析:MP3信息查看软件功能详解
本文还有配套的精品资源,点击获取 简介:MP3信息查看软件是专为MP3格式文件设计的,用于提供文件的详细元数据信息,包括ID3标签、编码参数、采样率、声道信息、播放时间、CRC校验和音量信息等。它帮助用户管理和分类音乐库,确保音频文件质量。此外,该软件可能支持ASF格式文件的相关信息查看。 1. MP3信息查看软件概述 随着数字化音频内容的爆炸式增长,MP3格式...
MP3文件信息提取与分析
MP3是目前最常见的音频格式之一,广泛应用于网络音乐流媒体和音频存储。其压缩技术能够大大减小音频文件的体积而不显著降低音质。然而,为了提升用户体验,除了音频数据本身,MP3文件还包含用于存储歌曲信息的元数据,这些元数据就是ID3标签。MP3信息的获取除了可以通过命令行工具,还可以通过许多方便用户操作的图形界面工具来完成。以下是一些广泛使用的图形界面工具:命令行工具在灵活性、自动化和批量处理方面有其独特的优势。
获取MP3文件信息的代码
-(void)getMp3Information { NSURL *fileUrl = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/RudyExpandedScore.mp3",musicDir]]; AudioFileTypeID fileTypeHint = kAudioFileMP3Type; NSSt
mp3音乐信息解析+MD5信息加密
用来解析mp3文件的信息~还有MD5加密字符与文件的代码,方便快捷的使用哟~~
Java 实现MP3文件信息读取
前言: 最近在做实训,写一个音乐播放器,将文件存储在服务端,然后将相应的数据信息添加到数据库中。不想一个个手动添加,所以在百度之后发现MP3文件本身是只带这些信息的。 更新因为目前mp3文件中ID3v1的信息较少导致下述代码不能正常获取相关信息. 我对下述代码进行了改进. 具体项目代码地址 主要变动. 1. 使用由获取ID3v1中的信息变成了获取,ID3v2中的信息. ...
统信UOS开发环境支持Java
集成了JDK和多种IDE,为开发者提供了从代码编写、编译、调试到部署的一站式开发解决方案。
残差检验_第三十讲 R语言-Cox比例风险模型的假设检验条件
在介绍完 Cox比例风险模型的详细理论和R实现以后(插入链接!!!),我们已经知道Cox比例风险模型可以较好的同时矫正多个混杂因素对结果的影响,同时我们遗留下来了一个问题:Cox比例风险模型的假设检验条件是什么?这一讲,我们将对此进行解答。请注意,如果使用不当,统计模型可能会产生误导性的结论。因此,检查给定的模型是否适合数据类型是非常重要的!1. Cox比例风险模型的假设条件Cox比例风险模型的成...
android获取MP3文件的歌曲信息
MediaMetadataRetriever mmr = new MediaMetadataRetriever(); String str = getExternalStorageDirectory() + "1.mp3"; Log.d(TAG, "str:" + str); try { mmr.setDataSource(str); String
74hc595驱动模块的Verilog设计(线性状态机)
module hc595_driver( input clk, //50Mhz input rst_n, //复位信号 input [15:0] data, //数码管待显示数据,8位段选数据,8位位选数据 input en, //使能 o...
使用jaudiotagger获取及设置mp3信息
之前在网上搜索获取mp3信息时花费了很多时间,主要是遇到了无法读取中文信息的问题,后来发现是标签类用错了。 我做了一些整合以后,写了三个工具方法,分别是获取歌曲信息,设置歌曲信息和获取封面图片。 获取 /** * 获取歌曲信息构造Music对象 * * @param file 歌曲路径 * @return Music对象 * @throws Exception Exception */ public static Music g
【AI智能体】Skills 智能体驱动开发从使用到项目实战详解
Skills 智能体驱动开发从使用到项目实战详解
OpenAI最强编程助手Codex:下载安装、使用指南(含使用方式、提示技巧、趋势)
OpenAI最近上线了最强编程Agent——Codex,一起来看看吧!
php获取mp3时间,实现php获取mp3文件元信息如播放时间歌曲作者等
最近收集到一个php获取mp3文件元信息的类,感觉比较方便。现在分享给大家!下面是使用方式和测试方式:include_once 'mp3file.class.php';function mp3Time($file) {$m = new mp3file($file);$a = $m->get_metadata();return $a['Length mm:ss'] ? $a['Length m...
YOLOv11改进 - 卷积Conv | SPD-Conv空间深度转换卷积优化空间信息编码,攻克小目标检测难题
本文介绍了一种名为SPD-Conv的新型CNN构建块及其在YOLOv11中的结合。传统CNN在处理低分辨率图像或小物体时,因使用步长卷积和池化层导致细粒度信息丢失、性能下降。SPD-Conv由空间到深度(SPD)层和非步长卷积(Conv)层组成,完全消除卷积步长和池化层,避免信息损失。SPD层重排特征图元素将空间信息转换到深度维度,非步长卷积层进一步处理特征图。我们将SPD-Conv集成进YOLOv11,实验证明其在低分辨率图像和小物体检测任务上显著优于现有模型。
Android 播放raw文件夹下音频文件,本地MP3文件播放,播放云端MP3文件,获取MP3文件播放时长(1)
今天关于面试的分享就到这里,还是那句话,有些东西你不仅要懂,而且要能够很好地表达出来,能够让面试官认可你的理解,例如Handler机制,这个是面试必问之题。有些晦涩的点,或许它只活在面试当中,实际工作当中你压根不会用到它,但是你要知道它是什么东西。最后在这里小编分享一份自己收录整理上述技术体系图相关的几十套腾讯、头条、阿里、美团等公司2021年的面试题,把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节,由于篇幅有限,这里以图片的形式给大家展示一部分。还有。
【ESP 保姆级教程】玩转emqx数据集成篇④ ——数据桥接之HTTP服务
主要是学习数据桥接功能以及构建自己的http服务器,这是一个非常有用的功能。包括各种传感器上报基本上都需要数据桥接功能支持,所以还是希望认真学习这一块开发,然后结合数据库存储等等知识点进行进一步学习。
无监督学习与互信息
在机器学习中,获取大量高质量标注数据成本高昂。为解决此问题,无监督学习利用丰富的无标注数据成为研究重点。其中,互信息是衡量两个随机变量之间依赖关系的关键指标,能够捕捉非线性统计关联,非常适合处理非结构化数据。通过最大化神经网络中变量间的互信息,可以有效地从无标注数据中提取有用信息,提升模型在下游任务(如分类)的性能。互信息与熵密切相关,其值等于联合分布与边缘分布乘积间的KL散度,也可通过熵与条件熵的差值得出,具有对称性,并反映了已知一个变量后另一个变量不确定性的减少。
C#之获取mp3文件信息
下载Interop.Shell32.dll 添加引用 并将dll的属性 “嵌入互操作类型”改为false string file = Server.MapPath("/MP3/test.mp3"); ShellClass sh = new ShellClass(); Folder dir = sh.NameSpace(Path.GetDi...
Devexpress16.2.6破解工具
Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具
获取mp3部分信息的python代码
这是python代码,用于获取mp3部分信息,可以修改path参数。
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
C# 获取 mp3文件信息
C# 获取 mp3文件信息【包括:文件大小、歌曲长度、歌手、专辑】 第一种方式:[代码已验证] // http://bbs.csdn.net/topics/390392612 stringfile=@"E:\滴答.mp3"; ShellClasssh=newShellClass(); Folderdir...
Camera2Demo
在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作
获取MP3,WMA信息
用于获取MP3内部信息,包括歌曲名,歌手名等…… namespace FileBatchRemaer.domain{ /// <summary> /// Mp3信息结构 /// </summary> public struct Mp3Info { public string identify; //T...
1102



被折叠的 条评论
为什么被折叠?



