Merge pull request #1985 from CvH/8.2-emby-ffmpegx

FFmpegx rework for Emby update
This commit is contained in:
Christian Hewitt 2017-10-25 07:55:52 +04:00 committed by GitHub
commit 4a620a129a
10 changed files with 332 additions and 122 deletions

View File

@ -1,108 +0,0 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016-present Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="ffmpegx"
PKG_VERSION="libreelec"
PKG_REV="9"
PKG_LICENSE="LGPLv2.1+"
PKG_SITE="https://ffmpeg.org"
PKG_DEPENDS_TARGET="toolchain ffmpeg lame x264"
PKG_LONGDESC="FFmpeg built static with additional features"
pre_configure_target() {
cd "$PKG_BUILD"
rm -rf ".$TARGET_NAME"
cp -PR $(get_build_dir ffmpeg)/* .
make clean
# ffmpeg builds better with these options
strip_gold
strip_lto
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
CFLAGS="-DRPI=1 -I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS"
FFMPEG_LIBS="-lbcm_host -ldl -lmmal -lmmal_core -lmmal_util -lvchiq_arm -lvcos -lvcsm"
FFMPEG_RPI_HADE="--enable-mmal --enable-omx-rpi"
fi
# ffmpeg does not build with libx264 on aarch64
if [ "$TARGET_ARCH" != "aarch64" ]; then
FFMPEG_X264="--enable-libx264"
fi
if [ "$TARGET_ARCH" == "arm" ]; then
FFMPEG_ARM_AO="--enable-hardcoded-tables"
fi
}
configure_target() {
./configure \
\
`#Licensing options` \
--enable-gpl \
--enable-nonfree \
\
`#Documentation options` \
--disable-doc \
\
`#Hardware accelerated decoding encoding` \
$FFMPEG_RPI_HADE \
\
`#External library support` \
--enable-libmp3lame \
$FFMPEG_X264 \
--enable-openssl \
\
`#Toolchain options` \
--arch="$TARGET_ARCH" \
--cpu="$TARGET_CPU" \
--cross-prefix="$TARGET_PREFIX" \
--enable-cross-compile \
--sysroot="$SYSROOT_PREFIX" \
--sysinclude="$SYSROOT_PREFIX/usr/include" \
--target-os="linux" \
--nm="$NM" \
--ar="$AR" \
--as="$CC" \
--cc="$CC" \
--ld="$CC" \
--pkg-config="$TOOLCHAIN/bin/pkg-config" \
--host-cc="$HOST_CC" \
--host-cflags="$HOST_CFLAGS" \
--host-ldflags="$HOST_LDFLAGS" \
--host-libs="-lm" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="$LDFLAGS" \
--extra-libs="$FFMPEG_LIBS" \
--extra-version="x" \
--enable-pic \
\
`#Advanced options` \
$FFMPEG_ARM_AO \
}
makeinstall_target() {
make install DESTDIR=$INSTALL
}
post_makeinstall_target() {
for ff in $INSTALL/usr/local/bin/*; do mv $ff ${ff}x; done
rm -fr $INSTALL/usr/local/include
rm -fr $INSTALL/usr/local/share/ffmpeg/examples
}

View File

@ -17,7 +17,7 @@
################################################################################
PKG_NAME="imagemagick"
PKG_VERSION="7.0.5-7"
PKG_VERSION="7.0.7-1"
PKG_LICENSE="http://www.imagemagick.org/script/license.php"
PKG_SITE="http://www.imagemagick.org/"
PKG_URL="https://github.com/ImageMagick/ImageMagick/archive/$PKG_VERSION.tar.gz"

View File

@ -0,0 +1,29 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="fdk-aac"
PKG_VERSION="0.1.5"
PKG_SHA256="ff53d1d01cacc29c071e23192dfefa93bdbeaf775fc5d296259b4859d0306b79"
PKG_ARCH="any"
PKG_LICENSE="other"
PKG_SITE="https://sourceforge.net/projects/opencore-amr/"
PKG_URL="https://github.com/mstorsjo/fdk-aac/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="multimedia"
PKG_LONGDESC="A standalone library of the Fraunhofer FDK AAC code from Android."
PKG_AUTORECONF="yes"

View File

@ -0,0 +1,61 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016-present Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libvpx"
PKG_VERSION="1.6.1"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="https://www.webmproject.org"
PKG_URL="https://github.com/webmproject/libvpx/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain yasm:host"
PKG_SECTION="multimedia"
PKG_SHORTDESC="WebM VP8/VP9 Codec SDK"
PKG_LONGDESC="The WebM Project is dedicated to developing a high-quality, open video format for the web that's freely available to everyone."
PKG_AUTORECONF="no"
configure_target() {
case $ARCH in
aarch64)
TARGET_NAME_LIBVPX="arm64-linux-gcc"
;;
arm)
TARGET_NAME_LIBVPX="armv7-linux-gcc"
;;
x86_64)
TARGET_NAME_LIBVPX="x86_64-linux-gcc"
;;
esac
$PKG_CONFIGURE_SCRIPT --prefix=/usr \
--extra-cflags="$CFLAGS" \
--as=yasm \
--target=$TARGET_NAME_LIBVPX \
--disable-docs \
--disable-examples \
--disable-shared \
--disable-tools \
--disable-unit-tests \
--disable-vp8-decoder \
--disable-vp9-decoder \
--enable-ccache \
--enable-pic \
--enable-static \
--enable-vp8 \
--enable-vp9
}

View File

@ -17,12 +17,14 @@
################################################################################
PKG_NAME="x264"
PKG_VERSION="snapshot-20170524-2245-stable"
PKG_VERSION="snapshot-20171015-2245"
PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org/developers/x264.html"
PKG_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_URL="https://download.videolan.org/x264/snapshots/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="multimedia"
PKG_LONGDESC="x264"
PKG_AUTORECONF="no"
pre_configure_target() {
cd $PKG_BUILD

View File

@ -0,0 +1,33 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="x265"
PKG_VERSION="2.5"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/videolan/x265"
PKG_URL="https://github.com/videolan/x265/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="multimedia"
PKG_LONGDESC="x265 is a H.265/HEVC video encoder application library"
PKG_AUTORECONF="no"
pre_configure_target() {
LDFLAGS="$LDFLAGS -ldl"
cmake -G "Unix Makefiles" ./source
}

View File

@ -0,0 +1,191 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016-present Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="ffmpegx"
PKG_VERSION="3.4"
PKG_SHA256="2865712ead48b9e5939c1eb23c409c8f1d60e49bc6434ca489271ea677c81adc"
PKG_ARCH="any"
PKG_LICENSE="LGPLv2.1+"
PKG_SITE="https://ffmpeg.org"
PKG_URL="https://github.com/FFmpeg/FFmpeg/archive/n${PKG_VERSION}.tar.gz"
PKG_SOURCE_DIR="FFmpeg-n${PKG_VERSION}"
PKG_DEPENDS_TARGET="toolchain bzip2 fdk-aac libvorbis openssl opus x264 x265 zlib"
PKG_SECTION="multimedia"
PKG_LONGDESC="FFmpegx is an complete FFmpeg build to support encoding and decoding"
PKG_AUTORECONF="no"
# Dependencies
get_graphicdrivers
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
fi
# ARMv6 is no longer supported by libvpx
if [ "$PROJECT" != "RPi" -a "$PROJECT" != "Slice" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvpx"
fi
pre_configure_target() {
cd $PKG_BUILD
rm -rf .$TARGET_NAME
# ffmpeg builds better with these options
strip_gold
strip_lto
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
CFLAGS="-DRPI=1 -I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS"
PKG_FFMPEG_LIBS="-lbcm_host -ldl -lmmal -lmmal_core -lmmal_util -lvchiq_arm -lvcos -lvcsm"
fi
if [ "$TARGET_ARCH" == "arm" ]; then
PKG_FFMPEG_ARM_AO="--enable-hardcoded-tables"
fi
# HW encoders
# RPi 0-3
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
PKG_FFMPEG_HW_ENCODERS_RPi="\
`#Video encoders` \
--enable-omx-rpi \
--enable-mmal \
--enable-encoder=h264_omx \
\
`#Video hwaccel` \
--enable-hwaccel=h264_mmal \
--enable-hwaccel=mpeg2_mmal \
--enable-hwaccel=mpeg4_mmal \
--enable-hwaccel=vc1_mmal"
fi
# Generic
if [[ "$TARGET_ARCH" = "x86_64" ]]; then
PKG_FFMPEG_HW_ENCODERS_GENERIC="\
`#Video encoders` \
--enable-encoder=h264_nvenc \
--enable-encoder=h264_vaapi \
--enable-encoder=hevc_nvenc \
--enable-encoder=hevc_vaapi \
--enable-encoder=mjpeg_vaapi \
--enable-encoder=mpeg2_vaapi \
--enable-encoder=vp8_vaapi \
--enable-encoder=vp9_vaapi \
\
`#Video hwaccel` \
--enable-hwaccel=h263_vaapi \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=hevc_vaapi \
--enable-hwaccel=mpeg2_vaapi \
--enable-hwaccel=mpeg4_vaapi \
--enable-hwaccel=vc1_vaapi \
--enable-hwaccel=vp9_vaapi \
--enable-hwaccel=wmv3_vaapi"
fi
# Encoders
PKG_FFMPEG_ENCODERS="\
`#Video encoders` \
--enable-libvpx \
--enable-encoder=libvpx_vp8 \
--enable-encoder=libvpx_vp9 \
--enable-libx264 \
--enable-encoder=x264 \
--enable-libx265 \
--enable-encoder=x265 \
\
`#Audio encoders` \
--enable-encoder=ac3 \
--enable-encoder=eac3 \
--enable-libfdk-aac \
--enable-encoder=libfdk-aac \
--enable-encoder=flac \
--enable-libmp3lame \
--enable-encoder=libmp3lame \
--enable-libopus \
--enable-encoder=libopus \
--enable-libvorbis \
--enable-encoder=libvorbis"
}
configure_target() {
./configure \
\
`#Programs to build` \
--enable-ffmpeg \
--disable-ffplay \
--enable-ffprobe \
--disable-ffserver \
\
`#Static and Shared` \
--enable-static \
--disable-shared \
\
`#Licensing options` \
--enable-gpl \
--enable-nonfree \
\
`#Documentation options` \
--disable-doc \
\
`#Hardware accelerated decoding encoding` \
$PKG_FFMPEG_HW_ENCODERS_RPi \
$PKG_FFMPEG_HW_ENCODERS_GENERIC \
\
`#General options` \
--enable-avresample \
\
`#Toolchain options` \
--arch="$TARGET_ARCH" \
--cpu="$TARGET_CPU" \
--cross-prefix="$TARGET_PREFIX" \
--enable-cross-compile \
--sysroot="$SYSROOT_PREFIX" \
--sysinclude="$SYSROOT_PREFIX/usr/include" \
--target-os="linux" \
--nm="$NM" \
--ar="$AR" \
--as="$CC" \
--cc="$CC" \
--ld="$CC" \
--pkg-config="$TOOLCHAIN/bin/pkg-config" \
--host-cc="$HOST_CC" \
--host-cflags="$HOST_CFLAGS" \
--host-ldflags="$HOST_LDFLAGS" \
--host-extralibs="-lm" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="$LDFLAGS" \
--extra-libs="$PKG_FFMPEG_LIBS" \
--extra-version="x" \
--enable-pic \
--enable-openssl \
\
`#Advanced options` \
$PKG_FFMPEG_ARM_AO \
}
makeinstall_target() {
make install DESTDIR="$INSTALL/../.INSTALL_PKG"
}
post_makeinstall_target() {
for ff in "$INSTALL/../.INSTALL_PKG/usr/local/bin/"*; do mv "$ff" "${ff}x"; done
}

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016 Team LibreELEC
# Copyright (C) 2016-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,17 +17,15 @@
################################################################################
PKG_NAME="opus"
PKG_VERSION="1.1.2"
PKG_VERSION="1.2.1"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="http://www.opus-codec.org"
PKG_URL="http://downloads.us.xiph.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_URL="https://archive.mozilla.org/pub/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="audio"
PKG_SHORTDESC="Codec designed for interactive speech and audio transmission over the Internet"
PKG_LONGDESC="Codec designed for interactive speech and audio transmission over the Internet"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$TARGET_ARCH" = "arm" ]; then

View File

@ -1,3 +1,7 @@
117
- Update to 3.2.34.0
- Use reworked ffmpegx
116
- Update to verson 3.2.27.0
- Rename to Emby Server

View File

@ -17,14 +17,14 @@
################################################################################
PKG_NAME="emby"
PKG_VERSION="3.2.27.0"
PKG_REV="116"
PKG_VERSION="3.2.34.0"
PKG_REV="117"
PKG_LICENSE="OSS"
PKG_SITE="http://emby.media"
PKG_URL="https://github.com/MediaBrowser/Emby/releases/download/$PKG_VERSION/Emby.Mono.zip"
PKG_DEPENDS_TARGET="toolchain ffmpegx imagemagick"
PKG_SECTION="service"
PKG_SHORTDESC="Emby: a personal media server"
PKG_SHORTDESC="Emby Server: a personal media server"
PKG_LONGDESC="Emby Server ($PKG_VERSION) brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device"
PKG_IS_ADDON="yes"
@ -57,12 +57,12 @@ addon() {
$ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono/SQLitePCLRaw.provider.sqlite3.dll.config
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -L $(get_build_dir ffmpegx)/.install_pkg/usr/local/bin/ffmpegx \
$(get_build_dir ffmpegx)/.install_pkg/usr/local/bin/ffprobex \
cp -L $(get_build_dir ffmpegx)/.INSTALL_PKG/usr/local/bin/ffmpegx \
$(get_build_dir ffmpegx)/.INSTALL_PKG/usr/local/bin/ffprobex \
$ADDON_BUILD/$PKG_ADDON_ID/bin/
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
cp -L $(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickCore-7.Q8.so.2 \
cp -L $(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickCore-7.Q8.so.? \
$(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickWand-7.Q8.so \
$ADDON_BUILD/$PKG_ADDON_ID/lib/
}