@DATABASE mp3info.guide @WIDTH 80 @AUTHOR{Michael Cheng} @NODE MAIN "mp3info.guide" mp3info v0.25 Dodgy docs written by @{" Michael Cheng " link "Author"} @{" Introduction " link "Introduction"} @{" Requirements " link "Requirements"} @{" Usage " link "Usage"} @{" Problems " link "Problems"} @{" Future " link "Future"} @{" Acknowledgements " link "Acknowledgements"} @{" Author " link "Author"} @{" Appendix " link "Appendix"} @ENDNODE @NODE "Introduction" "Introduction" Another utility that's been floating around my hard drive for a while, waiting for me to find some motivation. This reads and writes mp3 TAG info, which is a way of storing information about the mp3 inside the mp3 itself eg title, author and date can be set in the TAG info. @ENDNODE @NODE "Requirements" "Requirements" REQUIREMENTS - An Amiga @ENDNODE @NODE "Usage" "Usage" USAGE Read the @{"README" link "README"} and see the @{"man page" link "man page"}. @ENDNODE @NODE "README" "README" ********************** mp3Info ********************** A small utility to read and write TAG info, as well as retrieve the MP3 Header info and print it all out in a nice format. Features: - Get, Set and Wipe MP3 TAG Info. - Get MPEG Audio Version 1, 2 and 2.5 (All Layers) Header info. - Userdefinable output formatting (rather advanced). - Can rename files according to userdefined scheme. - Can now also PLAY MP3s in a correct manner (Linux only). Author is Thorvald Natvig , if you in any way think this is a nice program, send me an email saying "Hi". Feedback is nice. Only tested on Linux/x86, but should theoretically work on anything. I'm interrested in having it compilable on other machines, so mail me any problems you may have. INSTALLATION INSTRUCTIONS: Just run the file 'INSTALL' to install it, should theoretically work just fine. Someday I'll learn how to do autoconfig and then it will be even finer. If you change any of the source, please, Please send me a patch or the new source so I can include it. Also send me a email if you use this utility :) genre.h is autogenerated from list.txt, whcih can be found on the homepage of Studio3 by NamkraD/DC. If mkgenre doesn't work, copy genre.h.dist to genre.h and it should work. NEW VERSIONS: New versions will be available on ftp://bimbo.hive.no/pub/mp3info/ and if that should fail on my webpage, http://mix.hive.no/~xeno/ MP3 PLAYING: There are two methods of playing: One is to use l3dec (From Fraunhofer (http://www.iis.fhg.de/departs/amm/layer3/)) Just put it anywhere in your path. The piper and audioplaying is done by the program itself, at optimium speed :) The other is to use splay(preferred, but much larger executable) Get it from ftp://sunsite.unc.edu/pub/Linux/apps/sound/splay-0.1.tar.gz This is the default method, as indicated in the Makefile. ***************************** Output formatting magic The output from the program can be 100% userdefines. There are two uses, one is -f to set the output format, and the other is -N to set a naming scheme. -N will RENAME the files specified according to the format. The format is built up as a string, with the following special characters: %% = % %I = IF (explained below) %! = Not-IF (also explained below) %t = title of song %a = Artist %l = album %y = year %c = comment %g = genre (text) %# = genre (number) %v = MPEG Version (1/2) %L = Layer version (I, II, III) %C = Error_Protection (0/1) %b = Bitrate (in kbit/s) %F = Sampling frequency %M = mode %O = Copyright (0/1) %o = Original (0/1) %m = length (minutes) %s = length (remainding seconds.. Ie 3m 2s is "%mm %ss") %S = length (ALL in seconds). %N = Newline %f = Filename (as specified on command line) %i = Size of file (in bytes) If cases: If-cases are %I.. %IT If TAG info present %IH If HEADER info present %Ia If Artist info present %It If Title of song present %Il If album name present %Iy If year present %Ic If comment present %IC If CRC. %IO If Copyrighted. %Io If Original %IS If Stereo %IE End-IF. %! and the same characters means If NOT. So %!T means IF NOT TAG. %!E is ELSE. Example.. %IT Tag info present%IE %IHHeader info present %ICwith CRC%IE%IE should explain it. As seen, if's can be nested. There is a length limit on the formatting string and the output which can be set in mp3tools.h Hint: Bash etc often has ! as a special char, meaning you can't use it on the command line, you have to have it in a bash-script of sorts. Naming: I use the following naming scheme : mp3info -N "%IH%It%t.mp3%IE%IE" Which calls the tune Rhythm is a dancer.mp3 Which names the files as .mp3, which is how I like it. As an alternative, you can use: mp3info -N "%IH%It%Ia(%a)-%IE%t.mp3%IE%IE" Which would produce (Snap)-Rhythm is a dancer.mp3 as a name. ------- CREDITS ------- I got the info about the MPEG Headers from free software available to decode MPEG2 streams. ID3 format by NamkraD/DC (erick@marble.net) http://www.marble.net/~erick/mpeg3.htm @ENDNODE @NODE "man page" "man page" mp3info(1) mp3info(1) NAME mp3info - MP3 Information tool SYNOPSIS mp3info [ -option < value > ] filename[s]... DESCRIPTION This is a small tool to get and set MP3 information. OPTIONS -T Do NOT get TAG Info. Use on slowseeking media, since TAG is at the very end of the file. -s <0/1> Print info. Pretty much obsolete, as it always should be on. Defaults 1. -f Format of printed string. See README for details. -w Write TAG Info. Will write a TAG at the end of the file. -W Wipe TAG Info. Will wipe clean TAG Info. Overrides all other TAG Options, and turns -s off. To both wipe tag and display info, use -W -s 1 -n Set song title. Implies -w. Will go away soon, use -t instead. -t Set song title. Alias for -n. Implies -w. -a Set name of artist. Implies -w. -l Set album name. Implies -w. -y Sets published year. Implies -w. -c Sets comment. Implies -w. -g Set genre number. Implies -w. -p Prints all the genres. -N Rename files according to format. Same format as -f. If this format expands to nothing, no rename 2nd March 1997 1 mp3info(1) mp3info(1) will be done. -P Plays file(s). Beta, and Linux only. RETURNS 0 All Ok 1 Error opening file. 2 No SYNC Found. 3 Error writing TAG. (Disk full, maybe?) 4 Error wiping TAG. (Shouldn't happen) 5 Error renaming file. BUGS Well, there are no known bugs, but if a list of files is specified, and handling one of them produces an error, the program goes on, and returns the LAST error produced. CREDITS ID3 format by NamkraD/DC (erick@marble.net) AUTHOR Thorvald Natvig xeno@mix.hive.no 2nd March 1997 2 @ENDNODE @NODE "Problems" "Problems" PROBLEMS None that i've found. @ENDNODE @NODE "Future" "Future" FUTURE - Dunno. @ENDNODE @NODE "Acknowledgements" "Acknowledgements" THANKS - Stéphane TAVENARD (tavenard@xiii.univ-angers.fr)for mpega, the best amiga mpeg audio player. @ENDNODE @NODE "Author" "Author" Thorvald Natvig xeno@mix.hive.no Amiga Compile by mike cheng Cstar on #amiga mikecheng@cryogen.com http://www.netforward.com/cryogen/?mikecheng http://mikecheng.dyn.ml.org/ @ENDNODE @NODE "Appendix" "Appendix" @ENDNODE