Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques FFMPEG segmentation fault in libavcodec and invalid size of /lib/libavcodec.so.52.108.0

  • FFMPEG segmentation fault in libavcodec and invalid size of /lib/libavcodec.so.52.108.0

    Posted by Dmitry Iasd on March 12, 2011 at 10:15 am

    Hi!

    I’m trying to compile ffmpeg from source code on Debian Linux. I have a clean version of Debian Lenny (5.08) (installed from scratch) and a VMWare snapshot with Debian Lenny (5.08) snapshot.

    I use the same instructions (provided below) to compile FFMPEG on both Debian instances. Here are these instructions:

    wget https://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2010.12.26_all.deb
    dpkg -i debian-multimedia-keyring_2010.12.26_all.deb

    apt-get install checkinstall yasm git-core subversion

    apt-get build-dep ffmpeg

    apt-get remove libx264-dev
    wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20100926-2245.tar.bz2
    tar xjvf x264-snapshot-20100926-2245.tar.bz2
    cd x264-snapshot-20100926-2245
    ./configure --enable-pic --prefix=/usr
    make
    checkinstall --pkgname=x264 --pkgversion "snapshot-20100926" --backup=no --default
    cd ..

    apt-get remove libfaac-dev
    apt-get remove libfaac0
    wget https://downloads.sourceforge.net/faac/faac-1.28.tar.bz2
    tar xjvf faac-1.28.tar.bz2
    cd faac-1.28
    ./configure --prefix=/usr
    make
    checkinstall --pkgname=faac -pkgversion "1.28.svn`date +%Y%m%d`" --backup=no --default
    cd ..

    apt-get remove libtheora-dev
    apt-get remove libtheora0
    wget https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
    tar xzvf libtheora-1.1.1.tar.gz
    cd libtheora-1.1.1
    ./configure --prefix=/usr
    make
    checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default
    cd ..

    apt-get remove libvorbis-dev
    apt-get remove libvorbis0a # The system will offer to delete some other packages, agree
    wget https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.1.tar.gz
    tar zxvf libvorbis-1.3.1.tar.gz
    cd libvorbis-1.3.1
    ./configure --prefix=/usr
    make
    checkinstall --pkgname=libvorbis --pkgversion "1.3.1" --backup=no --default
    cd ..

    apt-get remove libmp3lame-dev
    apt-get remove libmp3lame0
    wget https://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
    tar xzvf lame-3.98.4.tar.gz
    cd lame-3.98.4
    ./configure --enable-nasm --enable-shared --prefix=/usr
    make
    checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default --deldoc=yes
    cd ..

    git clone git://review.webmproject.org/libvpx.git
    cd libvpx
    ./configure --enable-pic --enable-vp8 --enable-postproc --enable-runtime-cpu-detect --prefix=/usr
    make
    checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --default --deldoc=yes
    cd ..

    apt-get install libopenjpeg-dev

    svn checkout svn://svn.ffmpeg.org/soc/libavfilter -r5946 # THIS IS FFMPEG -r26400
    cd libavfilter
    ./checkout.sh # Checks out the most current version of FFMPEG that works with libavfilter.
    cd ffmpeg
    ./configure --prefix=/usr --libdir=/lib --shlibdir=/lib --bindir=/bin --incdir=/include/ffmpeg --enable-shared --enable-gpl --enable-version3 --enable-nonfree --disable-ffplay --disable-ffprobe --disable-ffserver --enable-postproc --enable-pthreads --disable-network --enable-runtime-cpudetect --enable-hardcoded-tables --enable-memalign-hack --disable-devices --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libx264 --enable-pic --enable-avfilter --enable-libvpx --enable-libvorbis --enable-libtheora
    make
    checkinstall --pkgname=ffmpeg --pkgversion="`date +%Y%m%d%H%M`" --backup=no --default --deldoc=yes
    cd ./tools
    gcc qt-faststart.c -o /bin/qt-faststart
    cd ../../..

    mkdir segmenter
    cd segmenter
    wget https://svn.assembla.com/svn/legend/segmenter/segmenter.c
    apt-get update
    apt-get install libbz2-dev
    gcc -Wall -I../libavfilter/ffmpeg -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil -lbz2 -lm -lz -lfaac -lmp3lame -lx264
    cp segmenter /usr/bin/segmenter
    cd ..

    After compilation of FFMPEG on my clean Debian, I see that the size of the library /lib/libavcodec.so.52.108.0 is less than the size of the library I get when compiling on the VMWare instance Debian. And this results in the following error:

    [ 2707.022186] ffmpeg[7077] general protection ip:b7043028 sp:bf8d8318 error:0 in libavcodec.so.52.108.0[b6aca000+7f8000]

    when I try to run this command:

    /bin/ffmpeg -i "/var/tmp/scooter-race.flv" -threads 0 -f webm -s 640x360 -vcodec libvpx -vb 1024k -g 120 -qmax 50 -qmin 10 -acodec libvorbis -ab 128k -ac 2 -ar 44100 -psnr -y /var/tmp/xcodeout/tempOutputFile

    However, when I copy that library /lib/libavcodec.so.52.108.0 from VMWare Debian machine to my clean Debian, ffmpeg works without segmentation faults.

    Can anyone advice, why these libraries can be different when I compile on different machines following the same steps? Can this be caused by some gcc configuration (in its global configuration files if there are any) or smth like this?

    Thanks!

    Dmitry Iasd replied 15 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy