rejetto forum

Software => HFS ~ HTTP File Server => F.A.Q.s => Topic started by: xitsa on July 05, 2007, 01:19:31 PM

Title: A way to display *.mp3 tags
Post by: xitsa on July 05, 2007, 01:19:31 PM
For those who want to see more than track01.mp3, ..., track11.mp3
in folder listing I can present a small utility mp3ToIon.
It is command line app and when run in a folder containg *.mp3, *.ogg and may be *.wma (haven't any to test) with tag info present, It extracts tag info in file descript.ion in that folder.
HFS from build 106 handle it very nice.

P.S. In attachment: utility and sources to it
P.P.S. I wrote it ages ago and lost newer sources, but look in archives to try to find it if anyone is interested.
Title: Re: A way to display *.mp3 tags
Post by: fabnos on July 05, 2007, 01:38:15 PM
Tnx a lot is a very nice tool  :D
Title: Re: A way to display *.mp3 tags
Post by: maverick on July 05, 2007, 02:36:00 PM
Excellent utility!  Thanks.  I does work with wma files also.
Title: Re: A way to display *.mp3 tags
Post by: TSG on July 05, 2007, 03:20:11 PM
Would a utility like this be able to display the video resolution of an avi/divx file?

Want a method of putting the video info on a page.
Title: Re: A way to display *.mp3 tags
Post by: xitsa on July 05, 2007, 03:24:25 PM
Found latest sources
Title: Re: A way to display *.mp3 tags
Post by: xitsa on July 05, 2007, 03:44:12 PM
Would a utility like this be able to display the video resolution of an avi/divx file?

Cause if this is possible i can make the preview box for my template auto-size for the video you want to see. atm its just stuck in a widescreen resolution.

Do you know about GSpot (http://gspot.headbands.com)?
Set in Options/Export/ Enable Exporting=true, One file per avi (auto name and location) and make custom format.
Then just drag files to, or open some files.
Title: Re: A way to display *.mp3 tags
Post by: maverick on July 05, 2007, 05:13:45 PM
Yes, GSpot is good.  I have been using it for a long time.  I like using the older version 2.21 for getting avi info.  It's quick.  It's also found at the GSpot site.  I was having problems with their newest versions.
Title: Re: A way to display *.mp3 tags
Post by: KalleB on July 05, 2007, 05:25:54 PM
Suggestion for rejetto:

If "mp3ToIon.exe" is present in the same directory as HFS.exe, use it to automatically generate descript.ion files for folders that contain mp3 or other supported files.
Title: Re: A way to display *.mp3 tags
Post by: TSG on July 05, 2007, 05:52:21 PM
Yes, GSpot is good.  I have been using it for a long time.  I like using the older version 2.21 for getting avi specs.  It's quick.  It's also found at the GSpot site.  I was having problems with their newest versions.

Does it do the same thing as the mp3 one here, and show the specs as decript.ion? I'm looking for a method of easily giving a page the resolution and stuff for avi files.
Title: Re: A way to display *.mp3 tags
Post by: maverick on July 05, 2007, 06:17:11 PM
Does it do the same thing as the mp3 one here, and show the specs as decript.ion?

No.  The format it uses is filename.txt. 
Title: Re: A way to display *.mp3 tags
Post by: TSG on July 05, 2007, 07:29:59 PM
Cool, will try now.
Title: Re: A way to display *.mp3 tags
Post by: rejetto on July 06, 2007, 12:31:24 PM
If "mp3ToIon.exe" is present in the same directory as HFS.exe, use it to automatically generate descript.ion files for folders that contain mp3 or other supported files.

nice idea... i'd say it should be called only on the folder that is required by the client, if descript.ion doesn't exist.
opinions?
Title: Re: A way to display *.mp3 tags
Post by: xitsa on July 07, 2007, 07:56:55 AM
IMHO, not the best solution: there will be a need to syncronize content of descript.ion and corresponding folder.
For example, let you have a folder with 20 *.mp3 files, after when descript.ion has been created, user add 10 files more.
mp3toin should be called to update descript.ion -- and how to determine when?
My opinion: HFS does great job already it can use descript.ion, and, in my experience, descript.ion for mp3 files doesn't change very often. So let spend 30 minutes to update all folders, and then update only when it needed.
But it my imho :)
Title: Re: A way to display *.mp3 tags
Post by: rejetto on July 07, 2007, 08:33:06 AM
what's the gain in doing all in advance?
i see a con: long waiting at setup time.
Title: Re: A way to display *.mp3 tags
Post by: maverick on July 07, 2007, 10:16:15 AM
I usually create music folders by artist and album.  Sometimes a folder containing individual music from misc artists.  Once the descript.ion file is created for the folder, it is my experience that there is rarely a need to update or change it.

I don't have that many music files on my drive right now - maybe about 1500.  When xista introduced mp3toin to this forum, I updated all my music folders in about 15 minutes.  Now it is done.  That utility works fast.

If HFS automatically handles this and searches through real music folders/subfolders looking for a descript.ion file then executes the mp3toin utiltiy if that file isn't found I'm concerned that there might be a delay in the users browser page opening up because of this.  And, as xista mentioned what if new music files were added to a folder that already has a descript.ion file.  What will HFS do still call the mp3toin utility to overwrite the existing descript.ion file or bypass the update all together because descript.ion already exists?

Right now I think updating the music folders using stand alone mp3tion only when needed.  The admin knows when new music has been added or removed.
Title: Re: A way to display *.mp3 tags
Post by: rejetto on July 07, 2007, 10:58:41 AM
i'm unsure about understanding what you are proposing maverick....  have no new feature about it?

anyway, as i'm proposing, HFS would not detect any change about the mp3 files... it just can't! when i move a file, no "time field" is updated in the file system (AFAIK).
if you change an mp3 folder, and you want your description to be updated, just delete it, and HFS will call mp3toIon.
Title: Re: A way to display *.mp3 tags
Post by: xitsa on July 07, 2007, 11:35:19 AM
A *.bat to fast descript.ion update:
Code: [Select]
@echo off
mp3ToIon.exe
for /r /d %%a in (*) do (
  pushd %%a
  %~dp0mp3ToIon.exe in %%a
  popd
)
Put mp3ToIon.exe and Update.bat in root directory and run Update.bat.
It recursively walk through subfolders and run mp3ToIon.exe there
Title: Re: A way to display *.mp3 tags
Post by: TCube on July 07, 2007, 12:08:43 PM
I shall take a closer look to this ! sounds rather cool, thanks xista.
But my music tagging is already tighted up through JRiver media tools
Tcube
Title: Re: A way to display *.mp3 tags
Post by: KalleB on July 07, 2007, 06:39:11 PM
I'd say it should work like this:

* If descript.ion file is not present in the mp3 folder, HFS calls Mp3ToIon.exe to generate one.

* If the file is already there, HFS checks if there is a descript.ion entry for each file listed in the files.lst
--- If the lists match, HFS does nothing
--- If they don't, call Mp3ToIon to generate new descript.ion

If someone does not want this kind on function and likes to update everything manually himself, he could just leave the Mp3ToIon.exe out of HFS folder :)
Title: Re: A way to display *.mp3 tags
Post by: maverick on July 07, 2007, 07:25:43 PM
i'm unsure about understanding what you are proposing maverick.... 

