Wednesday, July 28, 2010

How to convert .mp3 format to .ogg format

Packages required for installation on both Redhat and Debian based servers.


For Redhat

sh# yum install libmad libid3tag which are available in rpm forge repository.

download and install mpg321 rpm which is available on the internet or you can download it from http://rpm.pbone.net

sh# rpm -Uvh mpg321-0.2.10.4-2.fc10.i386.rpm

next is to install vorbis-tools

sh# yum install vorbis-tools

For Ubuntu

sh# apt-get install mpg321 vorbis-tools

Action

suppose you are have test.mp3 and need to convert it into test.ogg
run the mentioned command

sh # mpg321 test.mp3 -w - | oggenc -o test.ogg -

Note : Don't forget to put trailing "-"

Wednesday, July 21, 2010

Degrade PHP-5.3 to PHP-5.2 in Ubuntu

The mentioned script would degrade php-5.3 to php-5.2 in ubuntu.


#! /bin/sh
php_packages=`dpkg -l | grep php | awk '{print $2}'`

sudo apt-get remove $php_packages

sed s/lucid/karmic/g /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/karmic.list

sudo mkdir -p /etc/apt/preferences.d/

for package in $php_packages;
do echo "Package: $package
Pin: release a=karmic
Pin-Priority: 991
" | sudo tee -a /etc/apt/preferences.d/php
done

sudo apt-get update

sudo apt-get install $php_packages