PACPL(1)

NAME
Perl Audio Converter

SYNOPSIS
pacpl --<formattoformat> <--file/--dir> <file(s)/dir(s)>

pacpl --convertto <format> <--file/--dir> <file(s)/dir(s)>

DESCRIPTION
 Perl  Audio  Converter is  a  tool  for  converting  multiple  audio
 types  from  one  format to another. It supports MP2, MP3, Ogg Vorbis,
 FLAC,  Shorten,  Monkey  Audio,  FAAC  (AAC/M4A/MP4),  Musepack (MPC),
 Wavpack  (WV), OptimFrog (OFR/OFS), TTA, LPAC, Kexis (KXS), AIFF, AC3,
 Lossless Audio (LA), BONK, AU, SND, RAW, VOC, SMP, RealAudio (RA/RAM),
 WAV,  and  WMA.  It  can  also  convert audio from the following video
 formats/extensions:  RM, RV, ASF, DivX, MPG, MKV, MPEG, AVI, MOV, OGM,
 QT, FLV,  VCD, VOB, and  WMV. A CD ripping function with CDDB support,
 batch and playlist  conversion, tag  preservation for most  supported
 formats,  independent  tag  reading/writing,  and   extensions  for
 Konqueror and amaroK are also provided.

ENCODING OPTIONS
When transcoding a file, you can use one of two options:

--formattoformat (Audio Only)

Example: --mp3toaiff --file=File.mp3
         --oggtoflac --playlist=oggplaylist
         --mpctoape --dir=/home/shared/mpcs

The --formattoformat options will convert from the selected input format to the selected output format. WMA/RAM (output), and Video (input/output) are the only exceptions.

-ct format, --convertto format (Audio/Video)

The --convertto option can batch convert from any supported source format (Audio & Video) to any supported output format (Audio).

Example: pacpl --convertto mp3 --file=Song.ape --file=Movie.avi
         pacpl --convertto ogg --playlist myplaylist
         pacpl --convertto kxs --dir=/home/shared/oggs

However, You can NOT convert TO WMA or any of the supported Video codecs. Although converting from these formats is prefectly acceptable. Below is a complete list of supported encode/decode formats:

Supported Encode Formats:

                 mp2,  mp3, ogg, flac, fla, ape, shn, aac,  m4a, mp4,
                 mpc,  mpp, wv,  ofr,  ofs, tta, pac, lpac, kxs,
                 aiff, au,  snd, raw,  voc, smp, ac3, la,   bonk,
                 wav,  ra

Supported Decode Formats:

                 mp2,  mp3, ogg, flac, fla, ape, shn, aac,  m4a, mp4,
                 mpc,  mpp, wv,  ofr,  ofs, tta, pac, lpac, kxs,
                 aiff, au,  snd, raw,  voc, smp, ac3, la,   bonk,
                 wma,  wav, ra,  ram

OTHER OPTIONS
-h, --help
 General usage

-l, --longhelp
 Complete option list

-g, --taghelp
 Tag reading/writing help menu

-r, --riphelp
 CD ripping help menu

-vh, --videohelp
 Video option help menu

-v, --version
 Version information

-c n, --flevel=n
 Set compression level when encoding FLAC files
 Default: 8
 1-8 (0 = fastest & 8 = highest )

-b n, --bitrate=n
 Average Bitrate

 voice         = 56kbps/mono
 fm/radio/tape = 112kbps
 mp3           = 128kbps (default)
 hifi          = 160kbps
 cd            = 192kbps
 studio        = 256kbps

-ar n, --arate=n
 Audio sampling rate

-ac n, --channels=n
 Number of audio channels

-z n, --alevel=n
 Ape compression level
 Compress (fast): '--alevel=1000'
 Compress (normal): '--alevel=2000'
 Compress (high): '--alevel=3000'
 Compress (extra high): '--alevel=4000'
 Compress (insane): '--alevel=5000'

-i n, --slevel=n
 Shorten (SHN) format version number
 (2: no seek info; 3: default)

-x s, --xlevel=s
 Musepack (MPC) compression level
 thumb low quality/internet, (typ. 58... 86 kbps)
 radio medium (MP3) quality, (typ. 112...152 kbps)
 standard high quality (dflt), (typ. 142...184 kbps)
 xtreme extreme high quality, (typ. 168...212 kbps)
 insane extreme high quality, (typ. 232...268 kbps)
 braindead extreme high quality, (typ. 232...278 kbps)

