build ffmpeg using ready-made script

This commit is contained in:
2017-01-01 14:27:51 +01:00
parent 9886f5ca2a
commit 7d1edb7f97
6 changed files with 39 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ PROXY = $(shell ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | cut -d' ' -f1)
TIMEZONE = Europe/Amsterdam
JOBS = 2
CLEANUP = true
ARGS = --rm=false --no-cache=true
ARGS = --rm=false --no-cache=false
include $(wildcard $(DOCKER_HOME)/build/make/*.mk)
define add

View File

@@ -0,0 +1,2 @@
ffmpeg-kodi: compile
$(call script,$@)

View File

@@ -1,2 +1,3 @@
ffmpeg: compile
$(call script,ffmpeg)
ffmpeg:
$(call script,utilities)
$(call script,$@)

View File

@@ -1,4 +1,4 @@
kodi: base compile transcoder ffmpeg
kodi: base compile transcoder ffmpeg-kodi
$(call aux,headless.patch)
$(call script,$@)
$(call runit,$@)

View File

@@ -0,0 +1,18 @@
## Environment
export_env FFMPEG_VERSION 2.8.6
export_env KODI_VERSION 16.0
export_env KODI_BRANCH Jarvis
## FFmpeg
cd /opt
wget -O ffmpeg-$FFMPEG_VERSION.tar.gz https://github.com/xbmc/FFmpeg/archive/$FFMPEG_VERSION-$KODI_BRANCH-$KODI_VERSION.tar.gz
tar xvzf ffmpeg-$FFMPEG_VERSION.tar.gz
mv FFmpeg-$FFMPEG_VERSION-$KODI_BRANCH-$KODI_VERSION ffmpeg-$FFMPEG_VERSION
cd ffmpeg-$FFMPEG_VERSION
./configure --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libspeex --enable-shared --enable-pthreads --enable-libopenjpeg --enable-libfaac --enable-nonfree
make $JOBS
make install
## Enable libraries
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

View File

@@ -1,18 +1,19 @@
## Environment
export_env FFMPEG_VERSION 2.8.6
export_env KODI_VERSION 16.0
export_env KODI_BRANCH Jarvis
## Dependencies
apt_install_permanent zip sudo
## FFmpeg
cd /opt
wget -O ffmpeg-$FFMPEG_VERSION.tar.gz https://github.com/xbmc/FFmpeg/archive/$FFMPEG_VERSION-$KODI_BRANCH-$KODI_VERSION.tar.gz
tar xvzf ffmpeg-$FFMPEG_VERSION.tar.gz
mv FFmpeg-$FFMPEG_VERSION-$KODI_BRANCH-$KODI_VERSION ffmpeg-$FFMPEG_VERSION
cd ffmpeg-$FFMPEG_VERSION
./configure --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libspeex --enable-shared --enable-pthreads --enable-libopenjpeg --enable-libfaac --enable-nonfree
make $JOBS
make install
git clone https://github.com/lutris/ffmpeg-nvenc.git
/opt/ffmpeg-nvenc/build.sh
## Enable libraries
echo "/usr/local/lib" >> /etc/ld.so.conf
## Enable libraries and binaries
mv /opt/ffmpeg-nvenc/ffmpeg-nvenc/ /opt/ffmpeg
echo "/opt/ffmpeg/lib" >> /etc/ld.so.conf
ldconfig
ln -s /opt/ffmpeg/bin/* /usr/local/bin
## Clean installation files
if [ $MODE == "minimal" ]; then
cd /opt
rm -r ffmpeg-nvenc
fi