Autor Thema: [ubuntu] Howto: vdr 2.2.0 mit intel vaapi und deinterlacing  (Gelesen 4983 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline mtron

  • Server-Admin
  • *
  • Beiträge: 1514
    • some debs
Servus!

2014 hat intel die Specs und Sample Code für gute De-Interlacing Algorithmen ihrer auf die CPU's aufgesetzten Grafik Einheiten  veröffentlicht. Nun habe ich softhddevice mit Motion Adaptive De-interlacing (das nvidia Pendant wäre ca. temporal Deinterlacing) auf einem Intel Haswell i5 zum laufen gebracht und das in sehr guter Qualität  ;Beifall

Benötigen tut man das De-interlacing vor allem für SD Sender (in 576i) und HD Sender wie ServusTV HD (1080i). Bis jetzt hat softhddevice auf intel nur einen sehr beschränkten BOB Deinterlacer an Board, aber mit dem softhddevice vpp v9 Patch kann man jetzt endlich mit inbuild intel Grafik gute vdr boxen bauen  :jo

Hier eine Anleitung für ubuntu trusty 14.04 LTS mit vdr und softhddevice (+patch) vom git
- VAAPI Treiber auf 0.36 updaten und ffmpeg installieren

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install ffmpeg libdvdread-dev libva-dev vainfo

- vdr build dependencies installieren und sourcen bauen (letzte Version von ftp://ftp.tvdr.de/vdr/Developer )

VDR 2.2.0 Sourcen unter $HOME entpacken und die Make.config anpassen. Ich baue und betreibe die VDR Version aus einem Ordner in der alle VDR relevanten libs bin und config liegt.
VIDEODIR     = /home/<username>/vdr  anpassen! Die Vorlage stammt vom Make.config.template aus dem Source Archiv. Anpassen muss man die VIDEODIR Zeile.

Make.config für vdr 2.2.0
#
#
# User defined Makefile options for the Video Disk Recorder
#
# Copy this file to 'Make.config' and change the parameters as necessary.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 3.2 2015/01/30 15:18:47 kls Exp $

### The C compiler and options:

CC       = gcc
CFLAGS   = -g -O3 -Wall

CXX      = g++
CXXFLAGS = -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses

# Use 'make M32=1 ...' to build a 32-bit version of VDR on a 64-bit machine:
ifdef M32
CFLAGS   += -m32
CXXFLAGS += -m32
endif

### The directory environment:

# Overrides for preset/legacy configurations:

LOCDIR       = $(CWD)/locale
PLUGINDIR    = $(CWD)/PLUGINS
ifndef PLUGIN # don't overwrite for plugins with old makefiles
LIBDIR       = $(PLUGINDIR)/lib
endif
HDRDIR       = $(CWD)/include
VIDEODIR     = /home/<user>/work/vdr
CACHEDIR     = $(VIDEODIR)
CONFDIR      = $(VIDEODIR)/config
ARGSDIR      = $(CONFDIR)/conf.d
MANDIR       = $(CONFDIR)/man
RESDIR       = $(VIDEODIR)


# Use this if you want to have a central place where you configure compile time
# parameters for plugins:
#PLGCFG = $(CONFDIR)/plugins.mk

### The remote control:

#LIRC_DEVICE = /var/run/lirc/lircd

### Define if you want vdr to not run as root:
#VDR_USER = vdr

### Fallback for plugins with old makefiles:
ifdef PLUGIN
CFLAGS   += -fPIC
CXXFLAGS += -fPIC
endif
[close]


- vdr build-dependencies installieren und user in die video gruppe hinzufügen (<username> ersetzen)
sudo apt-get build-dep vdr
sudo usermod -aG video <username>

Jetzt im Terminal in den vdr 2.2.0 Ordner wechseln und VDR bauen.
make
Falls man die make.config von oben verwendet wird der build so gemacht als würde man "make ONEDIR=1 LCLBLD=1" mit dem standard template auftrufen.

Für die Plugins habe ich mir ein Bash Script geschrieben das folgende Plugins vom git holt (oder updatet falls diese schon existieren) und diese baut. Folgende plugins wären meiner Meinung nach ein "minimal vdr"

epgsearch => EPG durchsuchen und Timer Programmieren
live => Web-Frontend
osdteletext => Teletext
softhddevice => video Ausgabe via intel vaapi
streamdev => Streaming vom VDR auf andere Computer, Handys, usw.
skinflatplus => Minimalistisches Hicolor Skin
xvdr => vdr als xbmc DVB Provider

vdr-builder Script
#! /bin/bash
# @NAME: vdr-builder
# @VERSION: 0.0.5
# @INFO: vdr and vdr-plugins development versions builder and update script
# @SOURCE: http://www.dvbcube.org/index.php?topic=31066.msg185074
#
## 1. Install dependencies (only once)
#  sudo apt-get update && sudo apt-get dist-upgrade
#  sudo apt install --no-install-recommends vdr-dev libjansson-dev libsqlite3-dev wget build-essential git
#
## 2. Initialize git (only once)
#  git config --global user.email "user@mail.com"
#  git config --global user.name "username"
#
## 3. create $HOME/work/vdr
#  Place this script in there, make executable and run it
#
#  Comment out plugins you don't want to use on the bottom of this script
#
#  If you need to apply patches to your plugins (live-compat softhddevice vaapi)
#  start the script to run the initial checkout. The script will tell you when it's time to patch.
#
## 4. Done!
#  Restart VDR and run 'tail -f /var/log/syslog'


## Config Start
# VDR Version to build. See ftp://ftp.tvdr.de/vdr/Developer
VDRVER="2.2.0"
# see http://www.saunalahti.fi/~rahrenbe/vdr/femon/ for current version
FEMONVER="2.1.1"
## Config End

## Static & generated Variables
# Full path to VDRs Make.Config. Edit to your needs!
MAKECONFIG=/home/$USER/work/vdr/Make.config
# Full path to the build VDR sources
if [ ! -d /home/$USER/work/vdr/vdr-$VDRVER ];
then
   echo "will build vdr-$VDRVER"
else
   VDRDIR=/home/$USER/work/vdr/vdr-$VDRVER
fi
# Full path to the VDR PLUGINS sources
VDRPLUGDIR="/home/$USER/work/vdr/vdr-$VDRVER/PLUGINS/src"

########################################################
## Adjust plugins to build at the bottom of this file ##
########################################################

function checkconfig () {
if [ ! -f "$VDRDIR/Make.config"  ];
then
    echo "Copying Make.Config to $VDRDIR"
    cp "$MAKECONFIG" "$VDRDIR/Make.config"
fi
}

function buildvdr () {
if [ ! -d $HOME/work/vdr  ];
then
    echo "Creating working directory"
    mkdir -p $HOME/work/vdr && cd $HOME/work/vdr
else
   cd $HOME/work/vdr
fi

if [ ! -d $HOME/work/vdr/vdr-$VDRVER  ];
then
    echo "Downloading vdr-$VDRVER"
    cd $HOME/work/vdr
    wget ftp://ftp.tvdr.de/vdr/vdr-2.2.0.tar.bz2
    tar xjvf vdr-$VDRVER.tar.bz2
    VDRDIR=/home/$USER/work/vdr/vdr-$VDRVER
   checkconfig
    cd $VDRDIR
    make
    VDRDIR=/home/$USER/work/vdr/vdr-$VDRVER
else
   cd $VDRDIR
   echo "vdr-$VDRVER sources found"
   echo "clean vdr source dir and rebuild [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
      make distclean
      make
   fi
fi
}

function checkdep () {
DEPS=$(echo {vdr-dev,libjansson-dev,libsqlite3-dev,wget,build-essential,git})
for i in $DEPS ; do
    dpkg-query -W -f='${Package}\n' | grep ^$i$ > /dev/null
    if [ $? != 0 ] ; then
        echo "Installing build dependencies ..."
        sudo apt-get install --no-install-recommends $i -y > /dev/null
    fi
done 
}


function cleanplugins () {
echo "clean plugins build cache [y/n]?"; read ans
if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
 cd $VDRDIR
 make clean-plugins
fi
}

function build () {
echo "Apply patches to plugins now"
echo "build plugins now [y/n]?"; read ans
if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
 cd "$VDRDIR"
 make plugins
 # TODO: needed for some plugins with new makefile system
 # but throws error if plugin makefile already copied the .so file
 make install-plugins
 echo "Plugin build is done. If no failed plugins Line is shown above restart vdr and enjoy."
fi
if [ $ans = n -o $ans = N -o $ans = no -o $ans = No -o $ans = NO ]; then
 echo "update-plugins is done. You might want to run 'make plugins' in $VDRDIR now."
fi
}

function sc () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-sc ]; then
    echo "running initial checkout for vdr-sc plugin ..."
    git clone https://github.com/3PO/vdr-plugin-sc.git
    ln -s vdr-plugin-sc sc
else
    echo "updating nopacity ..."
    if [ ! -d ""$VDRPLUGDIR"/vdr-plugin-sc" ]; then
        ln -s vdr-plugin-sc sc
    fi
    cd "$VDRPLUGDIR"/vdr-plugin-sc
     if [[ -n $(git diff --exit-code) ]]; then
       echo "there are local changes"
       git stash save
       git pull
       echo "re-apply custom changes to sc [y/n/d]?"; read ans
        if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
          git stash apply
        fi
        if [ $ans = "d" -o $ans = "D" -o $ans = "diff" -o $ans = "Diff" -o $ans = "DIFF" ]; then
          git stash show
          echo "re-apply custom changes to sc [y/n]?"; read ans
          if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
            git stash apply
          fi
     fi
     else
       echo "there are no local changes. running git pull"
       git pull
     fi
fi
}

