Skip to main content

Topic: Changes Made to TAG.EXE (Read 137456 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • odyssey
  • [*][*][*][*][*]
Changes Made to TAG.EXE
Reply #75
I don't think that you can, but I don't think that you need to.  You may want to look at --stdout.

Using that switch you can output the important bits to STDOUT, and leave the header writing to STDERR (IIRC).

E.g.:

Code: [Select]
TAG.EXE --stdout --hideinfo --hidenames file.mp3 > tags.txt


I figured that was the only way I could direct the output to a textfile, but it's still being displayed on the screen (it usually should not when the output is directed).

It's just a nice-to-have feature, but I created a backup-script that would save all tags to dummy-files, and it would be nice if I could disable output to the screen (while directing the output to a file using pipes, like default commandline applications act), to simplify the process window.
Can't wait for a HD-AAC encoder :P

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #76
Ummm, is it possible to avoid printing the copyright notice? Currently it outputs to the screen no matter what.
No, AFAIK.

Thanks for the tool. Will not prompt, how I can write a cover in a wv-file? Whether it is possible to register separate tags (for example Cover Art (Front) and Cover Art (Back))?
You cannot write binary tags, AFAIK.
I'm on a horse.

  • A1S
  • [*]
Changes Made to TAG.EXE
Reply #77
Thanks for the tool. Will not prompt, how I can write a cover in a wv-file? Whether it is possible to register separate tags (for example Cover Art (Front) and Cover Art (Back))?
You cannot write binary tags, AFAIK.

There is no possibility to make such option? Very-very big request. In foobar2000 0.9.5 there was a support Embedded album art.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #78
There is every possibility, but very little probability.

It is something that I would like to see in Tag, but I don't think that I have the time or skill to implement it.
I'm on a horse.

  • A1S
  • [*]
Changes Made to TAG.EXE
Reply #79
But can all the same it will be possible?  We by means of a script, using tag.exe and ImgBurn.exe, do a backup copy of audio-disk with all tags (cuesheet,logfile,genre,discid...) in a format wv.iso.wv (process completely automatic). The only thing of that does not suffice is tag Cover Art.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #80
It is obviously possible for an accomplished C(++) programmer to add binary tag support to Tag; if MP3Tag can do it then there is no logical reason why another application cannot.

This post documents the format that MP3Tag uses.
I'm on a horse.

  • ntan01
  • [*]
Changes Made to TAG.EXE
Reply #81
I am having a technical problem with tag.exe.

My question involves the --allow switch on the command line. I have an automated process that records mp3's and dumps them in various directories based on a criteria setup in the recording process. I want to use tag.exe to pull information from the file path and insert it into the tags. I've gotten this much to work just fine.
My problem is that mp3's are constantly being recorded and added to the directories. I would like to schedule a task to run tag every X minutes that crawls the directories and only processes those files that do not have tag information yet. (basically anything added since the last time tag was ran)
I'm assuming that I use --allow to accomplish this, but I'm not sure how to represent a null value. --allow "album=" doesn't seem to do the trick.

Any suggestions?

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #82
--allow will check for an exact match, and that's all.  I'm not sure that it is any use to you.

I  don't know what scripting language you are using, but I would probably look to using Tag's --tostdoutn switch,  to output the value of a specific tag to STDOUT - checking to see whether the value was empty or not and acting accordingly.

Here is a simple DOS example, that will check for the existence of the Artist tag in all MP3s in a directory, and its subdirectories:

Code: [Select]
@ECHO OFF

FOR /R %1 %%G IN (*.mp3) DO CALL :CheckArtist "%%G"

PAUSE

GOTO :EOF

:CheckArtist
    CALL :GetTag Artist %1
    IF [] EQU [%Artist%] ECHO %1 has no Artist field.
GOTO :EOF

:GetTag
    TAG.EXE --tostdoutn %1 --hideinfo --hidetags --hidenames %2>"%TEMP%\tmp.txt"
    SET /P %1=<"%TEMP%\tmp.txt"
    DEL "%TEMP%\tmp.txt"
GOTO :EOF

(Save as a BAT file and drag the root folder onto the icon to test - or pass the folder path as a parameter on the command line.)
  • Last Edit: 05 December, 2007, 03:09:46 PM by Synthetic Soul
I'm on a horse.

  • ntan01
  • [*]
Changes Made to TAG.EXE
Reply #83
Thanks. When I drag and drop, it works fine, but I'm having troubles getting it to run from the command line.

This is probably a total noob question, but how do I get this to work from the command line. I tried:
foo.bat c:\mp3\
and that didn't work. But if I drag the mp3 folder to the foo.bat, it works fine.

What am I doing wrong?

Thanks,
-Nate

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #84
It may be to do with the path to Tag.

Try changing the line that calls Tag to use the full path - or ensure that Tag is in a folder in your PATH (like your Windows folder).

That's all I can think of - it works fine for me either way (I have Tag in my Windows directory).
I'm on a horse.

  • odyssey
  • [*][*][*][*][*]
Changes Made to TAG.EXE
Reply #85
Is it impossible to remove all tags from a file, while tagging specific fields?

I would expect using --remove with -t item=x would erase all existing fields and only leave the specified, but it seem to disregard the --remove parameter.
Can't wait for a HD-AAC encoder :P

Changes Made to TAG.EXE
Reply #86
Hi Synthetic Soul,

First of all, thanks for keeping TAG alive and all the work you did on REACT2!

I can get Tag to create a playlist using the REACT2. (as per the wiki post).

My idea behind creating playlists is to create a "playlist" directory for each compression type in the parent directory of the specific compression type.

For example;
..\Music\MP3\Playlists\ > contains all mp3 playlists and
..\Music\MP3\ > contains all the album directories

These playlists should therefore reference ..\"Artist - Album [Year]"\"TrackNo. TrackName".mp3. That is if I understand playlists correctly.

The idea is to copy the entire directory (e.g. MP3, Ogg or Flac) to whatever player I'm using, so when I want to play anything I simply browse the playlist directory to find the appropriate (custom or album) playlist.

I tried to get this done with Tag but it does not seem to support directory references.

If this cannot be done in Tag, can you possibly recommend something else?

Thanks
Paul

  • noorotic
  • [*]
Changes Made to TAG.EXE
Reply #87
Synthetic Soul, I had not checked this thread in a long time.  If it is needed, I have the C code for importing and exporting binary (images) into APEv2 tags.    I am not sure I know the Tag code well enough to insert into it however.  Also, it would create a feature for APE not supplied by Tag for other tag types.

I personally do not care much for the embedding of artwork, for myself.  It seemed like a fun thing to do.  I have wondered why, since all tag formats provide for URL, and having followed the thread on artwork in the Foobar forum a bit, it would not be best simply to set the URL bit and allow people to point the player to the local file they want.  Seems much more efficient.

However since most of Tag is C (I haven't picked up C++ yet) I think my import/export functions should work if integrated into Tag's code.

I'll check back some time. thx

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #88
I tried to get this done with Tag but it does not seem to support directory references.

If this cannot be done in Tag, can you possibly recommend something else?
No, it doesn't look like it does.

I guess that you could just use ECHO commands in your config to append to a playlist, e.g.:

Code: [Select]
ECHO $cdartist$ - $album$ [$date$]\$track$ - $title$.mp3>>@OutRoot@\Music\MP3\Playlists\$cdartist$ - $album$.m3u

You may have to escape some characters though, otherwise ampersands (for example) will cause problems.  Certainly a possibility though.

Synthetic Soul, I had not checked this thread in a long time. If it is needed, I have the C code for importing and exporting binary (images) into APEv2 tags. I am not sure I know the Tag code well enough to insert into it however. Also, it would create a feature for APE not supplied by Tag for other tag types.
I would like to see support for embedding images in Tag; however, as you say, it would be wrong to add it for APEv2 only.  Also, I'm not sure that I would have the where-with-all (or inclination) to insert the code.  Thanks for the thought though. I must admit that I have lost an interest in doing anything else with Tag.
I'm on a horse.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #89
Off-topic posts regarding REACT moved to a new thread.
I'm on a horse.

  • Lurkas
  • [*]
Changes Made to TAG.EXE
Reply #90
TAG doesn't write ID3v2.3 tags. The source is out there, have anyone seen a build capable of writing those tags?

I wish someone could implement it..

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #91
Would metamp3 (search this board) be of any use?
I'm on a horse.

  • Lurkas
  • [*]
Changes Made to TAG.EXE
Reply #92
Thanks for the notification but I had a look at it last night. It doesn't look like it has the character replace function and tags from file name.

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #93
TAG doesn't write ID3v2.3 tags.

I'm using tag.exe with Lame and am getting ID3v2 tags with no trouble at all.
  • Last Edit: 07 August, 2008, 10:50:08 AM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

  • Lurkas
  • [*]
Changes Made to TAG.EXE
Reply #94
That sounds interesting. Can someone please explain how to do that?

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #95
Code: [Select]
tag %1 2> "%~1.tag"
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Title:" "%~1.tag"`) DO (
  SET title=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Artist:" "%~1.tag"`) DO (
  SET artist=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Album:" "%~1.tag"`) DO (
  SET album=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Year:" "%~1.tag"`) DO (
  SET year=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Track:" "%~1.tag"`) DO (
  SET track=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Genre:" "%~1.tag"`) DO (
  SET genre=%%Y
)
FOR /F "usebackq tokens=1*" %%X IN (`findstr "Comment:" "%~1.tag"`) DO (
  SET comment=%%Y
)
SET TAGINFO=--add-id3v2 --tt "%title%" --ta "%artist%" --tl "%album%" --ty "%year%" --tn "%track%" --tg "%genre%" --tc "%comment%"
DEL "%~1.tag"
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

  • Lurkas
  • [*]
Changes Made to TAG.EXE
Reply #96
Thank you for your reply greynol. I assume that's a batch script. I'm not really sure on how to use that. Can you please give a verbose example on how to use it in a commandline?

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #97
It's a subroutine to be used in a batch script, though you can use it as a separate script.  You call the routine and pass it the name and path of the source file.  It will then generate a variable called TAGINFO which you would use in your Lame command line.

Example assuming this is a separate script called id3v2tag.bat and a source file called c:\stuff\source.flac

id3v2tag c:\stuff\source.flac

let's assume you have created source.wav (though I don't do it this way)

lame -V5 %TAGINFO% c:\stuff\source.wav c:\stuff\source.mp3

EDIT: Here's an example of a similar routine put to use in a script to encode using neroAacEnc:
http://www.hydrogenaudio.org/forums/index....st&p=580029
  • Last Edit: 07 August, 2008, 01:26:27 PM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

  • Lurkas
  • [*]
Changes Made to TAG.EXE
Reply #98
Can I get this to work with wildcards, and what syntax to use if so?

Is it possible to just tag an encoded file with lame.exe? I've only pulled it off while encoding..

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Changes Made to TAG.EXE
Reply #99
>Can I get this to work with wildcards, and what syntax to use if so?
You can't pass a wildcard to the script as it currently exists.

>Is it possible to just tag an encoded file with lame.exe?
No.

Please, no more questions about batch scripts.  Let's keep this discussion on topic.  Synthetic Soul has had to split this thread once already.
  • Last Edit: 11 August, 2008, 03:46:42 PM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.