Sidux VDR DVB-S2

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 106: Zeile 106:
 
  cd xine-lib-12.09.2008
 
  cd xine-lib-12.09.2008
 
# IMPORTANT for latest ffmpeg snapshoot you need to patch xine-lib1.2 to get it compiled with external ffmpeg, thnx to _ds_ for patch
 
# IMPORTANT for latest ffmpeg snapshoot you need to patch xine-lib1.2 to get it compiled with external ffmpeg, thnx to _ds_ for patch
http://paste.debian.net/17117/
+
{{Box Code|patch.diff|<pre>
Copy/paste this the code from line 3 to line 28 to new file
+
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c
  vi patch.diff
+
--- a/src/combined/ffmpeg/ff_audio_decoder.c
 +
+++ b/src/combined/ffmpeg/ff_audio_decoder.c
 +
@@ -321,7 +321,7 @@ static void ff_audio_decode_data (audio_
 +
 +
    if (!this->output_open) {
 +
      if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) {
 +
-        avcodec_decode_audio (this->context,
 +
+        avcodec_decode_audio2 (this->context,
 +
                              (int16_t *)this->decode_buffer,
 +
                              &decode_buffer_size,
 +
                              &this->buf[0],
 +
diff --git a/src/combined/ffmpeg/ffmpeg_decoder.h b/src/combined/ffmpeg/ffmpeg_decoder.h
 +
--- a/src/combined/ffmpeg/ffmpeg_decoder.h
 +
+++ b/src/combined/ffmpeg/ffmpeg_decoder.h
 +
@@ -31,6 +31,10 @@
 +
#  include <libavcodec/avcodec.h>
 +
#endif
 +
 +
+#if LIBAVCODEC_VERSION_MAJOR > 51
 +
+#define bits_per_sample bits_per_coded_sample
 +
+#endif
 +
+
 +
typedef struct ff_codec_s {
 +
  uint32_t          type;
 +
  enum CodecID      id;
 +
</pre>
 +
}}
 +
 
 +
Copy/paste this the code from to new file
 +
  vi patch.diff <-- Hit I for Insert and Paste that code; Hit escape and write :wq -->
 
  patch -p1 -i patch.diff
 
  patch -p1 -i patch.diff
 
  ./autogen.sh --with-external-ffmpeg --disable-dxr3  
 
  ./autogen.sh --with-external-ffmpeg --disable-dxr3  

Version vom 13. September 2008, 09:37 Uhr

Inhaltsverzeichnis

Description

This install proces will show you how to install vdr and dvb-s2 drivers from source on sidux (debian sid based distribution). I know that compiling the source under Debian distribution isnt common and some ppl will say Debian isnt for you if you do it that way. Well if you wanna have latest developer version of VDR and DVB-S2 drivers and also ffpmeg and xine player then you need to use sources.

Hardware

For this you can use what you have. This to be Howto is based on DVB-S2 cards, and the software needed to play VDR over VGA cards aka xine-vdr plugin.

Used Hardware

This is my VDR HTPC based system:

Case:       Thermaltake Bach black
PSU:        LC Power 420 Watt - Green Power
Mainboard:  Gigabyte GA-P35-DS4 rev 1.0
CPU:        Intel Core 2 Duo E6420 Boxed
RAM:        Super Talent DIMM Kit 2GB PC2-6400U
HDD:        Samsung SpinPoint T166 500GB SATA II (HD501LJ)
DVB-S2:     Technotrend-budget DVB S2-3200
VGA:        nVidia 9500 GT 512MB

Getting the distribution and installing it

To obtaint sidux distribution go to http://www.sidux.com/ and download latest version. In time of writing this HowTo it was "sidux-2008-02" and for my VDR HTPC i used 64bit lite version : sidux-2008-02-erebos-kde-lite-amd64-200806252050.iso.

Direct download link for iso (470MB) http://debian.tu-bs.de/project/sidux/release/sidux-2008-02-erebos-kde-lite-amd64-200806252050.iso Some note from sidux.com

THIS IS VERY IMPORTANT: sidux, as a Linux LIVE-CD, is based on high compression technology, and because of that, special care is needed when burning
the ISO image. Only use high quality CD-media [or DVD+RW] and burn in DAO-mode (disk-at-once) and not faster than x8.

You my use this boot cheatcode if you get Font to be to Big when you boot live cd and this is my boot cheatcode for installing sidux on 40" LCD TV: Just press Tab before booting live cd and add at end this:

vga=0x37B dpi=75
vga=0x37B is cheatcode for resolution 1280x720x32
dpi=75 is cheatcode for Dot´s Per Inch for your display 

More info about Cheatcodes for sidux you can find here: http://manual.sidux.com/en/cheatcodes-en.htm

After installing distribution make shure your sidux distribution is updated to latest version, we will first get latest debian.list and source.list

cd /etc/apt/sources.list.d && wget -O debian.list http://sidux.com/files/misc/sources.list.d/debian.list && wget -O sidux.list http://sidux.com/files/misc/sources.list.d/sidux.list

Dist-upgrade

apt-get update
apt-get dist-upgrade -d (only download files)
apt-get dist-upgrade (update files)

If new kernel is installed then reboot and boot in new kernel. After booting in the new Kernel we need also to install graphics driver for our nVidia card, and for that we will use smxi sidux Maintenance script from h2. We will switch to terminal:

Ctrl+Alt+F1 

then login with root and your root password switch to init 3 (shoot down X)

init 3

install smxi script

cd /usr/local/bin; wget techpatterns.com/smxi.zip;unzip smxi.zip;smxi

Configure script, but dont do dist upgrade or anything with it, we will use it only for graphics driver:

sgfxi -co 173.14.12

switch to init 5 (start X)


init 5

Setup your resolution with nvidia tool, i am using 1920x1080@60Hz for Full HD resolution on my Samsung LE-40M86BD LCD TV. If you are looged as user in X (and you should) you will not have rights to write nvidia settings to X11 configuration file /etc/X11/xorg.conf but you can copy that code from nvidia settings window and paste in X11 as root user from console.

su
mv /etc/X11/xorg.conf /etc/X11/xorg.conf_orig
vi /etc/X11/xorg.conf

Press I for insert Paste that settings from nvidia configuration tool, Press Escape and type

:wq

Now you can reboot to see if you will get it working on resolution you just setup (or restart X : init 3 and init 5 from terminal or CTRL+Alt+Backspace) Now we setup everything for building VDR on our system.

DVB-S2 Drivers

We will use Manu´s multiproto tree: Install dvb driver from multiproto, for that we need mercurial for "hg clone etc"

apt-get update
apt-get install mercurial
cd /usr/local/src
hg clone http://jusst.de/hg/multiproto dvb
cd /usr/src/dvb/linux/include/linux/
ln -s /usr/src/`uname -r`/include/linux/compiler.h compiler.h
cd /usr/local/src/dvb/
make
make install

Reboot and check dmesg for log about DVB-S2 device:

saa7146: register extension 'budget_ci dvb'.
ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 20 (level, low) -> IRQ 20
saa7146: found saa7146 @ mem ffffc20000334000 (revision 1, irq 20) (0x13c2,0x1019).
saa7146 (0): dma buffer size 192512
DVB: registering new adapter (TT-Budget S2-3200 PCI)
adapter has MAC addr = 00:00:00:00:00:00 <- changed
input: Budget-CI dvb ir receiver saa7146 (0) as /devices/pci0000:00/0000:00:1e.0/0000:05:00.0/input/input6
stb0899_attach: Attaching STB0899
stb6100_attach: Attaching STB6100
DVB: registering frontend 0 (STB0899 Multistandard)...

Xine ffpmeg

We will use latest snapshoot for xine-lib xine-ui, and as we are building xine-lib with external ffmpeg we will use latest ffmpeg to:

ffmpeg

cd /usr/src/local
apt-get build-dep ffmpeg ## it would install known dependencies aka -dev packets##
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-12-09-2008
cd ffmpeg-12-09-2008
./configure --prefix=/usr --enable-shared --enable-pthreads --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-gpl --enable-x11grab --enable-liba52 --enable-liba52bin --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --arch=x86_64 --cpu=k8
make
make install
ldconfig

xine-lib

  1. download xine-lib from Mercurial Repositories (xine-lib, gxine)
apt-get install autoconf libtool automake libXext-dev libcdio-dev libvcdinfo-dev libpostproc-dev autogen cvs libpng12-0-dev libxt-dev
cd /usr/local/src
hg clone http://hg.debian.org/hg/xine-lib/xine-lib
mv xine-lib xine-lib-12.09.2008 (put your date for latter use)
cd xine-lib-12.09.2008
  1. IMPORTANT for latest ffmpeg snapshoot you need to patch xine-lib1.2 to get it compiled with external ffmpeg, thnx to _ds_ for patch
Code: patch.diff
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c
--- a/src/combined/ffmpeg/ff_audio_decoder.c
+++ b/src/combined/ffmpeg/ff_audio_decoder.c
@@ -321,7 +321,7 @@ static void ff_audio_decode_data (audio_
 
     if (!this->output_open) {
       if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) {
-        avcodec_decode_audio (this->context,
+        avcodec_decode_audio2 (this->context,
                               (int16_t *)this->decode_buffer,
                               &decode_buffer_size,
                               &this->buf[0],
diff --git a/src/combined/ffmpeg/ffmpeg_decoder.h b/src/combined/ffmpeg/ffmpeg_decoder.h
--- a/src/combined/ffmpeg/ffmpeg_decoder.h
+++ b/src/combined/ffmpeg/ffmpeg_decoder.h
@@ -31,6 +31,10 @@
 #  include <libavcodec/avcodec.h>
 #endif
 
+#if LIBAVCODEC_VERSION_MAJOR > 51
+#define bits_per_sample bits_per_coded_sample
+#endif
+
 typedef struct ff_codec_s {
   uint32_t          type;
   enum CodecID      id;

Copy/paste this the code from to new file

vi patch.diff <-- Hit I for Insert and Paste that code; Hit escape and write :wq -->
patch -p1 -i patch.diff
./autogen.sh --with-external-ffmpeg --disable-dxr3 
make 
make install 
ldconfig

xine-ui

cd /usr/local/src
cvs -d:pserver:anonymous@xine.cvs.sourceforge.net:/cvsroot/xine login
cvs -z3 -d:pserver:anonymous@xine.cvs.sourceforge.net:/cvsroot/xine co -P xine-ui
./autogen.sh --enable-vdr-keys 
make 
make install

VDR =

TO BE DONE