1
Sundtek MediaTV Pro / Re:Raspberry und Samsung Smart TV
« am: Januar 03, 2015, 12:33:20 Vormittag »Code: [Auswählen]
Meine m3u Datei sieht so aus
[code]#EXTM3U
#EXTINF:-1,Das Erste HD
http://192.168.178.35:9981/stream/channel/e254ae036089568f21e46340ad25280b
#EXTINF:-1,ZDF HD
http://192.168.178.35:9981/stream/channel/6dc1d1e6e40c5a18eb5429939f844ffb
Ich benutze aber auch die neuste Version. Also die aus Git, weil ich mit den anderen Versionen das nicht zum Laufen bekommen habe.
Bei mir läuft es jetzt mittlerweile sehr gut und werde meine Schritte dokumentieren!
Doku:
Zuerst stelle ich die Taktung auf High und ändere das Passwort
Code: [Auswählen]
sudo raspi-config
Danach bringe ich alles auf den neusten Stand
Code: [Auswählen]
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo rpi-update
Nun befreie ich meinen Raspberry von allem überflüssigen. Falls man den X-Server braucht, sollte man das überspringen!
Code: [Auswählen]
sudo aptitude -y purge gpicview xarchiver xpdf galculator scratch dillo midori netsurf-gtk omxplayer alsa-base alsa-utils penguinspuzzle python-pygame lxde-core lxde-common lxde-icon-theme lxinput lxmenu-data lxpolkit lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal lxappearance lightdm lightdm-gtk-greeter openbox ttf-dejavu-core fontconfig fontconfig-config fonts-freefont-ttf wpagui x11-common dbus-x11 desktop-base desktop-file-utils hicolor-icon-theme leafpad xdg-utils xauth gnome-themes-standard gtk2-engines raspberrypi-artwork wolfram-engine minecraft-pi python-minecraftpi
sudo dpkg --configure -a
Da ich kein ipv6 brauche, schalte ich den Dienst ab.
Code: [Auswählen]
sudo echo "net.ipv6.conf.all.disable_ipv6=1" > /etc/sysctl.d/disableipv6.conf
sudo echo 'blacklist ipv6' >> /etc/modprobe.d/blacklist
sudo sed -i '/::/s%^%#%g' /etc/hosts
Nun installiert man die Treiber.
Code: [Auswählen]
cd
wget http://www.sundtek.de/media/sundtek_netinst.sh
chmod 755 sundtek_netinst.sh
sudo ./sundtek_netinst.sh
Und stelle den Stick auf DVBC ein.
Code: [Auswählen]
/opt/bin/mediaclient --setdtvmode=DVBC
Jetzt bereite ich den Stick für das Kompilieren von tvheadend vor.
Code: [Auswählen]
sudo apt-get install unzip libcurl4-openssl-dev pkg-config git build-essential dvb-apps gcc-4.7
Hole mir die neuste Version von Github.
Code: [Auswählen]
git clone https://github.com/tvheadend/tvheadend.git
Nun kompiliere ich tvheadend und installiere es zugleich.
Code: [Auswählen]
cd tvheadend
export CC=gcc-4.7
./configure && make && sudo make install
Danach erstelle ich noch einen Benutzer für tvheadend.
Code: [Auswählen]
adduser tvheadend
Dann füge ich die Datei sundtek.conf noch in /etc/ ein
Code: [Auswählen]
# ----- GLOBAL SECTION -----
#Set loglevel for logging to /var/log/mediasrv.log
#autoupdate=[on|off] #enable automatic driver update, default off
#loglevel=[off|min|full] #default: off
#max .. little bit more debug
#pluginpath=/path/to/drivers #set path to drivers
#dvb_api_version=x.y #default API version will be parsed from
#/usr/include/linux/dvb/version.h, if no such file is
#available the latest internally supported API version will be
#used (which will be quite new)
#audio_skip_bytes=N #when changing analogTV channels,
#skip N bytes to suppress audio noise
bulk_notification=on #default off, bulk_notification will only trigger device_attach once
#after the the first device scan when the driver is started up
#after this first scan, the notification will be triggered
#normally again for each device.
#
#for example when 2 devices are attached to the system only one
#notification will be triggered initially, any at a later time
#attached device will generate another device_attach notification
#by default each device will call the script which is set up with
#device_attach
#use_tvvideo=[on|off] #use /dev/tvvideoN instead of /dev/video
#this works around a new Adobe Flash bug in 2012, where flash crashes
#if files (/dev/videoN) other than /dev/video0 are available
use_hwpidfilter=on #For DVB-C, DVB-T, DVB-S/S2
#enable PID filter, please be careful with that, there are only 15 HW Pid filters available
#when more than 15 pids are set up the pid filter will be disabled automatically
#dmhwpidfilter=[on|off] #default on, in some cases off might be useful to disable hw pid filter for settopboxes
#if you get a black image when capturing a TV channel and watching another channel on the
#same transponder - try this option and reboot
#usb_transaction_delay=[0-20] #throttle the USB setup transactions, this can solve problems with weak USB stacks for
#example for embedded boards, unit is milliseconds
#usb_timeout=[0 - N] #USB timeout for each transaction in milliseconds, 0 default infinite
#voltage_tone_off=[1 or 0] #0 .. default, normal behaviour
#1 .. force DVB-S/S2 to not use any Voltage or Tone (ignore any user parameters)
ir_disabled=1 #0 .. enable remote control polling, the driver will permanently check for remote control keys
#1 .. disable remote control polling, might fix bugs with weak USB stacks on embedded boards
#
#Enable listening on network
#enablenetwork=[on|off] #default: off
#Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0
#first_adapter=5
#Lowest videodevice number to start with, e.g. /dev/video5
#first_videodev=5
#Call attach script when new device appears
#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID
#Call detach script when device disappears
#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID
#Dreambox especially for DM800HD (not SE!)
#vtuner_acceleration=[on|off] #default off, accelerate Dreambox 800HD datatransfer between USB Stick and
#DM800HD
# ----- Section for adapter with [SERIALNUMBER] -----
#Get adapter serial number with /opt/bin/mediaclient -e
#[SERIALNUMBER]
#Description register as dreambox tuner
#dreambox_support_fe1=[on|off] #default: off
#Infrared protocol to use
#ir_protocol=[RC5|NEC|RC6] #default: NEC
#Keymap to use, e.g. "/lib/udev/rc_keymaps/vp702x"
#rcmap=[PATH_TO_KEYMAP] #default: keymap which comes with the device
#Choose initial DVB mode for hybrid DVB-T/DVB-C devices only
#initial_dvb_mode=[DVBC|DVBT]
#Call attach script when new device appears
#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID
#Call detach script when device disappears
#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID
#disable_analogtv=[0|1] #disable initialization of analogTV Frontend
#Initial Audio Volume level for DVB-C/T Hybrid devices
#volume=[0-127] #default: 118, this applies to DVB-C/T/AnalogTV devices
#volume1=[0-255] #default: 219, this applies to DVB-T/AnalogTV devices
# please note too high volume might overdrive the audio IC
# 219 or lower is recommended, although it's based on your
# situation; some devices only support that for FM-Radio
#soft_volume=[0-100] #software volume adjustment, some devices don't support
# hardware adjustment, v4l2-ctl -l -d /dev/videoN will show
# up if software volume adjustment is available, values
# higher than 100 will amplify the audiostream
# WSS callback (see http://en.wikipedia.org/wiki/Widescreen_signaling)
# trigger script when the videoformat changes between 16:9 or 4:3
#wss_callback=[scriptname]
# WSS_4_3_FULL
# WSS_14_9_LETTERBOX_CENTRE
# WSS_14_9_LETTERBOX_TOP
# WSS_16_9_LETTERBOX_CENTRE
# WSS_16_9_LETTERBOX_TOP
# WSS_16_9_LETTERBOX_DEEPER
# WSS_14_9_FULL_HEIGHT_4_3
# WSS_16_9_FULL_HEIGHT_16_9
# WSS_UNABLE_TO_DEMODULATE
#Timeout in ms after that WSS_UNABLE_TO_DEMODULATE will be called
#wss_demodulation_timeout=[MILLISECONDS]
#vtuner_skip0=vtuner0 # skip /dev/misc/vtuner0 can also be vtunerN
#vtuner_skip1=vtuner1 # skip /dev/misc/vtuner1 can also be vtunerN
#ts_settle_timeout=N # block sending TS data to the application for N milliseconds (0-4000), default 0
#fe_helper=/path/to/channellist # override frequency setup and use parameters from channellist
# VDR channellists can be used here (eg. created by w_scan)
# this somewhat guarantees high speed channel switching
# when used with a lousy player
# Astra 19.2 Channellist: 1)
#disable_crc=on # disable driver internal CRC check for PSI tables
#standby_timeout=0-50000 # set standby timeout default is 15 Seconds (15000) value in milliseconds
### UNICABLE ###
#unicable_frequency=N # Unicable Frequency
#unicable_satcr=N # SaTCR
#alsa_blocking=off # default is on, off might be able to avoid some issues with
# weird alsa drivers
# following is the network section, the 2 given ip addresses are IPTV sample servers
#[NETWORK]
#device=192.168.0.1:0
#device=192.168.0.1:1
Und die Datei tvheadend in /etc/init.d/
Code: [Auswählen]
#!/bin/bash
### BEGIN INIT INFO
# Provides: tvheadend
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1
# Short-Description: start/stop tvheadend Server
### END INIT INFO
TVHNAME="tvheadend"
TVHBIN="/usr/local/bin/tvheadend"
TVHUSER="tvheadend"
TVHGROUP="tvheadend"
PIDFILE=/var/run/$TVHNAME.pid
start() {
if [ -e $PIDFILE ]; then
PID=$(ps ax | grep -v grep | grep -w $(cat $PIDFILE) | awk '{print $1}')
if [ -n "$PID" ]; then
echo "$TVHNAME already running (pid $PID)."
exit 1
fi
fi
echo -n "Starting tvheadend: "
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user ${TVHUSER} --exec ${TVHBIN} -- \
-u ${TVHUSER} -g ${TVHGROUP} -f -C
echo "Done."
}
stop() {
if [ -e $PIDFILE ]; then
PID=$(ps ax | grep -v grep | grep -w $(cat $PIDFILE) | awk '{print $1}')
if [ -n "$PID" ]; then
echo -n "Stopping $TVHNAME: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name ${TVHNAME}
echo "Done."
else
echo "$TVHNAME is not running."
fi
else
echo "$TVHNAME is not running."
fi
}
status() {
if [ -e $PIDFILE ]; then
PID=$(ps ax | grep -v grep | grep -w $(cat $PIDFILE) | awk '{print $1}')
if [ -n "$PID" ]; then
echo "$TVHNAME is running (pid $PID)."
else
echo "$TVHNAME is not running."
[ -e $PIDFILE ] && exit 1 || exit 3
fi
fi
}
case "$1" in
start) start ;;
stop) stop ;;
restart) stop && sleep 2 && start ;;
*) echo "Usage: $0 [start|stop|restart|status]" && exit 1 ;;
esac
exit 0
Als letztes noch tvheadend in den Autostart
Code: [Auswählen]
chmod +x /etc/init.d/tvheadend
update-rc.d tvheadend defaults
/etc/init.d/tvheadend start
Nun starte ich den Raspberry neu und erreiche mit
http://raspberry:9981/ das Webinterface von tvheadend!
Quellen: http://raspberry.tips/raspberrypi-tutorials/raspberry-pi-live-fernsehen-mit-tvheadend/
http://raspberry.tips/raspberrypi-tutorials/raspberry-pi-performance-tuning-und-tweaks/
Die Einstellung von TVheadend und Smart IPTV folgt noch![/code]