Pacpl 安装及使用

pacpl(Perl Audio Converter),是一个perl的音频转换工具,支持多种格式和码率间的相互转换。

在Ubuntu下安装很简单(extra/mod-install-ubuntu.sh),不会遇到任何依赖关系错误,但是CentOS6下有点麻烦……

yum -y install git
git clone git://git.code.sf.net/p/pacpl/code pacpl-code
cd pacpl-code
./extra/mod-install.sh && ./configure && make && make install


  • 若执行 mod_install.sh 一开始报错提示未安装CPAN 或 YAML,则执行:
yum -y install cpan
perl -MCPAN -e shell
# 先改下CPAN源
> o conf urllist unshift http://mirrors.163.com/cpan/
> o conf commit
cpan YAML

除了网易CPAN源之外,选用搜狐(mirrors.sohu.com/CPAN)或阿里云(mirrors.aliyun.com/CPAN)亦可.


  • 如果安装额外的perl模块时报错:error: stddef.h: No such file or directory

则先在系统gcc中找到缺失的头文件后复制到Makefile中的编译目录(gcc -I/usr/local/include)即可:

yum -y install mlocate
updatedb
locate stddef.h
cp /usr/lib/gcc/x86_64-redhat-linux/4.4.4/include/* /usr/local/include


  • 如果make时报错:Autoconf version 2.69 or higher is required

参考:CentOS6.5升级autoconf版本 Autoconf version 2.64 or higher is required

rpm -qf /usr/bin/autoconf
rpm -e --nodeps autoconf-2.63
wget -q ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure && make && make install
autoconf -V


  • 使用方法如下:
pacpl --overwrite -v --to wma -k --bitrate 96 --outdir '输出目录' --outfile '输出文件名可不带后缀' '输入文件.mp3'

可以结合 mplayer 使用:

wget -q http://download1.rpmfusion.org/free/el/updates/6/x86_64/rpmfusion-free-release-6-1.noarch.rpm
rpm -rvh rpmfusion-free-release-6-1.noarch.rpm
yum -y install mplayer
wget -q http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
tar xf all-20110131.tar.bz2
mv all-20110131/* /usr/local/lib/codecs/
rmdir all-20110131
mplayer -nogui -nocache -nolirc -vo null -ao null -frames 0 -identify '要播放的文件'

eof.

转载于:https://my.oschina.net/cwalet/blog/502703

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值