function nopacity () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/skin-nopacity ]; then
    echo "running initial checkout for skin nopacity ..."
    git clone git://projects.vdr-developer.org/skin-nopacity.git
    ln -s skin-nopacity nopacity
else
    echo "updating nopacity ..."
    if [ ! -d ""$VDRPLUGDIR"/nopacity" ]; then
        ln -s skin-nopacity nopacity
    fi
    cd "$VDRPLUGDIR"/skin-nopacity
     if [[ -n $(git diff --exit-code) ]]; then
       echo "there are local changes"
       git stash save
       git pull
       echo "re-apply custom changes to nopacity [y/n/d]?"; read ans
        if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
          git stash apply
        fi
        if [ $ans = "d" -o $ans = "D" -o $ans = "diff" -o $ans = "Diff" -o $ans = "DIFF" ]; then
          git stash show
          echo "re-apply custom changes to nopacity [y/n]?"; read ans
          if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
            git stash apply
          fi
     fi
     else
       echo "there are no local changes. running git pull"
       git pull
     fi
fi
}

function epgsearch () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-epgsearch ]; then
 echo "running initial checkout for plugin epgsearch ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-epgsearch.git
 ln -s vdr-plugin-epgsearch epgsearch
else
 echo "updating epgsearch ..."
 if [ ! -d ""$VDRPLUGDIR"/epgsearch" ]; then
  ln -s vdr-plugin-epgsearch epgsearch
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-epgsearch
  if [[ -n $(git diff --exit-code) ]]; then
   echo "there are local changes"
   git stash save
   git pull
   echo "re-apply custom changes to epgsearch [y/n/d]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ];then
    git stash show
    echo "re-apply custom changes to epgsearch [y/n]?"; read ans
    if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
     git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function live () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-live ]; then
 echo "running initial checkout for plugin live ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-live.git
 ln -s vdr-plugin-live live
