Page 1 of 1

keeptags-0.9

Posted: Fri 19 Aug 2011, 00:57
by plinej
Use these scripts with ptag:
http://www.murga-linux.com/puppy/viewtopic.php?t=69948

These scripts will convert between the following formats and retain the tag information:

m4a lossless (alac), requires alac to decode:
http://www.murga-linux.com/puppy/viewtopic.php?t=70803
and ffmpeg 0.6 or greater to encode.

m4a lossy (aac), requires faac to encode:
http://www.murga-linux.com/puppy/viewtopic.php?t=70802
and faad to decode.

ape, requires mac:
http://www.murga-linux.com/puppy/viewtopic.php?t=70839

mpc, requires musepack:
http://www.murga-linux.com/puppy/viewtopic.php?t=70416

ofr (lossless) & ofs (lossy), requires optimfrog:
http://www.murga-linux.com/puppy/viewtopic.php?t=70429

shn, requires shorten:
http://www.murga-linux.com/puppy/viewto ... 41&t=26698

tta, requires tta:
http://www.murga-linux.com/puppy/viewtopic.php?t=70420

wv, requires wavpack:
http://www.murga-linux.com/puppy/viewtopic.php?t=70426

ogg, requires oggdec & oggenc.
mp3, requires lame.
flac, requires flac.

I will probably add support for ffmpeg to encode/decode some of these formats instead of using the dedicated programs. The issues with ffmpeg seem to be some formats don't decode to an exact bit for bit copy of the original wav file and you probably don't want that for lossless audio. Also, ffmpeg does not handle all of these formats and some of the others it only decodes. It seems that ffmpeg will easily accept a stdin pipe but some programs seem to choke on ffmpeg's stdout. I was trying to avoid the extra step of decoding to wav then encoding to the new format but that may be the best solution for implementing decoding with ffmpeg. Currently the only conversion that requires decoding to wav first is encoding to ape since mac's stdin pipe seems to be broken on the linux ported version (hasn't been updated in years).

This package includes 2 scripts, keeptags & keeptagsdir.

To use keeptags, the first parameter is what file type you would like to convert to and the second is the filename:

<keeptags mp3 01-audio_file.flac>

The above example would convert the flac file to mp3 with the default settings. The config file will be copied to $HOME/.config/keeptags.conf after the first run of keeptags. You can edit the config file to put your desired settings for the various encoders instead of my chosen defaults. For example, the default lame settings in the config file are: <-b 192 -q 2 -mj>. You could also change the settings right on the command line incase you want different settings then the defaults like this:

<keeptags mp3 01-audio_file.flac -b 160 -q 2 -mj>

The above example would use the command line settings for lame instead of the settings in the config file.

keeptagsdir will convert the whole directory to the desired format.

<keeptagsdir flac2mp3>

The above example would convert all of the flac files in the current directory to mp3.

<keeptagsdir flac2mp3 -b 160 -q 2 -mj>

The above example would do the same but use the lame settings on the command line instead of from the config file.

Since m4a can be lossy aac files or lossless alac files (ffmpeg will figure out which type your file to convert is) we need to tell keeptags which type you want to convert to. For lossy use <m4a> for lossless use <alac>.

0.2 - added a gtkdialog gui and "Open With" options in rox (files and directories). I also added the ability to convert from and to wav format (without meta tag information of course).

Posted: Wed 07 Sep 2011, 02:25
by plinej
updated to 0.2

Posted: Thu 22 Sep 2011, 01:27
by plinej
posted 0.2.1 - small bugfix

Posted: Wed 16 Jan 2013, 03:46
by plinej
0.2.2 uploaded - another bugfix

Posted: Sat 12 Oct 2019, 17:22
by plinej
Just uploaded my latest version. I updated the scripts over the years but never posted anything.