Quote from: kalleb
I'd say it should work like this:

Yes that is what I was trying to say in my post here -> http://www.rejetto.com/forum/index.php?PHPSESSID=5916cdd7407f8478928e19323d4e3696&topic=4600.msg1024677#msg1024677

Looking at that post I guess it wasn't clear enough.  Last post before bed. :)
Title: Re: A way to display *.mp3 tags
Post by: Fernando on August 09, 2007, 03:58:31 PM
To make everyone happy, I would suggest a plugin solution: HFS searches at startup for special DLL's having an entry point called RegisterPlugin, which returns a plugin name and the extension(s) that it handles.
A voice could then be added on a plugin menu in HFS to enable plugins in sected dirs.
Just before showing each file, HFS calls a method in the plugin that displays info.
This way Rejetto can achieve the purpose without having to code himself and letting us do the work  ;D
Also, with everybody's help we could have a lotta plugins for avi, mp4, ogg, mp3, flv etc.
Title: Re: A way to display *.mp3 tags
Post by: rejetto on August 13, 2007, 01:48:59 AM
do you think we would see many plugins?
Title: Re: A way to display *.mp3 tags
Post by: TSG on August 13, 2007, 04:47:32 AM
I like the idea of plugins. It's worked for many other programs...it will also give HFS users more freedom... Especially if the plugin system allows access to most of HFS... search engine anyone? :P


