Author |
Message |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Sun 24 Jul 2011, 13:07 Post subject:
|
|
updated to 0.1.6, added sc0ttman's contributions with a little tweak.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Sun 24 Jul 2011, 20:43 Post subject:
|
|
0.2 is up. Added support for flac via metaflac. The extra "Field" & "Tag" spaces are for you to put in your own fields that aren't in the gui. If a flac file is already tagged with extra fields not defined in the gui they will be displayed in those extra fields (the first 14 anyway).
Still plan on ogg vorbis & ape support next. Possibly some others as well. I won't be around much for the next week so this will probably be the last update for at least a week. Possibly a quick bug fix tomorrow if anyone finds a bug but otherwise no more updates.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Sun 31 Jul 2011, 22:27 Post subject:
|
|
0.3 is up. This version adds support for ogg. Next I'll work on ape & musepack support via apetag.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 01 Aug 2011, 09:56 Post subject:
|
|
0.4 is up. Added support for Monkey's Audio (ape) & Musepack (mpc & mpp) via apetag.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 01 Aug 2011, 11:09 Post subject:
|
|
0.4.1 bugfix is up. I had the code messed up in /usr/local/ptag/ptag-files
I'm working on adding true type audio next.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 01 Aug 2011, 15:32 Post subject:
|
|
0.5 is up.
support for True Type Audio (tta) format via the same tools as mp3.
support for Shorten (shn), Optimfrom (ofr & ofs), & Wavpack (wv) via apetag.
Next step is adding support for replay gain.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 01 Aug 2011, 23:26 Post subject:
|
|
updated to 0.6
added support for replay gain via:
metaflac
wvgain
mp3gain
vorbisgain
aacgain
mpcgain
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Thu 04 Aug 2011, 00:08 Post subject:
|
|
updated to 0.7.
Support for adding artwork to ogg files. Neither vorbiscomment nor oggz-comment will directly add artwork, you need to convert the picture to base64 first. After searching google and thru quite a bit of trial and error, I was able to get it working. Easytag creates 3 fields when adding artwork to an ogg file:
COVERARTDESCRIPTION : the name of the jpg/png file
COVERARTMIME : the mime type of the image file
COVERART : the base64 encoded data of the image file
After reading up on this at:
http://wiki.xiph.org/VorbisComment#Unofficial_COVERART_field_.28deprecated.29
I found that the COVERART field is deprecated and METADATA_BLOCK_PICTURE is to be used instead. Ptag will convert an existing COVERART field to METADATA_BLOCK_PICTURE. The only down side is that if you use Easytag afterwards you won't see the attached image. I also wrote a script and named it <oggart> that will add artwork to an ogg file and allow you to use the old COVERART for Easytag compatibility or use the new way (default).
Code: | # oggart /path/to/file.ogg /path/to/jpg-or-png |
for Easytag compatibility:
Code: | # oggart /path/to/file.ogg /path/to/jpg-or-png -e |
the script:
Code: | #!/bin/sh
FILE1="`basename \"$1\"`"
EXT1=${FILE1##*.}
EXTTYPE1=`echo $EXT1 | tr '[:upper:]' '[:lower:]'`
FILE2="`basename \"$2\"`"
EXT2=${FILE2##*.}
EXTTYPE2=`echo $EXT2 | tr '[:upper:]' '[:lower:]'`
OGG=""
if [ "$EXTTYPE1" = ogg ]; then
OGG="$1"
elif [ "$EXTTYPE2" = ogg ]; then
OGG="$2"
fi
if [ "$OGG" = "" ]; then
echo no ogg file selected
exit 0
fi
PIC=""
array=(jpeg jpg png)
for item in ${array[*]}
do
if [ "$item" = "$EXTTYPE1" ]; then
PIC="$1"
elif [ "$item" = "$EXTTYPE2" ]; then
PIC="$2"
fi
done
if [ "$PIC" = "" ]; then
echo no jpg or png file selected
exit 0
fi
if [ "$3" = -e ]; then
EASYTAG=Y
else
EASYTAG=N
fi
DESC=`basename "$PIC"`
APIC=`base64 --wrap=0 "$PIC"`
if [ "`which exiv2`" != "" ]; then
MIME=`exiv2 "$PIC" | grep 'MIME type ' | sed 's/: /|/' | cut -f 2 -d '|' | tail -n 1`
fi
if [ "$MIME" = "" ]; then
MIME="image/jpeg"
fi
vorbiscomment -l "$OGG" | grep -v '^COVERART=' | grep -v '^COVERARTDESCRIPTION=' | grep -v '^COVERARTMIME=' | grep -v 'METADATA_BLOCK_PICTURE=' > "$OGG".tags
if [ "$EASYTAG" = N ]; then
echo METADATA_BLOCK_PICTURE="$APIC" > "$OGG".tags2
else
echo COVERART="$APIC" > "$OGG".tags2
fi
vorbiscomment -w -R -c "$OGG".tags2 "$OGG"
vorbiscomment -a -R -t COVERARTDESCRIPTION="$DESC" "$OGG"
vorbiscomment -a -R -t COVERARTMIME="$MIME" "$OGG"
vorbiscomment -a -R -c "$OGG".tags "$OGG"
rm -f "$OGG".tags
rm -f "$OGG".tags2 |
ptag does not call this script but I thought it may be useful to someone.
Description |
|

Download |
Filename |
oggart.tar.gz |
Filesize |
685 Bytes |
Downloaded |
682 Time(s) |
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Sat 06 Aug 2011, 23:31 Post subject:
|
|
updated to 0.8.
|
Back to top
|
|
 |
str4y

Joined: 01 Aug 2011 Posts: 42 Location: No. California
|
Posted: Mon 08 Aug 2011, 20:03 Post subject:
Subject description: thanks for this |
|
Just wanted to thank ye for all the .pet work in the lossless audio space.. and CLI no less, which is where I prefer to operate. Buried in the flow, you might've not seen my little script shn2flac which I posted in the Lucid526 thread:
http://murga-linux.com/puppy/viewtopic.php?p=549705#549705
.. terribly simplistic but didn't know of any such script out there, and I have occasion to make the conversion often.
Going forward, I'd be interested to see how you could fare going about linking all the metadata tagging into & out of .k3b files.. the only way I burn on Linux! Also, you might strive for an equivalent or better of TLH... very common across the net amongst window$ types who are trading lossless.. stands for Traders' Little Helper and combines various functions.
_________________ laptop.pet: http://www.murga-linux.com/puppy/viewtopic.php?p=550279
K3B-1.0.5 self-contained .pet http://www.murga-linux.com/puppy/viewtopic.php?t=71862
bitcoin: http://xmail.net/str4y/bitcoin/
Last edited by str4y on Wed 14 Sep 2011, 20:01; edited 1 time in total
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 08 Aug 2011, 20:07 Post subject:
|
|
What do the .k3b files consist of? I haven't used K3B in years. I do have a Windows partition that I ever so rarely boot in to, I'll have to check out Trader's Little Helper. I have yet to use it but know of quite a few people who do.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Mon 08 Aug 2011, 22:39 Post subject:
|
|
updated to 0.8.1
just a couple of minor bug fixes and another command line option.
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 12819 Location: Arizona USA
|
Posted: Mon 08 Aug 2011, 23:40 Post subject:
|
|
Plinej, thanks for all the work you're doing with Ptag.
I tried Ptag several versions ago but couldn't find the time to write this until now.
I needed to add the file number, author and book name to the tag of every mp3 file of an audio book, so I could see what book I was listening to in my mp3 player. Ptag did this exactly as advertised, but required me to click the Enter key for every file. The average audio book has probably 200 mp3 files, so it takes 200 clicks of the Enter key to edit the tags of every file in the book. Is there a way, that I missed, to have Ptag automatically change all the files in a directory? Sort of a batch tag edit? Just show it file number 001 - 200 or whatever, tell it what to put in the tag fields, click go and it would go until it had done all 200 (or whatever) files in the directory.
Some books by Brilliance audio have over 900 files because Brilliance puts 99 tracks on each CD (the legal limit,) but all other audio books have a more reasonable 20 tracks per CD, so audio books with more than 400 files are rare.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Tue 09 Aug 2011, 07:01 Post subject:
|
|
@ Flash, I never thought about that but I think I could implement something rather easily.
|
Back to top
|
|
 |
plinej
Joined: 13 Aug 2006 Posts: 1554
|
Posted: Tue 09 Aug 2011, 21:29 Post subject:
|
|
Flash, I don't think I want to add that capability to the gui but I made a simple script that will do what you're requesting using ptag's cli options. First of all, you need to open the first audio file in ptag and tag the file with whatever you'd like. Then open the file again and click the "dump" button which will create a .ptag file in the same directory, or from the cli you can type: <ptag NAMEOFAUDIOFILE -ptag>. For the next step you'll need to extract the attached script and put it in your $PATH. Go to the command line, cd into the directory your ptag and audio files are, and type:
Code: | tagdir NAMEOFPTAGFILE.ptag |
Of course NAMEOFPTAGFILE needs to be the actual name of the file. This will tag all the same type of audio files with the fields in the ptag file.
Tracknumber field will be increased by one for each file.
You need to have at least version 0.8.1 of ptag for this script to work.
Description |
|

Download |
Filename |
tagdir.tar.gz |
Filesize |
525 Bytes |
Downloaded |
332 Time(s) |
|
Back to top
|
|
 |
|