-e n, --plevel=n
 LPAC (PAC) predefined compression level
 1 = Fast, 2 = Simple, 3 = Medium (default), 4 = High, 5 = Extra High

-q n, --quality=n
 Sets encoding quality to n, between -1 (low) and 10
 (high). This is the default mode of operation, with
 a default quality level of 3. Fractional quality
 levels such as 2.5 are permitted. Normal quality
 range is 0 - 10.

-m s, --mode=s
 OptimFrog (OFR/OFS) Compression mode
 (fast,normal,high,extra,best,highnew,extranew,bestnew)

 specify the compression mode to be used. The default value is normal.
 For general use, I recommend the normal, extra, and extranew modes

-op s, --optimize=s
 OptimFrog (OFR/OFS) Compression level
 (none,fast,normal,high,best)

 specify the optimization level in the engine. In order to achieve
 optimal compression at all sample types, sample rates, and audio
 content, the core compression engine has the possibility to find the
 optimal values for its parameters, at the cost of slightly increased
 compression time only. The default recommended value is fast.
 Do not use normal (or even high or best) for this parameter unless
 encoding time does not matter and you want to obtain the smallest
 possible file for a given compression mode. The difference between
 the optimize levels fast and best (which is up to three times slower
 than fast) is very small, generally under 0.05%, but may be also
 larger in some rare cases. Note that the none optimize level is
 forced by the encoder to fast optimize level for the extra, best,
 highnew, extranew, and bestnew modes

-ql n, --qlevel=n
 BONK quantization level (default 1.00)

-dr n, --dratio=n
 BONK downsample ratio (default 2)

-ps n, --psize=n
 BONK predictor size (default 128, use 10 for speech)

-ll, --lossless
 Use BONK lossless encoding

-u s, --uopts=s
 User supplied encoder options

 Since implementing every single option from every *encoder/decoder
 isn't quite feasible, --uopts was added to allow for greater
 flexibility for the more advanced users.

 Example: pacpl --mp3tomp4 --file=My_File.mp3 --uopts="-c 44100 -I 1,2"
          pacpl --convertto flac --file=File.wav --uopts="--replay-gain"

 *uopts applys the added options to the encoder only.

-ro s, --rawopts=s
 User supplied SoX encoder options for raw input

 When converting from RAW input a few options must be specified such as
 rate, channels, size, data size, etc.  See 'man sox' for a list of
 options.  PAC's current configuration is as follows:

 sox -r $rate -c $channels $rawopts <input.raw> $uopts <outfile>
 or
 sox -r 44100 -c 2 -w -s <input.raw> (other options) <outfile>

 $rawopts defaults to '-w -s' (-w = 16 bit words / -s = signed linear)

-so s, --soxopts=s

 SoX encoder options (AIFF/AU/SND/VOC/SMP)

 This option will allow you to specify special SoX options when
 transcoding to the above formats.

 sox -so "-c 2 -s" <input.aiff> -uo "-c 1 -r 22500" <output.voc>

-ef s, --effect=s

 SoX effects (see 'man sox')

-py s, --play=s
 Play file. Supported formats are:
 MP3, Ogg Vorbis, FLAC, FAAC (MP4), Musepack (MPC) WMA, WAV, RealAudio (RA)

-pl s, --playlist=s
 Convert files in playlist. Supported formats are (XMMS & PATH/FILE)

 Playlists should be in the following format

 /path/to/Song.ogg
 /path/to/Song2.ogg

 Or a real example (playlist contains the following):

 /home/shared/oggs/Dance/Technotronic - Move This.ogg

 XMMS playlist.m3u format is also supported

 pacpl --oggtomp3  --playlist myplaylist
 pacpl --flactotta --playlist xmms.m3u

 Creating a playlist is simple using the find command.

 find /path/to/audio_files/ -name *.audiotype > playlist
 find /home/shared/oggs/ -name *.ogg > ogglist

