id3

Read ID3 Tags of Remote MP3 File in Ruby/Rails?

痴心易碎 提交于 2019-12-03 20:25:30
问题 Using Ruby, how can one parse the ID3 tags of remote mp3 files without downloading the entire file to disk? This question has been asked in Java and Silverlight, but no Ruby. Edit: Looking at the Java answer, it seems as though it's possible (HTTP supports it) to download just the tail end of a file, which is where the tags are. Can this be done in Ruby? 回答1: which Ruby version are you using? which ID3 Tag version are you trying to read? ID3v1 tags are at the end of a file, in the last 128

Text encoding in ID3v2.3 tags

社会主义新天地 提交于 2019-12-03 15:11:04
Thanks to this site and a few others, I've created some simple code to read ID3v2.3 tags from MP3 files. Doing so has been a great learning experience as I previously had no knowledge of hex / byte / binary etc. I can successfully read data, but have come across an issue that I believe is to do with encoding used. I've realized that Text frames have a byte at the beginning of the 'text' that describes encoding used, and potentially more information in the next 2 bytes... Example: Data from frame TIT2 starts with the byte $03 (hex) before the actual text. This text displays correctly, albeit

Read id3 v2.4 tags with native Chrome Javascript/FileReader/DataView

假装没事ソ 提交于 2019-12-03 07:27:48
问题 Based on the answer of ebidel, one can read id3v1 tags by using jDataView: document.querySelector('input[type="file"]').onchange = function (e) { var reader = new FileReader(); reader.onload = function (e) { var dv = new jDataView(this.result); // "TAG" starts at byte -128 from EOF. // See http://en.wikipedia.org/wiki/ID3 if (dv.getString(3, dv.byteLength - 128) == 'TAG') { var title = dv.getString(30, dv.tell()); var artist = dv.getString(30, dv.tell()); var album = dv.getString(30, dv.tell(

Linux Program can't find Shared Library at run-time

拟墨画扇 提交于 2019-12-03 06:43:59
I'm trying to compile a linux program, id3v2, and it says it is can't find the appropriate library: id3v2: error while loading shared libraries: libid3-3.8.so.3: cannot open shared object file: No such file or directory I'm guessing that this is the part that pulls in the lidid3 library? The file DOES exist, however, what they are looking for is actually a symbolic link to: "ibid3-3.8.so.3.0.0" I'm wondering if it is an issue with it not being able to follow symbolic links? Perhaps I could manually change it to look for 0.0 if I knew where I was looking to change it. I'm happy to clarify any

Adding Cover Art to downloaded mp3 on Android

て烟熏妆下的殇ゞ 提交于 2019-12-03 06:26:15
问题 How do I add a cover art (album art) to a downloaded mp3 programmatically? I am letting my app download a mp3 file via the DownloadManager from the Android APIS as shown below: private void startDownload(){ Uri uri = Uri.parse(BASE_URL+DOWNLOAD+mp3+".mp3"); filename = title+".mp3"; Request request = new DownloadManager.Request(uri) .setDestinationInExternalPublicDir(MUSIC_PATH, filename); DOWNLOAD_MANAGER.enqueue(request); } Is it possible to add a coverart to the downloaded mp3 file, so that

Adding Cover Art to downloaded mp3 on Android

女生的网名这么多〃 提交于 2019-12-02 21:00:04
How do I add a cover art (album art) to a downloaded mp3 programmatically? I am letting my app download a mp3 file via the DownloadManager from the Android APIS as shown below: private void startDownload(){ Uri uri = Uri.parse(BASE_URL+DOWNLOAD+mp3+".mp3"); filename = title+".mp3"; Request request = new DownloadManager.Request(uri) .setDestinationInExternalPublicDir(MUSIC_PATH, filename); DOWNLOAD_MANAGER.enqueue(request); } Is it possible to add a coverart to the downloaded mp3 file, so that the mp3 player on the phone will show a image while playing the song? Download this jar file MyID3_for

Read id3 v2.4 tags with native Chrome Javascript/FileReader/DataView

此生再无相见时 提交于 2019-12-02 20:08:50
Based on the answer of ebidel , one can read id3v1 tags by using jDataView : document.querySelector('input[type="file"]').onchange = function (e) { var reader = new FileReader(); reader.onload = function (e) { var dv = new jDataView(this.result); // "TAG" starts at byte -128 from EOF. // See http://en.wikipedia.org/wiki/ID3 if (dv.getString(3, dv.byteLength - 128) == 'TAG') { var title = dv.getString(30, dv.tell()); var artist = dv.getString(30, dv.tell()); var album = dv.getString(30, dv.tell()); var year = dv.getString(4, dv.tell()); } else { // no ID3v1 data found. } }; reader

Ruby mp3 Id3 parsing

不想你离开。 提交于 2019-12-02 19:40:23
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: wrong stream parameters (bitrate and sample rate, sometimes duration) doesn't support extended tags 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. What's the most usable and powerful ID3 library for

Setting audio file media metadata in Android (ID3)

[亡魂溺海] 提交于 2019-12-02 06:08:15
I am trying to find out if there is a way to set media metadata (mainly ID3 such as artist, album, song, ...) on an anudio file in Android. I have noticed that it is possible to retrieve such information using MediaMetadataRetriever but cannot find out a way to set it. Can you please help? Is it possible? Lukas Knuth You could use the DataStorage to get a File-Object from the MP3-File you want to edit and then use a ID3-Tag Library like Jaudiotagger to edit the ID3-Tags. From the CLI, you can use id3ed . Just build it using Android's NDK, then you can use adb debug bridge to access the shell.

How to set: “artist”, “album artist”, “year”, “album”, “song number” and “title” fields of the tag, with mutagen

别说谁变了你拦得住时间么 提交于 2019-12-01 12:51:10
I'm trying to use mutagen (with Python 2.7.5) to create a program that, given that the path to songs is ...\Artist\Year Album\Songnumber Title.mp3 , sets the artist, album artist, year, album, song number and title tags of the song, and preserves the genre tag. I tried to do this with EasyID3 , but it doesn't have the album artist tag. I also tried to do it with regular ID3 , but I ran into a couple of problems with it. Here's the code I used: from mutagen.id3 import ID3, TIT2, TPE2, TALB, TPE1, TYER, TDAT, TRCK, TCON, TORY, TPUB p = "E:\\Musik\\Aeon\\2005 Bleeding the False\\01 Cenobites -