else
 echo "updating live ..."
 if [ ! -d ""$VDRPLUGDIR"/live" ]; then
  ln -s vdr-plugin-live live
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-live
  if [[ -n $(git diff --exit-code) ]]; then
   echo "there are local changes"
   git stash save
   git pull
   echo "re-apply custom changes to live [y/n/d]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to live [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function osdteletext () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-osdteletext ]; then
 echo "running initial checkout for plugin osdteletext ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-osdteletext.git
 ln -s vdr-plugin-osdteletext osdteletext
else
 echo "updating osdteletext ..."
 if [ ! -d ""$VDRPLUGDIR"/osdteletext" ]; then
  ln -s vdr-plugin-osdteletext osdteletext
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-osdteletext
  if [[ -n $(git diff --exit-code) ]]; then
   echo "there are local changes"
   git stash save
   git pull
   echo "re-apply custom changes to osdteletext [y/n/d]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to osdteletext [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function tvguide () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-tvguide ]; then
 echo "running initial checkout for plugin tvguide ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-tvguide.git
 ln -s vdr-plugin-tvguide tvguide
else
 echo "updating tvguide ..."
 if [ ! -d ""$VDRPLUGDIR"/tvguide" ]; then
  ln -s vdr-plugin-tvguide tvguide
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-tvguide
  if [[ -n $(git diff --exit-code) ]]; then
   echo "there are local changes"
   git stash save
   git pull
   echo "re-apply custom changes to tvguide [y/n/d]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to tvguide [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function softhddevice () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-softhddevice ]; then
 echo "running initial checkout for plugin softhddevice ..."
 #git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
 git clone -b vpp_menu_integration https://github.com/pesintta/vdr-plugin-softhddevice.git
 ln -s vdr-plugin-softhddevice softhddevice
