1 (edited by Cory 2011-06-08 10:24:28)

Topic: FFMPEG Auto Installer : Unofficial Fixes

This is an unofficial fix, I've corrected myself over the last few days and I'm hoping this could be easily implemented into the newer version of FFMPEG Auto Installer.

#!/bin/bash
#FFMPEG installation script

#  Copyright (C) 2007-2010 Sherin.co.in. All rights reserved.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
RED='\033[01;31m'
RESET='\033[0m'
INSTALL_SDIR='/usr/src/ffmpegscript'
SOURCE_URL='http://mirror.ffmpeginstaller.com/source/ffmpeg'
INSTALL_DDIR='/usr/local/cpffmpeg'
export cpu=`cat "/proc/cpuinfo" | grep "processor"|wc -l`
export TMPDIR=$HOME/tmp
_package='FFMPEG'
clear
sleep 2
ffmpeg_source=$_package
ldconfig
echo -e $RED"Installation of $_package ....... started"$RESET
cd $INSTALL_SDIR
echo "Removing old source"
   rm -vrf ffmpeg*
   #wget $SOURCE_URL/$ffmpeg_source
   #tar -xvzf $ffmpeg_source
   #git clone git://git.videolan.org/ffmpeg.git
   svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
   cd ffmpeg/
   ldconfig
./configure --prefix=$INSTALL_DDIR --enable-shared --enable-nonfree \
                --enable-gpl --enable-pthreads  --enable-libopencore-amrnb  --enable-decoder=liba52 \
                --enable-libopencore-amrwb  --enable-libfaac  --enable-libmp3lame \
                --enable-libtheora --enable-libvorbis  --enable-libx264  --enable-libxvid \
                --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib \
                 --enable-version3 --extra-version=syslint
   make -j$cpu
   make tools/qt-faststart   
   make install
   cp -vf tools/qt-faststart /usr/local/cpffmpeg/bin/
   ln -sf /usr/local/cpffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
   ln -sf /usr/local/cpffmpeg/bin/ffmpeg /usr/bin/ffmpeg
   ln -sf /usr/local/cpffmpeg/bin/qt-faststart /usr/local/bin/qt-faststart
   ln -sf /usr/local/cpffmpeg/bin/qt-faststart /usr/bin/qt-faststart
   ldconfig
   /usr/bin/ffmpeg -formats

echo -e $RED"Installation of $_package ....... Completed"$RESET
sleep 2
cd /usr/src/ffmpeginstaller.7.0/
rm -rf ffmpeg.sh
wget http://pastie.org/pastes/2036805/download
mv download ffmpeg.sh

If you noticed, I disabled git and switched to using SVN.

GIT doesn't work as the scripts detect:
1) Wrong path
2) Wrong Verion

Shows: r or 19000+ Required. (Clip-Bucket for example on any version)

After switching to SVN on FFMPEG, I corrected this issue.

Encoding still failed.

So I install flvtool++

cd /usr/src/ffmpeginstaller.7.0/
wget http://pastie.org/pastes/2036850/download
mv download flvtool++.sh
sh flvtool++.sh (run manually)

After awhile, I noticed I was still getting some errors, so after a little research, I found some of the ffmpeg presets were not added, specifically normal.

cd /usr/local/cpffmpeg/ffmpeg/share/
nano -w libx264-normal.ffpreset

Copy and Paste this into: libx264-normal.ffpreset

coder=1
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
subq=6
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=16
refs=2
directpred=3
trellis=0
flags2=+bpyramid+wpred+dct8x8+fastpskip
ctrl+x
and press 'y' for yes.

I'm thinking all the presets should be added with ffmpegautoinstaller;
and after completion on post.sh

cd /usr/local/cpffmpeg/ffmpeg/
mv share share-old
mkdir share
cp -rf /usr/src/ffmpeginstaller.7.0/ffpresets/* /usr/local/cpffmpeg/ffmpeg/share/

I was still getting failures and this is how I corrected after doing the above.

Turn off Cron Jobs.
Tested: Failed.

Turn off: VF
Save Settings;
Turn on: VF
Save Settings;
Basically, Turn it off and then turn it back on.
Test: Success

Lastly and here's a thought;

Change how the installer works;

sh install.sh svn

[Options: source|svn|git]

If->Source, Downloads from your mirror.
If->SVN, Downloads from SNV.
If->GIT, Downloads from GIT. (Not Recommended for ffmpeg.)

Should add like a menu, so if you get an ERROR, you don't have to start the process all over again.

Note: FFMPEG using SVN and flvtool++ was modified by me.

Enjoy and hopefully this corrects any common issues.

Re: FFMPEG Auto Installer : Unofficial Fixes

Thank you for your update.  The ffmpeg stopped using svn repo. So there will be no new updates available in svn repo.

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: FFMPEG Auto Installer : Unofficial Fixes

Thanks for the post this has fixed my issue with ffmpeg on the 7.2 version of the installer now i just have to install ffmpeg-php which will be a pain, as we all know that ffmpeg-php is buggy, do anyone know any alternatives to it by any chance?

4 (edited by darkartek 2012-02-23 17:44:57)

Re: FFMPEG Auto Installer : Unofficial Fixes

I tried to locate /usr/local/cpffmpeg/ffmpeg/share/ but i cant find it

I have /usr/local/cpffmpeg/share/ffmpeg/

Its the same?

Now im getting another error:

Unrecognized option 'directpred'
/usr/local/cpffmpeg/share/ffmpeg/libx264-normal.ffpreset: Invalid option or argument: 'directpred=3', parsed as 'directpred' = '3'