Hallo,
ich bin immer noch dabei, auf OpenELEC mit einem MediaTV Pro III Stick zum Laufen zu bekommen. Das Problem ist jetzt, dass er den Audio-Codec 86016 nicht öffnen kann.
Aber von vorne:
Auf OpenELEC fehlen erstmal die FFMPEG Bibliotheken, welche der Sundtek-Treiber braucht um das Software-Encoding für Analog zu aktivieren. Das Installieren des FFMPEG-Addons unter OpenELEC hilft
nicht, da hier nur ein Binary installiert wird, aber keine Bibliotheken. Außerdem sind eine Reihe benötigter Codecs nicht aktiviert. Auch das "buildffmpeg.sh" von Sundtek geht nicht, weil es dafür einfach nicht gemacht ist: Als erstes braucht es GIT, welches es auf OpenELEC nicht gibt, und selbst wenn ist da keine Toolchain drauf, usw. usf.
Also habe ich mir die kompletten OpenELEC-Quellen auf einen Linux-Rechner gezogen. Diese enthalten auch die FFMPEG-Quellen. Dort habe ich die
package.mk unter
packages/multimedia/ffmpeg im OpenELEC-Source-Tree angepasst, so dass das ffmpeg configure das Paket entsprechend konfiguriert, dass die dynamischen Bibliotheken erzeugt werden und die entsprechenden Codecs eingebunden werden. Meine aktuelle
package.mk sieht so aus:
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC 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.
#
# OpenELEC 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 OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="ffmpeg"
PKG_VERSION="xbmc-c7a04ca"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://ffmpeg.org"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain yasm:host zlib bzip2 libvorbis gnutls"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$VAAPI" = yes ]; then
# configure GPU drivers and dependencies:
get_graphicdrivers
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET $LIBVA"
FFMPEG_VAAPI="--enable-vaapi"
else
FFMPEG_VAAPI="--disable-vaapi"
fi
if [ "$VDPAU" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
FFMPEG_VDPAU="--enable-vdpau"
else
FFMPEG_VDPAU="--disable-vdpau"
fi
if [ "$DEBUG" = yes ]; then
FFMPEG_DEBUG="--enable-debug --disable-stripping"
else
FFMPEG_DEBUG="--disable-debug --enable-stripping"
FFMPEG_DEBUG="--disable-stripping"
fi
if [ "$OPTIMIZATIONS" = size ]; then
FFMPEG_OPTIM="--disable-small"
else
FFMPEG_OPTIM="--disable-small"
fi
if [ "$CRYSTALHD" = yes ]; then
# disabled, we use XBMC's internal solution
FFMPEG_CRYSTALHD="--disable-crystalhd"
else
FFMPEG_CRYSTALHD="--disable-crystalhd"
fi
case "$TARGET_ARCH" in
arm)
FFMPEG_CPU=""
FFMPEG_TABLES="--enable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;;
i?86)
FFMPEG_CPU=""
FFMPEG_TABLES="--disable-hardcoded-tables"
FFMPEG_PIC="--disable-pic"
;;
x86_64)
FFMPEG_CPU=""
FFMPEG_TABLES="--disable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;;
esac
case "$TARGET_FPU" in
neon*)
FFMPEG_FPU="--enable-neon"
;;
vfp*)
FFMPEG_FPU=""
;;
*)
FFMPEG_FPU=""
;;
esac
pre_configure_target() {
cd $ROOT/$PKG_BUILD
rm -rf .$TARGET_NAME
export pkg_config="$ROOT/$TOOLCHAIN/bin/pkg-config"
# ffmpeg fails building with LTO support
strip_lto
# ffmpeg fails running with GOLD support
strip_gold
}
configure_target() {
./configure --prefix=/usr \
--cpu=$TARGET_CPU \
--arch=$TARGET_ARCH \
--enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \
--sysroot=$SYSROOT_PREFIX \
--sysinclude="$SYSROOT_PREFIX/usr/include" \
--target-os="linux" \
--extra-version="$PKG_VERSION" \
--nm="$NM" \
--ar="$AR" \
--as="$CC" \
--cc="$CC" \
--ld="$CC" \
--host-cc="$HOST_CC" \
--host-cflags="$HOST_CFLAGS" \
--host-ldflags="$HOST_LDFLAGS" \
--host-libs="-lm" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="$LDFLAGS" \
--extra-libs="" \
--extra-version="" \
--build-suffix="" \
--disable-filters \
--disable-devices \
--disable-encoders \
--disable-decoders \
--disable-muxers \
--disable-demuxers \
--enable-shared \
--enable-pthreads \
--enable-libmp3lame \
--enable-encoder=mpeg2video \
--enable-encoder=libmp3lame \
--enable-encoder=mp2 \
--enable-nonfree \
--disable-bsfs \
--disable-protocols \
--disable-parsers \
--enable-muxer=mpegts \
--enable-muxer=mpeg2video \
--enable-muxer=mpeg2dvd \
--enable-logging \
--disable-doc \
$FFMPEG_DEBUG \
$FFMPEG_PIC \
--enable-optimizations \
--disable-armv5te --disable-armv6t2 \
--disable-extra-warnings \
$FFMPEG_OPTIM \
$FFMPEG_CRYSTALHD \
$FFMPEG_VAAPI \
$FFMPEG_VDPAU \
--enable-runtime-cpudetect \
$FFMPEG_TABLES \
$FFMPEG_CPU \
$FFMPEG_FPU
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
rm -rf $INSTALL/usr/share/ffmpeg/examples
}
ACHTUNG! Das ist nur die aktuelle Konfiguration. Da hab ich schon einen Haufen andere ausprobiert.
Wenn man dann alles gebaut hat, dann findet man unter
build.OpenELEC-XXX/ffmpeg-xbmc-YYY/.install_pkg/usr/lib jetzt die benötigten dynamischen Bibliotheken. "XXX" und "YYY" sind build-spezifisch, das muss jeder bei sich nachschauen. Von diesen Bibliotheken braucht man nicht alle, aber alle schaden auch nicht. Ich
glaube, dass nur folgende Biblitheken benötigt werden:
libavcodec.so libavformat.so libavutil.so libswscale.soDiese Bibliotheken kopiert man dann - natürlich nachdem man das OpenELEC-Addon driver.dvb.sundtek-mediatv installiert hat - auf dem OpenELEC in das Verzeichnis
/storage/.xbmc/addons/driver.dvb.sundtek-mediatv/bin/plugins/lib.
Wenn man soweit ist, dann ist schon ziemlich viel ziemlich gut:
**** List of Media Hardware Devices ****
device 0: [MediaTV Pro III USB (EU)] DVB-C, DVB-T, DVB-T2, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS, SWENCODER
[BUS]:
ID: 2-4.4
[SERIAL]:
ID: U140415231017
[DVB-C]:
FRONTEND: /dev/dvb/adapter1/frontend0
DVR: /dev/dvb/adapter1/dvr0
DMX: /dev/dvb/adapter1/demux0
[DVB-T]:
FRONTEND: /dev/dvb/adapter1/frontend0
DVR: /dev/dvb/adapter1/dvr0
DMX: /dev/dvb/adapter1/demux0
[DVB-T2]:
FRONTEND: /dev/dvb/adapter1/frontend0
DVR: /dev/dvb/adapter1/dvr0
DMX: /dev/dvb/adapter1/demux0
[ANALOG-TV]:
VIDEO0: /dev/video1
VBI0: /dev/vbi0
[FM-RADIO]:
RADIO0: /dev/radio0
RDS: /dev/rds0
[REMOTECONTROL]:
INPUT0: /dev/mediainput0
[OSS]:
OSS0: /dev/dsp0
Man sieht, dass Device 0 jetzt auch "SWENCODER" kann. Ab jetzt taucht auch im TVHeadend Webinterface ein neues Device auf: "Sundtek MediaTV Pro 2k12 Sundtek USB". Damit sich TVHeadend nicht zuerst den DVB-Teil des Sticks schnappt und damit den Analog-Teil blockiert, muss man in TVHeadend in der Adapter-Konfiguration des "Sundtek DVB-C (III)" das "Enabled" herausnehmen. Den oft gelesenen Tipp mit
mediaclient --disable-dvb=/dev/dvb/adapterN zu arbeiten konnte ich nicht ohne Extrem-Gefrickel anwenden, da in den mediaclient Binaries alle möglichen Pfade hardgecodet sind, welche sich mit der OpenELEC-Dateisystem-Struktur nicht vertragen. Siehe hier:
http://support.sundtek.com/index.php/topic,1628.0.htmlSo, jetzt ist man soweit, dass TVHeadend mit dem Analogteil spricht und auch auf die gewünschten Frequenzen tunet.
Jetzt zum Problem:Es funktioniert nicht.
Die Sundtek Logdatei sagt dazu folgendes:
2014-06-07 13:06:29 [795] Starting up Multimedia Framework (Mar 4 2014 01:03:38)
2014-06-07 13:06:29 [795] API Version: 5.10
2014-06-07 13:06:29 [795] Running on Linux (3.14.4)
2014-06-07 13:06:29 [795] Detected: GenuineIntel
2014-06-07 13:06:29 [795] This CPU supports: MMX, SSE, SSE2
2014-06-07 13:06:29 [795] unable to open /dev/misc
2014-06-07 13:06:29 [795] scanning devices
2014-06-07 13:06:29 [795]
2014-06-07 13:06:29 [795] Scanning for drivers
2014-06-07 13:06:29 [796] Starting service processor (PID 796)
2014-06-07 13:06:29 [795] found lib: libdrv_net.so
2014-06-07 13:06:29 [795] found lib: libdrv_em28xx.so
2014-06-07 13:06:29 [795] found lib: libdrv_fm.so
2014-06-07 13:06:29 [795] found lib: libdrv_tntdvb.so
2014-06-07 13:06:29 [795] found lib: libdrv_vivi.so
2014-06-07 13:06:29 [795] found lib: libdrv_ngTV.so
2014-06-07 13:06:29 [795] found lib: libdrv_hikarisoft_isdb.so
2014-06-07 13:06:29 [795]
2014-06-07 13:06:29 [795] Scanning for plugins
2014-06-07 13:06:29 [795] found lib: libencoder_plugin.so
2014-06-07 13:06:29 [795] MediaAVPlugin: MPEG Encoder
2014-06-07 13:06:29 [795] Copyright: (C) Tpe 2011/2012
2014-06-07 13:06:29 [795]
2014-06-07 13:06:29 [795] Starting up device manager
2014-06-07 13:06:29 [795] Setting permission of /dev/dvb to 777
2014-06-07 13:06:29 [795] This is to avoid problems if TV Applications are started as another user
2014-06-07 13:06:29 [795] as seen on eg. Synology NAS Systems where tvheadend is unable to read
2014-06-07 13:06:29 [795] /dev/dvb and because of that would not detect the TV tuner
2014-06-07 13:06:29 [795] scanning devices done
2014-06-07 13:06:29 [795] attached devices:
2014-06-07 13:06:29 [795] registering ID: 0
2014-06-07 13:06:29 [796] Autostarting scripts in /etc/sundtek/
2014-06-07 13:06:29 [796] executed all available items
2014-06-07 13:06:29 [795] Using dynamic configuration
2014-06-07 13:06:29 [795] DTV1 Transfer is set to: Bulk
2014-06-07 13:06:30 [795] Using VCR remote control layout
2014-06-07 13:06:30 [795] Allocation using pg for type 65678
2014-06-07 13:06:30 [795] attaching DVB-T, DVB-C, DVB-T2
2014-06-07 13:06:30 [795] demodulator successfully attached (DVB-C)!
2014-06-07 13:06:31 [795] This device uses the third generation Tuner
2014-06-07 13:06:31 [795] Power up demodulator
2014-06-07 13:06:32 [795] Allocation using pg for type 16
2014-06-07 13:06:32 [795] SETTING PAL/SECAM
2014-06-07 13:06:32 [795] SETTING PAL/SECAM
2014-06-07 13:06:32 [795] attaching video decoder
2014-06-07 13:06:32 [795] SETTING PAL/SECAM
2014-06-07 13:06:32 [795] Setting frequency: 245250000
2014-06-07 13:06:32 [795] Setting analogTV Parameters
2014-06-07 13:06:32 [795] Setting PAL-B
2014-06-07 13:06:32 [795] attaching radio module
2014-06-07 13:06:33 [795] requesting to tune to frequency: 87900000 4
2014-06-07 13:06:33 [795] configure urbs for bulk
2014-06-07 13:06:33 [795] Registering OSS emulation
2014-06-07 13:06:34 [795] registering: adapter1/0
2014-06-07 13:06:34 [795] registered virtual: /dev/dvb/adapter1/frontend0
2014-06-07 13:06:34 [795] registered virtual: /dev/dvb/adapter1/demux0
2014-06-07 13:06:34 [795] registered virtual: /dev/dvb/adapter1/dvr0
2014-06-07 13:06:34 [795] registered virtual: /dev/dsp0
2014-06-07 13:06:34 [795] registered virtual: /dev/video1
2014-06-07 13:06:34 [795] registered virtual: /dev/vbi0
2014-06-07 13:06:34 [795] registered virtual: /dev/radio0
2014-06-07 13:06:34 [795] registered virtual: /dev/rds0
2014-06-07 13:06:34 [795] Initializing Remote Control Support
2014-06-07 13:06:34 [795] This system does not support memory mapped USB transfers
2014-06-07 13:06:34 [795] Once your system reaches the latest kernel version the
2014-06-07 13:06:34 [795] performance will increase automatically
2014-06-07 13:06:34 [795] registered virtual: /dev/mediainput0
2014-06-07 13:06:34 [795] Trying to load ffmpeg codecs
2014-06-07 13:06:37 [795] Codecs successfully loaded
2014-06-07 13:06:37 [795] AnalogTV encoding is available
2014-06-07 13:06:37 [795] Initialized MediaTV Pro III USB (EU)
2014-06-07 13:06:37 [795] Driver loaded within 7936 milliseconds
2014-06-07 13:06:37 [795] Initial devicescan done, switching detection mode
2014-06-07 13:06:38 [795] mute fm radio
2014-06-07 13:06:38 [795] Switching to Digital TV
2014-06-07 13:06:39 [795] Power up demodulator
2014-06-07 13:06:40 [795] SETTING DVB-C
2014-06-07 13:06:41 [795] Switching to analogTV
2014-06-07 13:06:41 [795] SETTING PAL/SECAM
2014-06-07 13:06:41 [795] SETTING PAL/SECAM
2014-06-07 13:06:41 [795] analog TV read request :0
2014-06-07 13:06:41 [795] No frames allocated, choosing default 5fps, probably read request
2014-06-07 13:06:41 [795] Initializing data transfer
2014-06-07 13:06:42 [795] start encoder
2014-06-07 13:06:42 [795] setting default bitrate 8mbit
2014-06-07 13:06:42 [854] Starting audio processor (PID 854)
2014-06-07 13:06:42 [854] initializing audio in audio processor
2014-06-07 13:06:42 [795] could not open audio codec 86016
2014-06-07 13:06:42 [795] unable to register encoder
2014-06-07 13:06:57 [795] Enabling Standby
2014-06-07 13:07:32 [795] Waking up device
2014-06-07 13:07:32 [795] Setting frequency: 245250000
2014-06-07 13:07:32 [795] Setting analogTV Parameters
2014-06-07 13:07:32 [795] Setting PAL-B
2014-06-07 13:07:32 [795] analog TV read request :4
2014-06-07 13:07:33 [795] Initializing data transfer
2014-06-07 13:07:33 [795] start encoder
2014-06-07 13:07:33 [795] setting default bitrate 8mbit
2014-06-07 13:07:33 [795] could not open audio codec 86016
2014-06-07 13:07:33 [795] unable to register encoder
2014-06-07 13:07:33 [795] Setting frequency: 175250000
2014-06-07 13:07:33 [795] Setting analogTV Parameters
2014-06-07 13:07:33 [795] Setting PAL-B
2014-06-07 13:07:35 [795] analog TV read request :4
2014-06-07 13:07:36 [795] Initializing data transfer
2014-06-07 13:07:36 [795] start encoder
2014-06-07 13:07:36 [795] setting default bitrate 8mbit
2014-06-07 13:07:36 [795] could not open audio codec 86016
2014-06-07 13:07:36 [795] unable to register encoder
2014-06-07 13:07:36 [795] Setting frequency: 175250000
2014-06-07 13:07:36 [795] Setting analogTV Parameters
2014-06-07 13:07:36 [795] Setting PAL-B
2014-06-07 13:07:39 [795] analog TV read request :4
2014-06-07 13:07:40 [795] Initializing data transfer
2014-06-07 13:07:40 [795] start encoder
2014-06-07 13:07:40 [795] setting default bitrate 8mbit
2014-06-07 13:07:40 [795] could not open audio codec 86016
2014-06-07 13:07:40 [795] unable to register encoder
2014-06-07 13:07:40 [795] Setting frequency: 175250000
2014-06-07 13:07:40 [795] Setting analogTV Parameters
2014-06-07 13:07:40 [795] Setting PAL-B
2014-06-07 13:07:43 [795] analog TV read request :4
2014-06-07 13:07:44 [795] Initializing data transfer
2014-06-07 13:07:44 [795] start encoder
2014-06-07 13:07:44 [795] setting default bitrate 8mbit
2014-06-07 13:07:44 [795] could not open audio codec 86016
2014-06-07 13:07:44 [795] unable to register encoder
2014-06-07 13:07:44 [795] Setting frequency: 175250000
2014-06-07 13:07:44 [795] Setting analogTV Parameters
2014-06-07 13:07:44 [795] Setting PAL-B
2014-06-07 13:07:47 [795] analog TV read request :4
2014-06-07 13:07:48 [795] Initializing data transfer
2014-06-07 13:07:48 [795] start encoder
2014-06-07 13:07:48 [795] setting default bitrate 8mbit
2014-06-07 13:07:48 [795] could not open audio codec 86016
2014-06-07 13:07:48 [795] unable to register encoder
2014-06-07 13:07:48 [795] Setting frequency: 175250000
2014-06-07 13:07:48 [795] Setting analogTV Parameters
2014-06-07 13:07:48 [795] Setting PAL-B
2014-06-07 13:07:51 [795] analog TV read request :4
2014-06-07 13:07:52 [795] Initializing data transfer
2014-06-07 13:07:52 [795] start encoder
2014-06-07 13:07:52 [795] setting default bitrate 8mbit
2014-06-07 13:07:52 [795] could not open audio codec 86016
2014-06-07 13:07:52 [795] unable to register encoder
2014-06-07 13:07:52 [795] Setting frequency: 175250000
2014-06-07 13:07:52 [795] Setting analogTV Parameters
2014-06-07 13:07:52 [795] Setting PAL-B
2014-06-07 13:07:55 [795] analog TV read request :4
2014-06-07 13:07:56 [795] Initializing data transfer
2014-06-07 13:07:56 [795] start encoder
2014-06-07 13:07:56 [795] setting default bitrate 8mbit
2014-06-07 13:07:56 [795] could not open audio codec 86016
2014-06-07 13:07:56 [795] unable to register encoder
2014-06-07 13:07:56 [795] Setting frequency: 175250000
2014-06-07 13:07:56 [795] Setting analogTV Parameters
2014-06-07 13:07:56 [795] Setting PAL-B
2014-06-07 13:07:59 [795] analog TV read request :4
2014-06-07 13:08:00 [795] Initializing data transfer
2014-06-07 13:08:00 [795] start encoder
2014-06-07 13:08:00 [795] setting default bitrate 8mbit
2014-06-07 13:08:00 [795] could not open audio codec 86016
2014-06-07 13:08:00 [795] unable to register encoder
2014-06-07 13:08:00 [795] Setting frequency: 175250000
2014-06-07 13:08:00 [795] Setting analogTV Parameters
2014-06-07 13:08:00 [795] Setting PAL-B
2014-06-07 13:08:03 [795] analog TV read request :4
2014-06-07 13:08:04 [795] Initializing data transfer
2014-06-07 13:08:04 [795] start encoder
2014-06-07 13:08:04 [795] setting default bitrate 8mbit
2014-06-07 13:08:04 [795] could not open audio codec 86016
2014-06-07 13:08:04 [795] unable to register encoder
2014-06-07 13:08:04 [795] Setting frequency: 175250000
2014-06-07 13:08:04 [795] Setting analogTV Parameters
2014-06-07 13:08:04 [795] Setting PAL-B
2014-06-07 13:08:21 [795] Enabling Standby
Man sieht, dass er sich auf die richtige Frequenz eintunet (175,25 MHz), aber irgendwelche Probleme mit dem Codec "86016" hat. Das sollte eigentlich der MP2 Encoder sein, oder? (Soweit konnte ich das in den ffmpeg Quellen nachvollziehen.) Was fehlt hier? Hier komme ich einfach nicht weiter. Eigentlich sollte der Encoder doch in den Bibliotheke vorhanden sein (siehe oben package.mk). Bitte helft mir. - Danke.