Wednesday, June 5, 2013

BEST WAY TO FIX BROKEN PACKAGES IN UBUNTU

Hello ,
              When we installing some packages in ubuntu we may get some errors in terminal like below , 

trying to overwrite '/usr/bin/opencv_haartraining', which is also in package
libopencv2.3-bin 2.3.1+svn6514+branch23-12~oneiric
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libcv-dev_2.1.0-7build1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 
 
 
 That time we have to fix the broken packages by following commands , after surfing some websites I got good solution and its perfectly working..

sudo apt-get update --fix-missing

sudo dpkg --configure -a

sudo apt-get install -f


the problem of a broken package still exist the solution is to edit the dpkg status file manually .

sudo gedit /var/lib/dpkg/status 

Locate the corrupt package, and remove the whole block of information about it and save the file.




Tuesday, June 4, 2013

FFMPEG FULL INSTALLATION ON UBUNTU

FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video . Here you can get clear steps to install FFMPEG in ubuntu 12.04 and ubuntu 11.10 .

STEP 1 : First step is remove all existing packages that are needed for FFMPEG just copy and paste the command in terminal .

sudo apt-get remove ffmpeg x264 libav-tools libvpx-dev libx264-dev yasm

STEP 2 :  Get the dependencies

sudo apt-get update 

sudo apt-get -y install autoconf automake build-essential checkinstall git libass-dev \ libgpac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev \ libsdl1.2-dev libspeex-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \ libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev

STEP 3 : Installation

  • Yasm

    Yasm is an assembler and is recommended for x264 and FFmpeg.

    cd 

    wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz 

    tar xzvf yasm-1.2.0.tar.gz 

    cd yasm-1.2.0 

    ./configure 

    make 

    sudo checkinstall --pkgname=yasm --pkgversion="1.2.0"       --backup=no \ --deldoc=yes --fstrans=no --default

     

    x264

    H.264 video encoder. The following commands will get the current source files, compile, and install x264. See the x264 Encoding Guide for some usage examples.

    cd 

    git clone --depth 1 git://git.videolan.org/x264.git

    cd x264

    ./configure --enable-static 

    make 

    sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \ --fstrans=no --default

     

    fdk-aac

    AAC audio encoder. 

    cd 

    git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git 

    cd fdk-aac

     autoreconf -fiv 

    ./configure --disable-shared 

    make 

    sudo checkinstall --pkgname=fdk-aac --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default 

     

    libvpx

    VP8 video encoder and decoder.

    cd 

    git clone --depth 1 http://git.chromium.org/webm/libvpx.git 

    cd libvpx 

    ./configure --disable-examples --disable-unit-tests 

    make 

    sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default 

     

    opus

    Opus audio encoder and decoder.

    cd

     git clone --depth 1 git://git.xiph.org/opus.git 

    cd opus 

    ./autogen.sh 

    ./configure --disable-shared 

    make

    sudo checkinstall --pkgname=libopus --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default 

     

    FFmpeg

    cd 

    git clone --depth 1 git://source.ffmpeg.org/ffmpeg 

    cd ffmpeg

     ./configure --extra-libs="-ldl" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame \ --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libvorbis \ --enable-libopus --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 

    make 

    sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default 

    hash -r

     

    Installation is now complete and FFmpeg is now ready for use. You can keep the x264, libvpx, and ffmpeg directories in your home directory if you plan on updating later.