Ik heb ffmpeg opnieuw gecompileerd op mijn DS412+, omdat bij de eerdere versie geen X264 codec zat. Blijkbaar zijn meerdere mensen op zoek om dit te doen. Zou iemand na kunnen gaan of mijn stappenplan helemaal correct is? Ik heb zo vaak lopen kl*ten dat ik niet meer weet of het helemaal correct is.
Het onderstaande is voor een Synology met een Intel CPU. Gebruikers van een Synology met een andere CPU zullen bij "Go to the ffmpeg directory. Configure ffmpeg. In my case:" een andere architecture moeten gebruiken (--arch=i686).
Het stappenplan:
Follow this guide to compile ffmpeg with libx264
Bootstrap your Synology:
http://forum.synology.com.../How_to_Install_Bootstrap
Then:
code:
1
2
3
4
| ipkg update
ipkg install optware-devel
ipkg install git
ipkg install bash |
Remove Yasm and install a newer version
code:
1
2
3
4
5
6
7
| ipkg remove yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -xvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make
make install |
Remove the old X264 version:
Download and install the latest version of X264
code:
1
2
3
4
5
6
| git clone git://git.videolan.org/x264.git
cd x264
sed -i 's/^#!.*$/#!\/opt\/bin\/bash/g' configure version.sh
./configure --enable-shared --host=i686-linux
make
make install |
Locate and copy libx264.so.XXX (XXX depends on the version of X264). In my case libx264.so.135
code:
1
2
| find / -name libx264.so.*
cp /opt/lib/libx264.so.135 /lib |
Install FAAC
code:
1
2
3
4
5
6
7
| wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar -xvf faac-1.28.tar.gz
cd faac-1.28/
./configure --prefix=/opt
make
make install
cp /opt/lib/libfaac.so.0 /lib |
Ffmpeg downloaden and compile
code:
1
2
3
| git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
sed -i 's/^#!.*$/#!\/opt\/bin\/bash/g' configure version.sh |
Go to the ffmepg directory. Configure ffmpeg. In my case:
code:
1
2
3
| ./configure --enable-cross-compile --arch=i686 --target-os=linux --enable-optimizations --disable-altivec --enable-pic --enable-shared --disable-static --disable-swscale-alpha --disable-ffserver --disable-ffplay --enable-libfaac --enable-nonfree --enable-version3 --enable-gpl --enable-libx264
make
make install |
Test ffmpeg by typing the whole path. For instance if you installed ffmpeg in "volume1" and then the directory "ffmpeg":
code:
1
| /volume1/ffmpeg/ffmpeg -version |
You probably get some missing files. These can be found in the subfolders of your ffmpeg directory. For instance libavfilter.so.3 can be found in the directory libavfilter. Alternatively you can use the find command
code:
1
| find / -name libavfilter.so.3 |
Copy the files to /lib
code:
1
| cp /volume1/ffmpeg/libavfilter/libavfilter.so.3 /lib |
Repeat this for all files. ffmpeg should work after that.
NOTE: this installs a second installation of FFMPEG. Make sure you use the right one!