Ruby mp3 Id3解析 [英] Ruby mp3 Id3 parsing
问题描述
目前,我正在做一个音乐项目,处理用户mp3上传.问题是我找不到对所有文件都能正常工作的id3库.
我已经尝试过id3-ruby
和Mp3Info
库,但是它们都没有给我一致的正确结果.
例如,最常见的问题:
Currently I'm working on a music project, dealing with user mp3 uploads. The problem is that I can't find an id3 library that will work correctly for all files.
I have tried id3-ruby
and Mp3Info
libs but none of them gives me consistently correct results.
For example, most common problems:
- 错误的流参数(比特率和采样率,有时是持续时间)
- 不支持扩展标签
我决定添加一个表格,用户可以在其中提供艺术家和标题等可选信息;有所帮助,但并未完全解决问题.
I decided to add a form, where users can supply optional information like Artist and title; that helped a little, but didn't completely solve the problem.
红宝石最有用且功能最强大的ID3库是什么?
What's the most usable and powerful ID3 library for ruby?
推荐答案
http://www.hakubi .us/ruby-taglib/
我将此用于项目,并且效果很好.围绕taglib的包装器,该包装器非常便于携带.
I used this for a project and it worked quite well. Wrapper around taglib, which is very portable.
这篇关于Ruby mp3 Id3解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!