Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 02:50
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Ptag 0.9.3 (2012-09-24)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Author Message
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 24 Jul 2011, 13:07    Post_subject:  

updated to 0.1.6, added sc0ttman's contributions with a little tweak.
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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.
oggart.tar.gz
Description 
gz

 Download 
Filename  oggart.tar.gz 
Filesize  685 Bytes 
Downloaded  434 Time(s) 
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sat 06 Aug 2011, 23:31    Post_subject:  

updated to 0.8.
Back to top
View user's profile Send_private_message 
str4y


Joined: 01 Aug 2011
Posts: 43
Location: No. California

PostPosted: Mon 08 Aug 2011, 20:03    Post_subject:
Sub_title: 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
Embarassed bitcoin: http://xmail.net/str4y/bitcoin/


Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11118
Location: Arizona USA

PostPosted: Mon 08 Aug 2011, 23:40    Post_subject:  

Plinej, thanks for all the work you're doing with Ptag. Smile
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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: 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.
tagdir.tar.gz
Description 
gz

 Download 
Filename  tagdir.tar.gz 
Filesize  525 Bytes 
Downloaded  222 Time(s) 
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0829s ][ Queries: 13 (0.0054s) ][ GZIP on ]