There is a question of security... lets hope no one makes any malicious plugins...
Title: Re: A way to display *.mp3 tags
Post by: rejetto on August 13, 2007, 09:58:49 PM
because you think a plugin system would "open" hfs to any feature.
it's not so, i have to open every single bit. it's a dirty long job. and that's the main reason i would like to see HFS made in python. it would open everything with no effort. (but it means to rewrite HFS from scratch, months of hard work)
Title: Re: A way to display *.mp3 tags
Post by: ledufe on September 24, 2007, 09:16:32 PM
and what about the action script from flash? since we dont have php or asp to access the files, the flash player can access the id3 of a mp3 file...
here is the info about how to do it...
http://livedocs.adobe.com/labs/air/1/jslr/flash/media/Sound.html#id3
i will test it later...
Title: Re: A way to display *.mp3 tags
Post by: rejetto on September 25, 2007, 12:57:22 PM
yes, but it does it client-side.
it has to download those info.
it's way slower.
Title: Re: A way to display *.mp3 tags
Post by: ledufe on September 26, 2007, 01:05:02 AM
sorry, i thought that could be used in a web page....
Title: Re: A way to display *.mp3 tags
Post by: parade on November 03, 2007, 10:52:09 AM
A *.bat to fast descript.ion update:
Code: [Select]
@echo off
mp3ToIon.exe
for /r /d %%a in (*) do (
  pushd %%a
  %~dp0mp3ToIon.exe in %%a
  popd
)
Put mp3ToIon.exe and Update.bat in root directory and run Update.bat.
It recursively walk through subfolders and run mp3ToIon.exe there

I tried "update.bat" and it does not work in my directory-structure. I think that is because my starting "root-directory" for my MP3-files is a subdirectory of upper directories with spaces in it.
If I start it from a root without spaces in the upper path, it does not work as wanted either:
The descript.ion-files in the subdirectories don't get the descriptions I configurated in my ini-file. They contain only Interpreter and Songtitle. The descript.ion-file in the root is build in the correct way. The reason for this is obviously that mp3ToIon.exe doesn't read the ini-file, when working on subdirectories of the root. Instead of this it takes the constants in the exe. If I place the ini-file in the subdirectory too, all works as intentioned.

I have to admit that I don't really understand the code in the Batch-file.
My understanding in batch-code is very basic.
Can anybody tell me what I have to do, to make it work properly.

Thanks
parade
Title: Re: A way to display *.mp3 tags
Post by: rejetto on November 04, 2007, 05:36:53 AM
when spaces occur, the solution is often to "quote" the filename
Title: Re: A way to display *.mp3 tags
Post by: parade on November 04, 2007, 07:52:20 AM
when spaces occur, the solution is often to "quote" the filename
Thank You rejetto. I knew that but as I did not understand the batch-file (update.bat), I did not know where to place the quotes.
Since yesterday I read a little about batch-files and now I know I have to put "%~dp0" in quotes.

But the main problem is still unsolved for me.
Mp3toion.exe needs its ini-file in the directory in which it is working in. As this directory changes all the time in the loop it doesn't have the ini-file in the subdirectories in which it is executing. Without the ini-file to read the parameters it executes with the defaults in the program and that are only %2 and %1.

I don't know whether and how to resove this in an batch-file.
Maybe it is necessary to change the program itself but I know even less about Delphi than about batch-files. ;)

I like this solution with the detailed information from the ID-tag in the descript.ion very much, but without a working batch-solution for subdirectories would be far too much work to do. My MP3s are sorted:
First directoty (root): MP3s
First subdirectory: Initial letter of the artist
Second Subdirectory: Artist
Title: Re: A way to display *.mp3 tags
Post by: xitsa on November 06, 2007, 02:28:30 PM
You can try this mp3toion, which now use first parameter as a template:
Code: [Select]
mp3ToIon.exe "%2 -- %1 of %4"

Didn't tested though  ;)
Title: Re: A way to display *.mp3 tags
Post by: parade on November 06, 2007, 06:26:29 PM
You can try this mp3toion, which now use first parameter as a template
Thank you very much xitsa. As I am not familiar with code it took a while till I understood how to change the update.bat but it works.

To make me completely happy it would be nice to have the technical details like bitrate too. ;-)
This I found: http://www.dsdt.info/tipps/?id=349 (http://www.dsdt.info/tipps/?id=349)