--delete
 Remove source file after encoding.

 Example:
 pacpl --mp3toogg --dir=/home/mp3s/Rock --delete

 After encoding the mp3s to ogg, all the mp3s in that
 directory would be deleted.  This works with all type
 to type options.  Note: if you accidently start
 encoding a directory and abort the process with ^C
 (control-c) it will stop the current process and move
 on to the next file, leaving you with a partially encoded
 audio file and no original file.  To end this madness you
 would need to 'killall -9 pacpl' or 'kill -9 <pacpl pid>'
 So I warn...

USE WITH CARE

-f file, --file=file
 Can be used multiple times to encode one or
 more files with any of the above encoding
 options as shown below.

 pacpl --mp3tompc -f file.mp3
 pacpl --mp3toogg -f file1.mp3 -f file2.mp3 -f file3.mp3
 pacpl --convertto flac *.mp3

-d dir, --dir=dir
 Can be used multiple times to encode one or
 more directories with any of the above encoding
 options as shown below.

 pacpl --mp3tompc -d dir/
 pacpl --mp3toogg -d dir_one/ -d dir_two/ -d dir_three/

-o dir, --outdir=dir
 Output directory to place the encoded files.

-p file, --outfile=file
 Write file to <file> (does not apply when encoding multiple files)

-re, --recursive
 Recursively scan and convert directory specified by --dir

-pd, --presdir
 Preserve directory structure when recursively converting a directory
 using --dir <dir> --recursive

 Example:

 pacpl --mp3toogg --dir MP3s/ --outdir Oggs/ --recursive --presdir

 pacpl -ct flac --recursive --presdir --dir Wavs/ --outdir Flacs/

-ov, --overwrite
 Overwrite existing destination file

--daemon

 Daemon Mode:

 This function allows you to monitor directories specified in pacpl.conf.
 Once a file is placed in one of the monitored directories, it will be
 converted to your specified collection type.

Ripping Options
--cdtomp3,
  CD to MP3

--cdtoogg,
  CD to Ogg Vorbis

--cdtoflac,
  CD to FLAC

--cdtofla,
  CD to FLAC (FLA)

--cdtoape,
  CD to Monkey Audio (APE)

--cdtoshn,
  CD to Shorten (SHN)

--cdtoaac,
  CD to FAAC (AAC)

--cdtom4a,
  CD to FAAC (M4A)

--cdtomp4,
  CD to FAAC (MP4)

--cdtompc,
  CD to Musepack (MPC)

--cdtompp,
  CD to Musepack (MPP)

--cdtowv,
  CD to Wavpack (WV)

--cdtoofr,
  CD to OptimFrog (OFR)

--cdtoofs,
  CD to OptimFrog (OFS)

--cdtotta,
  CD to TTA

--cdtopac,
  CD to LPAC

--cdtokxs,
  CD to Kexis (KXS)

--cdtoaiff,
  CD to AIFF

--cdtoau,
  CD to AU

--cdtosnd,
  CD to SND

--cdtoraw,
  CD to RAW

--cdtovoc,
  CD to VOC

--cdtosmp,
  CD to SMP

--cdtomp2,
  CD to MP2

--cdtoac3,
  CD to AC3

--cdtola,
  CD to Lossless Audio (LA)

--cdtobonk,
  CD to BONK

--cdtowav,
  CD to WAV

--cdtora,
  CD to RealAudio (RA)

-t n, --track
  Track(s) to be ripped ('-t 1,4,7,10')

-a, --all
  Encode all tracks

--nocddb
  Disable CDDB

--noinput
  Disable CDDB user input

--cdinfo
  CD CDDB information

All encoder options such as bitrate, quality, etc., can be utilized when converting CD audio.

Example (Ripping Options)
  pacpl --cdtomp3 --track=1,13 (Encode tracks 1 and 13 to MP3)

  pacpl --cdtoflac --all (Encode entire CD to FLAC)

Tag Reading/Writing
Supported formats: (mp3, flac, fla, ogg, *mp4, *mpc, *mpp, *wv, *wma)

Tag Options:

--tag key=value
    Add tag key=value for file

--showtag=key/all
    Show specific tag or all for file

  valid keys: artist, title, genre, album, year, track, comment

  Usage: pacpl <tag option> <file>
         pacpl --tag Artist=\"SomeArtist\" \"SomeArtist - Song.mp3\"
         pacpl --showtag artist \"SomeArtist - Song.ogg\"

 *read only format

LICENSING
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AUTHOR
   Philip Lyons (viiron@gmail.com) (C) 2005-2006