Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为一个“学习 Groovy”项目,我正在开发一个网站来管理我的媒体收藏(MP3、MP4、AVI、OGG),但我找不到任何开源库来从这些文件中检索元数据。我在想像Linux的文件命令之类的东西。我在 Java 上发现很少有库可以做一个或另一个(如 mp3info),但即使只是音乐文件也不是一个完整的解决方案。这样的图书馆存在吗?这会成为另一个爱好项目吗?感谢您的回答
您可以尝试Entagged Library 从媒体文件中获取元数据
如果您愿意执行外部进程,ExifTool可以从几乎所有发明的文件格式中提取元数据。尽管有这个名字,它可以从不仅仅是带有 exif 标签的 jpg 中提取元数据。
作为最后的手段,你可以使用 mplayer 的转储:
mplayer -identify -frames 0 filename