You are not logged in.
Hi, this is my first post here.
I've got a collection of mp3 files each one containing a list of genres (recognized as different genres by Mp3Tag & Foobar).
I've been able to use Pascal Scripts using CalculateMetaTag to read genres from them, but I dont know how to read more than the first genre of each file ...
It's possible to read the whole 'string' of genres contained in a mp3 file from Pascal Script? … I've searched for the information overthere but I didn't found the solution and I would like to use ReNamer's ability to move files and change (create) folder structures.
Thanks in advance
And thanks to Denis for this GREAT tool: easy, powerful & efficient.
Offline
Can you provide a sample file?
You can remove the audio content (or fill it with silence), i just need the meta information.
ID3v1 allows to specify only 1 genre and ID3v2 allows to specify any text as genre. ReNamer should be able to get both of them in full and ID3v2 allays have the priority over ID3v1. It is possible that Mp3Tag & Foobar are extracting 2nd genre from a different type of meta data.
Offline
No problem. I'll send you a file in a few hours (I've no time now)
I think it's ID3v2.
Thanks.
Offline
Here is a 5seconds file.
http://www.mediafire.com/file/ozzyd25dk … xample.mp3
Mp3Tag shows ID3_Genre like this: FirstGenre\\SecondGenre\\ThirdGenre ... (ID3v2.3 ID3v1).
When I put the file in foobar2000 library, this 'string' is recognized as three different genres.
And this is the Pascal Script.
------------------------------------------
var
Genre : WideString;
begin
Genre := CalculateMetaTag(FilePath, 'ID3_Genre');
showmessage(Genre);
FileName := Genre + WideExtractFileExt(FileName);
end.
------------------------------------------
You'll see that CalculateMetaTag returns just the first instance: FirstGenre
¿Is There any way to get the rest of them ...?
Thank you very much
Offline
Are you sure the ID3v2 specs state that multiple genres are allowed? FWIW, Winamp also displays just "FirstGenre".
Offline
Thank you, Andrew. I don't use winamp (for me it's very heavy compared to foobar), so I don't know how it displays it, but (my installation of) Mp3Tag says exactly:
ID3v2.3 (ID3v1 ID3v2.3)
So I think this is ok with v2.3 specs.
(and foobar displays all of them)
Wikipedia (http://en.wikipedia.org/wiki/ID3) says:
... ID3v2.3 expanded the frame identifier to four characters, and added a number of frames. A frame could contain multiple values, separated with a / character. This is the most widely used version of ID3v2 tags ....
It's true that my 'string' uses \\ as separator ... not / ... (?) I don't know why ... I'm really far to be an ID3 specs expert.
Offline
This is what I found. Check out TCON as defined in section 4.2.1 here. So it is possible to mention multiple genres in the TCON frame, though I don't see either the "/" or the "\\" separators mentioned there. All I see is multiple genre index numbers in parentheses, i.e. "(51)(39)" and so on.
So if this is the spec, then I guess CalculateMetaTag() should indeed be able to retrieve all of the specified genres.
Offline
Thank you, Andrew. It's Ok.
Maybe this is a special feature by Mp3Tag & Foobar out of the official ID3 specs.
As the genres I manage are not the indexed ones (just ID3v1) official specs and it seems to be impossible to read all of them from Pascal script, I will try to build a Pascal script for ReNamer from a modified export txt file from Mp3Tag.
Thanks again.
Offline
Thanks to all of the information you guys dug up I was able to investigate further and I found out how multiple genres were stored in ID3 tags. I have modified the code for retrieving ID3 tags and now it picks up all 3 genres from the example uploaded by Syborg.
The only problem is that my hosting company is having technical difficulties and I can't upload the new version at the moment. I will post here as soon as the latest dev version is uploaded.
Offline
The latest dev version has been updated: ReNamerBeta.zip
Offline