PACPL for audio transcoding
Installing PACPL in Ubuntu
PACPL is a Perl based script for converting audio files in Linux (http://pacpl.sourceforge.net//). It is extremely powerful and is capable of encoding/decoding a large array of formats (aac, ac3, avi, divx, flac, m4a, mp3, mp4, mpeg, ogg, raw, shn, vcd, vob, wav, wma, wmv and many more). Installing the program itself is fairly easy but it does require a number of dependencies – this is what causes most people problems. This tutorial will show how to install PACPL, the dependencies, codecs, how to use PACPL from the command line and how to integrate it into Amarok and Konqueror.
To start, make sure that you have all the repositories and codecs installed.
1.0 Install the Medibuntu repository
Open a terminal (Alt + f2) and type or copy/paste the following command for your Ubuntu-release
(if you use a older release please go to Medibuntu Repository Howto)
Ubuntu 8.04 "Hardy Heron":
Code:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list --output-document=/etc/apt/sources.list.d/medibuntu.list
Ubuntu 8.10 "Intrepid Ibex":
Code:
sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
Ubuntu 9.04 "Jaunty Jackalope":
Code:
sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
Then, add the GPG Key:
Code:
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
You may be asked to accept this package even though it cannot be authenticated. This is normal; typing "Yes" means you trust Medibuntu.
1.2 Install Ubuntu Restricted Extras and build-essential
Note that there is also xubuntu-restricted-extras (for Xubuntu) and kubuntu-restricted-extras (for Kubuntu.)
Code:
sudo apt-get install ubuntu-restricted-extras build-essential
** Note: PACPL does have a very simple GUI that can be used in gnome or kde. It requires you have Kommander installed so if you want to use the simple GUI then install Kommander prior to installing PACPL. Kommander is a kde package, so if you are in Gnome installing Kommander will also install a full kde desktop. If you don't want that, then do not install Kommander and either use PACPL with Amarok or from the command line.
1.3 Now you are ready to install PACPL
Download PACPL sources
Code:
wget http://dfn.dl.sourceforge.net/sourceforge/pacpl/pacpl-4.0.4.tar.bz2
Unpack it:
Code:
tar xvf pacpl-4.0.4.tar.bz2
Change the working directory to the source directory:
Code:
cd pacpl-4.0.4/extra
Next run the script that will install all the dependencies.
Code:
./mod-install-kubuntu.sh
Once that is finished change directories again to /pacpl-4.0.4:
Compiling it: This generates the necessary files, and checks your system:
Then compile:
Install it:
That's it.
Now you have a few options, 1. start using pacpl from the command line, or 2. if you are using kde, you can run pacpl via a GUI or integrated into Amarok, Konqueror, Dolphin or d3lphin. For all other desktop systems (gnome, xfce etc) the only option is to run pacpl from the command line.
1.4 Using the Kommander GUI:
To use the simple GUI that comes in the pacpl package, you first install Kommander from Synaptic (see note above).
Launch the gui using this command in a terminal.
1.5 To integrate pacpl into Amarok:
Create the directory /usr/share/apps/amarok/scripts/pacx/
Code:
mkdir /usr/share/apps/amarok/scripts/pacx/
Move the script pacx from /pacpl4.0.4/plugins/amarok/pacx to /usr/share/apps/amarok/scripts/pacx/
Code:
cp pacpl4.0.4/plugins/amarok/pacx /usr/share/apps/amarok/scripts/pacx/
Now when you have a file loaded into Amarok simply right click and the option to convert with pacpl should be available.
1.6 To integrate into Konqueror/d3lphin/dolphin:
pacpl.desktop (~/pacpl-4.0.4/plugins/konqueror) can be placed in either /usr/share/apps/konqueror/servicemenus or in your home directory (~/.kde/share/apps/konqueror/servicemenus).
Code:
cp pacpl-4.0.4/plugins/konqueror/pacpl.desktop /usr/share/apps/konqueror/servicemenus
Code:
cp pacpl-4.0.4/plugins/konqueror/pacpl.desktop .kde/share/apps/konqueror/servicemenus
pacpl.desktop can be used for d3lphin or dolphin the same as konqueror by using the same directory as above. Just replace the blue marked konqueror with d3lphin/dolphin...the rest is the same.
2.0 How to use pacpl in command line:
This command will display the list of commands available and instructions for using PACPL.
Display the list of available codecs for encoder and decoder
Some explanations, as usual
In general, the commands are written in the following structure
Code:
pacpl --to <format> <options> directories/files
Some examples
Replace "musig" with your name and change the location.
2.1 Simple convert
Open a terminal and go to the directory containing the files you want to convert. In the following example a folder named "flacMusic" in the home directory of the user"musig" .This will put the converted files into the same folder. If there are other files in the folder than the supported formats you have to specify the "from" file type. with *.mp3, for example, or use the --only option (see 2.5)
Code:
cd /home/musig/flacMusic
pacpl -t mp3 *.flac
Instead of using a wildcard (*) you can specify one or more files
Code:
cd /home/musig/flacMusic
pacpl -t mp3 fortunate_son.flac bad_moon_rising.flac
To convert files in subdirectories, use the option --recursive.
Code:
cd /home/musig/flacMusic
pacpl -t mp3 -r *.flac
If you don't want to keep the original (or if you only want to change the bitrate), use --overwrite
Code:
cd /home/musig/flacMusic
pacpl -t mp3 --overwrite *.flac
2.2 Output from and to a specified directory
In this case from the folder aacMusic to the folder mp3Music, both in the home directory of "user musig"
Code:
pacpl -t mp3 --outdir /home/musig/mp3Music /home/musig/aacMusic
You have to create the output folder first, PACPL will tell you
Code:
mkdir /home/musig/mp3Music
If you use --recursive and want to keep the directories structure, add --preserve
Code:
pacpl -t mp3 -r -p --outdir /home/musig/mp3Music /home/musig/aacMusic
To keep files already matching the destination extension and copy to the output directory, use --keep
Code:
pacpl -t mp3 -k --outdir /home/musig/mp3Music /home/musig/aacMusic
2.3 Set bitrate with option --bitrate (default 128 )
-Have not found out yet if this option makes a CBR or VBR (default). There are other options like --mpcqual described in the --longhelp which obviously make a VBR...
Code:
pacpl -t mp3 --bitrate 320 --outdir /home/musig/Desktop/auflegen2 /home/musig/Desktop/auflegen
2.4 Set Frequency with option --freq (default 44100)
Here with bitrate option, makes not much sense without...
Code:
pacpl -t mp3 --bitrate 320 --freq 48000 --outdir /home/musig/Desktop/auflegen2 /home/musig/Desktop/auflegen
2.5 Specify "from" file type
With the option --only, all other file types are excluded
Code:
pacpl -t mp3 -o aac --outdir /home/musig/mp3Music /home/musig/aacMusic
This is an update from the previous tutorial. All the credit for this goes to my friend from Zurich ti-mo. if you find this tutorial helpful please thank ti-mo (see post 53) also.
Enjoy!
Re: PAACPL for audio transcoding
I'm trying to re-install PACPL following this, but I'm still getting this:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem
Help!
Re: PAACPL for audio transcoding
At what step were you at when this happens? When you state 'reinstall" - did you have it installed and working at one time? Also, you may want to go back to your original post - Lord Illidan posted a response and I think he may know more about your particular problem than I do. Once you get that fixed then come back here and try to install using this method..
Re: PAACPL for audio transcoding
Right after adding the GPG Key
No. I've never had it installed. At least correctly.
I'm still running sudo dpkg --confgure -a
It seems to be taking quite a long time. As soon as it's done, I'll post everything in the other thread.
Re: PAACPL for audio transcoding
Ok - what version of Ubuntu are you running? Is it 32 or 64 bit?
Re: PAACPL for audio transcoding
Quote:
Originally Posted by
cozmicharlie
Ok - what version of Ubuntu are you running? Is it 32 or 64 bit?
7.10 32 bit
Re: PAACPL for audio transcoding
What is the output when you run this:
Code:
sudo dpkg --configure -a
Re: PAACPL for audio transcoding
Quote:
Originally Posted by
cozmicharlie
What is the output when you run this:
Code:
sudo dpkg --configure -a
it's still running.
Right now, it looks like a foreign language to me. :)
Setting up pacpl (4.0.0beta3-1) ...
CPAN: Storable loaded ok
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...details.txt.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: connect: timeout]
Fetching with Net::FTP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...details.txt.gz
Fetching with LWP:
ftp://carroll.cac.psu.edu/pub/CPAN/m...details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Fri, 21 Mar 2008 14:31:21 GMT
There's a new CPAN.pm version (v1.9205) available!
[Current version is v1.7602]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
Fetching with LWP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...odlist.data.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: connect: timeout]
Fetching with Net::FTP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...odlist.data.gz
Fetching with LWP:
ftp://carroll.cac.psu.edu/pub/CPAN/m...odlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Parse::RecDescent is up to date.
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 21 Mar 2008 14:31:21 GMT
Inline is up to date.
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 21 Mar 2008 14:31:21 GMT
Inline::C is up to date.
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 21 Mar 2008 14:31:21 GMT
Running install for module Devel::Symdump
Running make for A/AN/ANDK/Devel-Symdump-2.08.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...mp-2.08.tar.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: connect: timeout]
Fetching with Net::FTP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...mp-2.08.tar.gz
Fetching with LWP:
ftp://carroll.cac.psu.edu/pub/CPAN/a...mp-2.08.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
ftp://carroll.cac.psu.edu/pub/CPAN/a...ANDK/CHECKSUMS
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/A/AN/ANDK/Devel-Symdump-2.08.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Devel-Symdump-2.08/
Devel-Symdump-2.08/t/
Devel-Symdump-2.08/t/recur.t
Devel-Symdump-2.08/t/export.t
Devel-Symdump-2.08/t/tree.t
Devel-Symdump-2.08/t/symdump.t
Devel-Symdump-2.08/t/pod.t
Devel-Symdump-2.08/t/autogen.t
Devel-Symdump-2.08/t/diff.t
Devel-Symdump-2.08/t/podcover.t
Devel-Symdump-2.08/ChangeLog.svn
Devel-Symdump-2.08/MANIFEST
Devel-Symdump-2.08/ChangeLog
Devel-Symdump-2.08/lib/
Devel-Symdump-2.08/lib/Devel/
Devel-Symdump-2.08/lib/Devel/Symdump.pm
Devel-Symdump-2.08/lib/Devel/Symdump/
Devel-Symdump-2.08/lib/Devel/Symdump/Export.pm
Devel-Symdump-2.08/Makefile.PL
Devel-Symdump-2.08/README
Devel-Symdump-2.08/META.yml
Devel-Symdump-2.08/SIGNATURE
CPAN.pm: Going to build A/AN/ANDK/Devel-Symdump-2.08.tar.gz
WARNING: LICENSE is not a known parameter.
Checking if your kit is complete...
Looks good
'LICENSE' is not a known MakeMaker parameter name.
Writing Makefile for Devel::Symdump
cp lib/Devel/Symdump.pm blib/lib/Devel/Symdump.pm
cp lib/Devel/Symdump/Export.pm blib/lib/Devel/Symdump/Export.pm
Manifying blib/man3/Devel::Symdump.3pm
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/autogen.....ok
t/diff........ok
t/export......ok
t/pod.........skipped
all skipped: Test::Pod 1.00 required for testing POD
t/podcover....skipped
all skipped: Test::Pod::Coverage required for testing pod coverage
t/recur.......ok
t/symdump.....ok
t/tree........ok
All tests successful, 2 tests skipped.
Files=8, Tests=29, 1 wallclock secs ( 0.31 cusr + 0.07 csys = 0.38 CPU)
/usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl/5.8.8/Devel/Symdump.pm
Installing /usr/local/share/perl/5.8.8/Devel/Symdump/Export.pm
Installing /usr/local/man/man3/Devel::Symdump.3pm
Writing /usr/local/lib/perl/5.8.8/auto/Devel/Symdump/.packlist
Appending installation info to /usr/local/lib/perl/5.8.8/perllocal.pod
/usr/bin/make install -- OK
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 21 Mar 2008 14:31:21 GMT
Running install for module Switch
Running make for R/RG/RGARCIA/Switch-2.13.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...ch-2.13.tar.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: connect: timeout]
Fetching with Net::FTP:
ftp://bc1.hpc.lsu.edu/pub/mirrors/CP...ch-2.13.tar.gz
There's more to come apparently.
Re: PAACPL for audio transcoding
Did it work? What you have sent so far looks OK.
Re: PAACPL for audio transcoding
Quote:
Originally Posted by
cozmicharlie
Did it work? What you have sent so far looks OK.
Still waiting for it to finish.