else
 echo "updating softhddevice ..."
 if [ ! -d ""$VDRPLUGDIR"/softhddevice" ]; then
  ln -s vdr-plugin-softhddevice softhddevice
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-softhddevice
  if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to softhddevice [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to softhddevice [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function streamdev () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-streamdev ]; then
 echo "running initial checkout for plugin streamdev ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-streamdev.git
 ln -s vdr-plugin-streamdev streamdev
else
 echo "updating streamdev ..."
 if [ ! -d ""$VDRPLUGDIR"/streamdev" ]; then
  ln -s vdr-plugin-streamdev streamdev
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-streamdev
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to streamdev [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to streamdev [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function play () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-play ]; then
 cd "$VDRPLUGDIR"
 echo "running initial checkout for plugin play ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-play.git
 ln -s vdr-plugin-play play
else
 echo "updating play ..."
 if [ ! -d ""$VDRPLUGDIR"/play" ]; then
  ln -s vdr-plugin-play play
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-play
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to play [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to play [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function skinflatplus () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/plg-skinflatplus ]; then
 cd "$VDRPLUGDIR"
 echo "running initial checkout for skin FlatPlus ..."
 git clone git://projects.vdr-developer.org/skin-flatplus.git
 ln -s skin-flatplus skinflatplus
else
 echo "updating skin FlatPlus ..."
 if [ ! -d ""$VDRPLUGDIR"/skinflatplus" ]; then
  ln -s skin-flatplus skinflatplus
 fi
 cd "$VDRPLUGDIR"/skin-flatplus
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to skin FlatPlus [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to skin FlatPlus [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function restfulapi () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-restfulapi ]; then
 cd "$VDRPLUGDIR"
 echo "running initial checkout for plugin play ..."
 git clone git://github.com/yavdr/vdr-plugin-restfulapi.git
 ln -s vdr-plugin-restfulapi restfulapi
else
 echo "updating restfulapi ..."
 if [ ! -d ""$VDRPLUGDIR"/restfulapi" ]; then
  ln -s vdr-plugin-restfulapi restfulapi
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-restfulapi
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to restfulapi [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to restfulapi [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function xvdr () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-xvdr ]; then
 cd "$VDRPLUGDIR"
 echo "running initial checkout for xvdr ..."
 git clone git://github.com/pipelka/vdr-plugin-xvdr.git
 ln -s vdr-plugin-xvdr xvdr
else
 echo "updating xvdr ..."
 if [ ! -d ""$VDRPLUGDIR"/xvdr" ]; then
  ln -s vdr-plugin-xvdr xvdr
 fi
 cd "$VDRPLUGDIR"/xvdr
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to xvdr [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to xvdr [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function tvscraper () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/vdr-plugin-tvscraper ]; then
 cd "$VDRPLUGDIR"
 echo "running initial checkout for plugin tvscraper ..."
 git clone git://projects.vdr-developer.org/vdr-plugin-tvscraper.git
 ln -s vdr-plugin-tvscraper tvscraper
else
 echo "updating tvscraper ..."
 if [ ! -d ""$VDRPLUGDIR"/tvscraper" ]; then
  ln -s vdr-plugin-tvscraper tvscraper
 fi
 cd "$VDRPLUGDIR"/vdr-plugin-tvscraper
 if [[ -n $(git diff --exit-code) ]]; then
  echo "there are local changes"
  git stash save
  git pull
  echo "re-apply custom changes to tvscraper [y/n/d]?"; read ans
  if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
   git stash apply
   fi
   if [ $ans = d -o $ans = D -o $ans = diff -o $ans = Diff -o $ans = DIFF ]; then
   git stash show
   echo "re-apply custom changes to tvscraper [y/n]?"; read ans
   if [ $ans = y -o $ans = Y -o $ans = yes -o $ans = Yes -o $ans = YES ]; then
    git stash apply
    fi
   fi
  else
   echo "there are no local changes. running git pull"
   git pull
  fi
fi
}

function femon () {
cd "$VDRPLUGDIR"
if [ ! -d "$VDRPLUGDIR"/femon-"$FEMONVER" ]; then
 cd "$VDRPLUGDIR"
 echo "starting initial download for plugin femon ..."
 wget http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/vdr-femon-"$FEMONVER".tgz
 tar zxf vdr-femon-"$FEMONVER".tgz
 rm vdr-femon-"$FEMONVER".tgz
 ln -s femon-"$FEMONVER" femon
else
 echo "updating femon ..."
 if [ ! -d "$VDRPLUGDIR/femon" ]; then
  ln -s femon-"$FEMONVER" femon
 fi
 cd "$VDRPLUGDIR"/femon-"$FEMONVER"
 echo "FIXME: Add update"
fi
}



## run functions
checkdep
buildvdr
checkconfig
cleanplugins
## checkout or update plugins
## comment out plugins you don't want to use
#######################
## BEGIN PLUGIN LIST ##
#######################
sc
tvscraper
femon
nopacity
epgsearch
live
tvguide
osdteletext
softhddevice
play
streamdev
skinflatplus
restfulapi
xvdr
#####################
## END PLUGIN LIST ##
#####################
## trigger plugin build
build
[close]

Im Script die Pfade anpassen (alle <user> durch deinen Usernamen ersetzen) und den git client initialisieren: 

sudo apt install git libjansson-dev libsqlite3-dev
git config --global user.email "<dein Email>"
git config --global user.name "<dein user>"

Jetzt kann man das script laufen lassen. Es holt neue Plugins vom git und baut diese gegen VDR 2.2.0 und kopiert diese gleich in den vdr lib Ordner. Die verschiedenen Build dependencies für die Plugins muss man bei bedarf nachinstallieren bis alle durchbauen. Die Fehlermeldung vom vdr-plugin-live wegen des alten Makefile ist nicht tragisch ;) 

Momentan müssen wir auch noch softhddevice patchen damit auch das baut. Für Softhddevice mit vaapi integration (Source Repo auf Github)  wird momentan folgender Patch für vdr 2.2.0 benötigt:

softhddevice-vpp-pixmap-fix.diff
diff --git a/softhddevice.cpp b/softhddevice.cpp
index b3467a5..eb07e48 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -496,7 +496,7 @@ void cSoftOsd::Flush(void)
     }
 
     LOCK_PIXMAPS;
-    while ((pm = RenderPixmaps())) {
+    while ((pm = (dynamic_cast < cPixmapMemory * >(RenderPixmaps())))) {
    int x;
    int y;
    int w;
@@ -513,7 +513,7 @@ void cSoftOsd::Flush(void)
 #endif
    OsdDrawARGB(x, y, w, h, pm->Data());
 
-   delete pm;
+   DestroyPixmap(pm);
     }
     Dirty = 0;
 }
[close]

am besten gleich im Source Ordner des softhddevice plugins speichern und einen patchlauf simulieren:
patch -p1 --dry-run < softhddevice-vpp-pixmap-fix.diff
sollte alles passen den --dry-run switch weglassen und den patch einspielen.
patch -p1 < softhddevice-vpp-pixmap-fix.diff
im softhddevice source Ordner ein 'make clean' ausführen und das vdr-builder script laufen lassen (baut softhddevice dann mit den richtigen Make.Config Optionen neu).

Das wars fast ;) Jetzt brauchen wir nur noch ein einfaches VDR Starter Script:

Anzupassen sind folgende Variablen:
BASE="/home/<user>/vdr"    => <user> durch deinen usernamen ersetzen
RUNASUSER="<user>" => <user> durch deinen usernamen ersetzen
REC=/media/data/vdr    => Pfad in dem die Aufnahmen landen sollen
IP="192.168.1.100"    => LAN IP des VDR (beim Router fixieren)

startvdr.sh
#!/bin/bash
# vdr srarter script

## adjust to local folder structure
VDRVER="vdr-2.2.0"            # VDR Version
BASE="/home/<user>/work/vdr"         # directory path where the vdr sources live
VDRDIR="$BASE"/"$VDRVER"         # location of the vdr binary
RUNASUSER="$USER"            # run vdr as desktop user. User must be a member of the 'video' group (sudo usermod -aG video <username>)
CONF="$BASE"/config             # vdr configuration files
TXT="$CONF"/vtx               # temp teletext files => create 32 MB ramdisk to reduce diskwrites
EPG="$CONF"/epg/epg.data         # location of the epg.data file => create 32 MB ramdisk to reduce diskwrites
REC=/media/data/vdr            # recording directory
IP="192.168.1.100"            # LAN IP Address of the VDR (needed for virtualization to work around some NetworkManager troubles)

startvdr () {
cd "$VDRDIR"
## set your local language (for OSD)
export LC_ALL=de_DE.utf8
export LC_COLLATE=de_DE.utf8
export VDR_CHARSET_OVERRIDE="ISO-8859-9"

## Start vdr
## ./vdr ... --lirc=/var/run/lirc/lircd ...
## -P"restfulapi --ip=$IP" \
echo "Starting VDR ..."
./vdr --config="$CONF" --epgfile="$EPG" --log=1 --user="$RUNASUSER" --video="$REC" \
-P"softhddevice -v va-api -D -f" \
-P"sc" \
-P"status" \
-P"streamdev-server --remux=$CONF/plugins/externremux.sh" \
-P"live --port=8008 --ip=$IP --log=ERROR --epgimages=$BASE/img/epgimages" \
-P"skinflatplus --logopath=$BASE/img/channellogos" \
-P"osdteletext" \
-P"xvdr" \
-P"femon" \
-P"epgsearch" \
-P"tvguide -i $BASE/img/epgimages -l $BASE/img/channellogos" \
-P"skinnopacity -l $BASE/img/channellogos"
#-P"play -f -v vdpau:deint=4:hqscaling=1" \
}

## run functions
startvdr
[close]

Bevor man VDR jetzt starten kann braucht man noch ein Eingabedevice (z.b Tastatur) und Kanalinformationen. Beide Dateien unter $VDRSOURCE/config speichern.

channels.conf FTA Astra 19.2 für VDR 2.x
:Start
Das Erste;ARD:11836:HC34M2S0:S19.2E:27500:101=2:102=deu@3,103=mis@3;106=deu@106:104;105=deu:0:28106:1:1101:0
ZDF;ZDFvision:11953:HC34M2S0:S19.2E:27500:110=2:120=deu@3,121=mis@3,122=mul@3;125=deu@106:130;131=deu:0:28006:1:1079:0
PHOENIX;ARD:10743:HC56M2S0:S19.2E:22000:501=2:502=deu@3,503=mul@3:504:0:28725:1:1051:0
arte;ARD:10743:HC56M2S0:S19.2E:22000:401=2:402=deu@3,403=mis@3,407=mul@3,408=fra@3:404:0:28724:1:1051:0
ServusTV Oesterreich;ServusTV:12662:HC56M2S0:S19.2E:22000:2110=2:2111=deu@4,2112=eng@4:2115:0:13111:1:1115:0
:hd
ServusTV HD Oesterreich;ServusTV:11302:HC23M5O35S1:S19.2E:22000:3583=27:3584=deu@4,3585=eng@4;3587=deu@106,3589=deu@122:3588:0:4913:1:1007:0
ATV HD;ATV:11243:HC56M2S0:S19.2E:22000:2280=27:2281=deu@4:2285:D05,D98,D95,648,650,98C,9C4,1702,1833:13228:1:1003:0
3sat HD;ZDFvision:11347:VC23M5O35S1:S19.2E:22000:6510=27:6520=deu@3,6521=mis@3,6523=mul@3;6522=deu@106:6530;6531=deu:0:11150:1:1010:0
arte HD;ARD:11493:HC23M5O35S1:S19.2E:22000:5111=27:5112=deu@3,5113=fra@3,5117=mis@3;5116=mul@106:5114;5115=deu,5118=fra,5119=deu:0:10302:1:1019:0
Das Erste HD;ARD:11493:HC23M5O35S1:S19.2E:22000:5101=27:5102=deu@3,5103=mis@3;5106=deu@106:5104;5105=deu:0:10301:1:1019:0
Einsfestival HD alt OBSOLETE;OBSOLETE ARD:12421:HC34M2S0:S19.2E:27500:1601=27:1602=deu@3:1604:0:28396:1:1201:0
KiKA HD;ZDFvision:11347:VC23M5O35S1:S19.2E:22000:6610=27:6620=deu@3,6621=mis@3;6622=deu@106:6630:0:11160:1:1010:0
PHOENIX HD;ARD:11582:HC23M5O35S1:S19.2E:22000:5261=27:5262=deu@3,5263=mul@3:5264:0:10331:1:1025:0
ZDF HD;ZDFvision:11361:HC23M5O35S1:S19.2E:22000:6110=27:6120=deu@3,6121=mis@3,6123=mul@3;6122=deu@106:6130;6131=deu:0:11110:1:1011:0
zdf.kultur HD;ZDFvision:11361:HC23M5O35S1:S19.2E:22000:6410=27:6420=deu@3,6421=mis@3,6423=mul@3;6422=deu@106:6430:0:11140:1:1011:0
ZDFinfo HD;ZDFvision:11347:VC23M5O35S1:S19.2E:22000:6710=27:6720=deu@3,6721=mis@3,6723=mul@3;6722=deu@106:6730:0:11170:1:1010:0
zdf_neo HD;ZDFvision:11361:HC23M5O35S1:S19.2E:22000:6310=27:6320=deu@3,6321=mis@3,6323=mul@3;6322=deu@106:6330:0:11130:1:1011:0
BR Nord HD;ARD:11582:HC23M5O35S1:S19.2E:22000:5201=27:5202=deu@3,5203=mis@3;5206=deu@106:5204;5205=deu:0:10326:1:1025:0
NDR FS SH HD;ARD:11582:HC23M5O35S1:S19.2E:22000:5221=27:5222=deu@3,5223=mis@3;5226=deu@106:5224;5255=deu:0:10330:1:1025:0
SWR BW HD;ARD:11493:HC23M5O35S1:S19.2E:22000:5121=27:5122=deu@3,5123=mis@3;5126=deu@106:5124;5125=deu:0:10303:1:1019:0
WDR HD Aachen;ARD:12603:HC56M2S0:S19.2E:22000:5601=27:5602=deu@3,5603=mis@3;5606=deu@106:5604;5605=deu:0:28544:1:1111:0
ANIXE HD;BetaDigital:10773:HC34M5O20S1:S19.2E:22000:255=27:0;259=deu@106:0:0:21100:1:1053:0
:news
n-tv;RTL World:12187:HC34M2S0:S19.2E:27500:169=2:73=deu@3:80:0:12090:1:1089:0
N24;ProSiebenSat.1:12544:HC56M2S0:S19.2E:22000:1023=2:1024=deu@3:35:0:17503:1:1107:0
EuroNews;Globecast:12226:HC34M2S0:S19.2E:27500:2432=2:2433=deu@3,2434=eng@3,2435=fra@3,2436=ita@3,2437=esl@3,2438=por@3,2439=rus@3,2440=ara@3,2441=tur@3,2442=per@3:0:0:31220:1:1091:0
Eurosport Deutschland;SES Astra:12226:HC34M2S0:S19.2E:27500:101=2:103=deu@4:102:0:31200:1:1091:0
:de privat
Kabel 1 Austria;ProSiebenSat.1:12051:VC34M2S0:S19.2E:27500:166=2:167=deu@3:169:0:20004:1:1082:0
ProSieben Austria;ProSiebenSat.1:12051:VC34M2S0:S19.2E:27500:161=2:84=deu@3;85=deu@106:36:0:20002:1:1082:0
ProSieben MAXX;ProSiebenSat.1:12545:HC56M2O0S0:S19.2E:22000:1535=2:1536=deu@3:37:0:17505:1:1107:0
RTL Austria;RTL:12226:HC34M2S0:S19.2E:27500:201=2:202=deu@3:203:0:28800:1:1091:0
RTL2 Austria;RTL:12226:HC34M2S0:S19.2E:27500:401=2:402=@3:403:0:28810:1:1091:0
SAT.1 A;ProSiebenSat.1:12051:VC34M2S0:S19.2E:27500:800=2:801=deu@3;803=deu@106:802:0:20005:1:1082:0
TELE 5;BetaDigital:12480:VC34M2S0:S19.2E:27500:1535=2:1536=deu@3:38:0:51:133:33:0
sixx Austria;sevenonemedia:12662:HC56M2S0:S19.2E:22000:1060=2:1061=deu@4:1063:0:13106:1:1115:0
SUPER RTL A;RTL:12226:HC34M2S0:S19.2E:27500:501=2:502=deu@3:503:0:28815:1:1091:0
VOX Austria;RTL:12226:HC34M2S0:S19.2E:27500:301=2:302=deu@3:303:0:28805:1:1091:0
Disney Channel;BetaDigital:12460:HC34M2S0:S19.2E:27500:2047=2:2048=deu@3;2051=deu@106:36:0:1793:133:5:0
DMAX;BetaDigital:12480:VC34M2S0:S19.2E:27500:3327=2:3328=deu@3:44:0:63:133:33:0
:de staatlich
Einsfestival;ARD:10743:HC56M2S0:S19.2E:22000:201=2:202=deu@3,203=mis@3;206=deu@106:204:0:28722:1:1051:0
EinsPlus;ARD:10743:HC56M2S0:S19.2E:22000:301=2:302=deu@3,303=mis@3;306=deu@106:304:0:28723:1:1051:0
KiKA;ZDFvision:11953:HC34M2S0:S19.2E:27500:310=2:320=deu@3,321=mis@3;325=deu@106:330:0:28008:1:1079:0
tagesschau24;ARD:10743:HC56M2S0:S19.2E:22000:101=2:102=deu@3:104:0:28721:1:1051:0
zdf.kultur;ZDFvision:11953:HC34M2S0:S19.2E:27500:1110=2:1120=deu@3,1121=mis@3,1122=mul@3;1125=deu@106:1130:0:28016:1:1079:0
ZDFinfo;ZDFvision:11953:HC34M2S0:S19.2E:27500:610=2:620=deu@3,621=mis@3,622=mul@3;625=deu@106:630:0:28011:1:1079:0
zdf_neo;ZDFvision:11953:HC34M2S0:S19.2E:27500:660=2:670=deu@3,671=mis@3,672=mul@3;675=deu@106:680:0:28014:1:1079:0
Bayerisches FS Nord;ARD:11836:HC34M2S0:S19.2E:27500:201=2:202=deu@3,203=mis@3;206=deu@106:204;205=deu:0:28110:1:1101:0
ARD-alpha;ARD:12265:HC34M2S0:S19.2E:27500:1401=2:1402=deu@3,1403=mis@3;1406=deu@106:1404;1405=deu:0:28487:1:1093:0
hr-fernsehen;ARD:11836:HC34M2S0:S19.2E:27500:301=2:302=deu@3,303=mis@3:304:0:28108:1:1101:0
MDR Sachsen;ARD:12109:HC34M2S0:S19.2E:27500:2901=2:2902=deu@3,2903=mis@3:2904:0:28228:1:1073:0
NDR FS HH;ARD:12109:HC34M2S0:S19.2E:27500:2601=2:2602=deu@3,2603=mis@3:2604:0:28225:1:1073:0
Radio Bremen TV;ARD:12421:HC34M2S0:S19.2E:27500:1201=2:1202=deu@3:1204:0:28385:1:1201:0
rbb Berlin;ARD:12109:HC34M2S0:S19.2E:27500:601=2:602=deu@3,603=mis@3:604:0:28206:1:1073:0
SR Fernsehen;ARD:12265:HC34M2S0:S19.2E:27500:1301=2:1302=deu@3,1303=mis@3:1304:0:28486:1:1093:0
SWR Fernsehen BW;ARD:11836:HC34M2S0:S19.2E:27500:801=2:802=deu@3,803=mis@3;806=deu@106:804:0:28113:1:1101:0
WDR Aachen;ARD:12603:HC56M2S0:S19.2E:22000:3401=2:3402=deu@3,3403=mis@3:3804;3405=deu:0:28534:1:1111:0
[close]

remote.conf für Keyboard und Remote
XKeySym.Up         Up
XKeySym.Down       Down
XKeySym.Menu       space
XKeySym.Ok         Return
XKeySym.Back       b
XKeySym.Left       Left
XKeySym.Right      Right
XKeySym.Red        F5
XKeySym.Green      F6
XKeySym.Yellow     F7
XKeySym.Blue       F8
XKeySym.0          0
XKeySym.1          1
XKeySym.2          2
XKeySym.3          3
XKeySym.4          4
XKeySym.5          5
XKeySym.6          6
XKeySym.7          7
XKeySym.8          8
XKeySym.9          9
XKeySym.Volume+    +
XKeySym.Volume-    -
XKeySym.Mute       m
XKeySym.Info       i
XKeySym.Pause      p
XKeySym.FastFwd    f
XKeySym.FastRew    r
XKeySym.Power      v
LIRC.Up        KEY_UP
LIRC.Down      KEY_DOWN
LIRC.Menu      KEY_TV
LIRC.Menu      KEY_HOME
LIRC.Menu      KEY_MENU
LIRC.Ok        KEY_OK
LIRC.Back      KEY_ESC
LIRC.Left      KEY_LEFT
LIRC.Right     KEY_RIGHT
LIRC.Red       KEY_RED
LIRC.Green     KEY_GREEN
LIRC.Yellow    KEY_YELLOW
LIRC.Blue      KEY_BLUE
LIRC.0         KEY_0
LIRC.1         KEY_1
LIRC.2         KEY_2
LIRC.3         KEY_3
LIRC.4         KEY_4
LIRC.5         KEY_5
LIRC.6         KEY_6
LIRC.7         KEY_7
LIRC.8         KEY_8
LIRC.9         KEY_9
#LIRC.Power     Power #done via irexec
LIRC.Volume+   KEY_VOLUMEUP
LIRC.Volume-   KEY_VOLUMEDOWN
LIRC.Mute      KEY_MUTE
LIRC.Schedule  KEY_EPG
LIRC.Info      KEY_INFO
LIRC.Play      KEY_PLAY
LIRC.Pause      KEY_PAUSE
LIRC.Stop      KEY_STOP
LIRC.Next      KEY_NEXT
LIRC.Prev      KEY_PREVIOUS
LIRC.Channel+  KEY_CHANNELUP
LIRC.Channel-  KEY_CHANNELDOWN
LIRC.FastFwd   KEY_FASTFORWARD
LIRC.FastRew   KEY_REWIND
LIRC.Menu      KEY_MENU
LIRC.Subtitles KEY_SUBTITLE
LIRC.User0     KEY_TEXT
LIRC.User1     KEY_DELETE
LIRC.User2     KEY_VCR
LIRC.PrevChannel KEY_VIDEO
LIRC.User3     KEY_DVD
LIRC.Recordings KEY_MEDIA
LIRC.Audio     KEY_AUDIO
LIRC.User4     KEY_IMAGES
[close]

Damit kann man jetzt loslegen und VDR über das ./startvdr script starten. Wenn alles gut geht sollte sofort ein Video Fenster im Vollbild aufgehen und ARD laufen. Die De-Interlacing Einstellungen im VDR OSD unter 'Setup - Plugins - Softhddevice -  Video' für die Formate 576i und 1080i auf
Motion Adaptive
First Field Order = 0
Second Field Order = 1

ändern. Damit bekommt man jetzt wirklich ein sehr gutes Bild.  :jb
« Letzte Änderung: 20 Februar, 2015, 19:29 von mtron »
Signatur
PC: lshw | Sats: 19.2° & 13°Ost (DiSEqC, 80cmØ Blech) | DVB-Soft: vdr 2.1.7 mit softhddevice via va-api
- Hauppauge Nova-T USB 2.0 Stick mit DiBcom DiB7700P Frontend, MT2060 tuner, Firmware
- TerraTec Cinergy S2 PCI HD mit STB0899 demodulator und Mantis VP 1041 PCI bridge
- TerraTec Cinergy S2 USB mit Montage DS3000 demodulator und IR-receiver,  Firmware
[close]

Offline mtron

  • Server-Admin
  • *
  • Beiträge: 1514
    • some debs
Re: [ubuntu] Howto: vdr 2.2.0 mit intel vaapi und deinterlacing
« Antwort #1 am: 20 Februar, 2015, 19:33 »
Ich habe das howto auf den aktuellen Stable vdr 2.2.0 aktualisiert. Es wirkt jetzt wahscheinlich wie sehr viel gebastel aber ich kann sagen dass es wirklich sehr gut mit der in meinem Haswell CPU verbauten Intel Grafik läuft. Die Zeiten wo man für HDTV unter Linux mit guten deinterlacern nur nvidia haben konnte sind endlich vorbei.  :jo

Signatur
PC: lshw | Sats: 19.2° & 13°Ost (DiSEqC, 80cmØ Blech) | DVB-Soft: vdr 2.1.7 mit softhddevice via va-api
- Hauppauge Nova-T USB 2.0 Stick mit DiBcom DiB7700P Frontend, MT2060 tuner, Firmware
- TerraTec Cinergy S2 PCI HD mit STB0899 demodulator und Mantis VP 1041 PCI bridge
- TerraTec Cinergy S2 USB mit Montage DS3000 demodulator und IR-receiver,  Firmware
[close]