Is there someone who knows enough about Delphi and has a developer kit, to do this?
Title: Re: A way to display *.mp3 tags
Post by: parade on December 02, 2007, 10:11:56 AM
Hi xitsa,

Didn't tested though  ;)

As I told before principally it works for me.
But there is a bug.
If there is nor Track-number in the ID-Tag the year is not read properly.

Greetings
parade


Title: Re: A way to display *.mp3 tags
Post by: Tamer on December 29, 2007, 05:33:58 PM
Quote
Would a utility like this be able to display the video resolution of an avi/divx file?
I use this one: http://shounen.ru/soft/avinfo/doc_ru.shtml (http://shounen.ru/soft/avinfo/doc_ru.shtml) Try it.. =)

Some description in couple rows:
AVInfo is an utility for displaying AVI, MPEG, OGG/OGM, MKV, IFO header information. It returns the length of a clip, FPS, resolution, codecs, sound parameters, and the number, type and language of the streams, including detailed information for each of the following resolution, length, fps...

Take a look at the samples here http://shounen.ru/soft/avinfo/sample.shtml (http://shounen.ru/soft/avinfo/sample.shtml)
Title: Re: A way to display *.mp3 tags
Post by: rejetto on December 30, 2007, 01:53:36 AM
nice tool, thank you tamer
Title: Re: A way to display *.mp3 tags
Post by: parade on January 08, 2008, 02:43:52 PM
As I noticed there is another problem using mp3toion and a problem with HFS reading descript.ion-files, created by mp3toion.

Mp3toion doesn't read tags with german special characters correctly.

Example MP3:
Bläck Fööss - Dat Wasser vun Kölle.mp3

Descript.ion created by mp3toion:
"Bl¤ck Fææss - Dat Wasser vun Kælle.mp3" Interpret: Bl¤ck Fææss # Songtitel: Dat Wasser vun Kælle # Album: Viva Express # Track-Nr.: 0

Because of the corrupted characters in descript.ion HFS displays nothing at all.
Title: Re: A way to display *.mp3 tags
Post by: rejetto on January 15, 2008, 06:54:57 AM
Hey guys, this seems to be huge
http://www.sno.phy.queensu.ca/~phil/exiftool/
Title: Re: A way to display *.mp3 tags
Post by: Agret on November 29, 2008, 11:54:06 AM
Why not just incorporate the functionality directly into HFS rather than using this external program to generate the file.
Just have it so that if there is no descript.ion entry for the mp3 file to show the tags from it.
Title: Re: A way to display *.mp3 tags
Post by: rejetto on November 29, 2008, 12:26:40 PM
hfs should not handle everything.
instead, hfs could be configured to call the utility through macro {.exec.}
if something is required for this, i may help.
Title: download location
Post by: p.sambill on November 16, 2009, 07:24:10 PM
Hi everybody!

I took me the time and created my own Program to create Description for *.mp3 files.
it displays:
Artist - Album - Title - Bitrate - Audiomode - Playtime - genre

simply select a starting folder and it goes thru all subfolder and creates new Descript.ion file.
due to i wanted to have bitrate and playtime it takes some time to go thru all files...

 Please deactivate <use OEM for description> in the Menu.

Greetings Patrick

download at : www.sambill.de/mp3zuion.exe  NEW VERSION

Hallo allerseits!

Ich habe mir mal die Zeit genommen und mein eigenes Programm für die Erstellung der Descript.ion für MP3 Dateien erstellt.
Es zeigt an Künstler - Titel - Bitrate - Stereo/Mono - Abspieldauer
Einfach das programm starten und das Startverzeichnis auswählen, es geht von dort aus selbstständig durch alle Unterverzeichnisse und erstelle die Descript.ion. Bitte deaktiviere "use OEM for Description" im Menue

Grüße
Patrick
Title: Re: A way to display *.mp3 tags
Post by: raybob on August 28, 2012, 04:33:59 PM
You could probably get ID3 tags of a file very easily using command line PHP with {.exec|php.exe|out=x.} also...

http://php.net/manual/en/book.id3.php
Title: Re: A way to display *.mp3 tags
Post by: dj on October 22, 2018, 07:10:47 AM
mp3toion in javascript
update: mp3toion_with_ogg extracts cover
update: mp3toion_with_lyric with querystringparameter ?lyrics finds lyric