donderdag 26 april 2012

Wat je nodig hebt voor MythTV digitale TV bij Ziggo

Er mailde mij vandaag iemand met de vraag "Zou jij me kunnen vertellen wat ik het beste aan kan schaffen?"

Mijn reply:

Wat je nodig hebt is een grafische kaart die hardwarematig 1080p h.264 en MPEG2 kan weergeven. Om op de CPU video te decoderen heb je een vrij heftig systeem voor nodig, mijn AMD Athlon 64 X2 4000+ kan het nét niet aan op zichzelf. Dat hardwarematig video afspelen is voornamelijk met Nvidia's VDPAU PCI-Express kaarten: http://www.mythtv.org/wiki/VDPAU
 , ATI werkt eigenlijk niet, Intel GMA misschien. Maar er is ook CrystalHD: http://www.mythtv.org/wiki/Broadcom_Crystal_HD

Aan de opname kant: TV kaarten met DVB-C en een CI slot. In dat CI slot een 'Alphacrypt Classic' CAM, of de equivalente 'Panaccess MultiCrypt'. In de CAM dan een Ziggo smartcard. Het is theoretisch ook mogelijk om die Alphacrypt/MultiCrypt te vervangen door een Smargo kaartlezer en een 'softcam'. Die kan terzijnertijd (nu nog niet) vast ook een CI+ Irdeto2 systeem emuleren, dat kan de Alphacrypt niet. Maar de MythTV ontwikkelaars werken dat actief tegen, dus dat wordt dan een beetje houtje-touwtje oplossing waar je niet van af moet blijven want anders gaat het steeds stuk. Tot nu toe werkt m'n Alphacrypt, maar ik heb wel al een Smargo in huis. Ik heb liever dat ik gewoon kan updaten zonder al te veel hoofdbreken hoe ik het ook alweer oploste een half jaar terug.

Op zich heb je vrije keus in TV kaarten, moet wel werken met Linux. De enige USB DVB-C kaart met CI slot die geheel werkt onder Linux is de TT CT-3650. Ik heb die aangeschaft omdat ik ooit hoop m'n systeem fysiek wat kleiner te kunnen schalen. M'n externe frontends zijn al van die kleine Zotac kastjes. De CT-3650 werkt alleen met Linux kernel 3.2, of de meest recente LinuxTV media_build drivers: http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

De 'Digital Devices Octopus' serie is ook interessant. Dat (mini) PCI-Express kaartje kan 8 apparaten aansturen, dus bijv 4 DVB-C/T tuners, en 4 CI sloten. Maar hoewel de woordvoerder van de fabrikant zegt dat alles werkt onder Linux, zijn er volgens mij alleen drivers voor hun satelliet (DVB-S/S2) ontvanger. Kán inmiddels veranderd zijn.

Daarnaast heeft mythtv-setup problemen met het vinden van alle kanalen. Ziggo heeft z'n eigen aangepaste DVB-C standaard verzonnen (vandaar "Ziggo Gecertificeerd" logos). Ik vul daarom de dtv_multiplex tabel in de database aan met de extra multiplexen die MythTV zelf niet gevonden heeft: http://gathering.tweakers.net/forum/list_messages/1340775/0
 . Daarna nogmaals laten zoeken, dan vind MythTV alle kanalen. Het heeft voorheen wel eens gewerkt, misschien werkt het al weer in MythTV 0.25.

8 opmerkingen:

Anoniem zei

Ik kan je opmerking over MythTV en tegenwerken van een smargo solution niet volgen. Het inrichten met Smargo staat namelijk los van Mythtv. Het zorgt er voor dat MythTV gedecodeerde kanalen toebedeeld krijgt en ze niet zelf hoeft te decoderen. Hiervoor wordt er een virtuele video device aangemaakt.

Ik gebruik dit zelf dan ook zonder enige problemen en een update van MythTV is hier onafhankelijk van.

mvg Robin

Henk Poley zei

Ik ben wel eens mythtv patches op de mailinglist tegenkomen die werden afgeschoten omdat ze enkel zouden dienen om virtuele kaarten beter te ondersteunen.

Op zich heb ik een Smargo liggen. Als het werkelijk zeer stabiel werkt dan zou enige info over het aan elkaar knopen van diverse programma's wel fijn zijn.

Robin zei

Ik wil je mijn cookbookje wel toesturen hoor....

Ik zal het vanavond even verzamelen

Anoniem zei

Allereerst heb je OSCAM nodig voor de SMARGO

Install oscam (info http://www.cardsharingtutorials.info/?p=17)

1. First make sure all the compilers are installed:
“sudo apt-get install build-essential”
“sudo apt-get install cmake”
"sudo apt-get install libssl-dev libssl0.9.8"

2. Install ubuntu support for card readers – usb and pcsc
“sudo apt-get install libusb-dev libusb-1.0-0-dev”
“sudo apt-get install pcscd pcsc-tools libpcsclite-dev”

3. Install the yum package manager and subversion so we can get the oscam source
“sudo apt-get install yum” (maybe not needed, but doesn't harm)
“sudo apt-get install subversion”

4. Check Out (Download) OSCAM source:
“svn co http://streamboard.gmc.to/svn/oscam/tags/1.10 oscam-1.10″


5. Now to actually compiling the source code, and then linking the build
We want to build with PCSC and Web Interface support.

Change into the newly downloaded oscam src directory that we renamed earlier e.g. ‘oscam-svn-5051′

“cd oscam-1.10″

Now prepare(make) the source code with Web Interface support

“cmake -DWEBIF=1″

Look out for any errors in the cmake process, if all goes well we can…
Now do a full Linux compile/make – this links all the object libraries and creates an executable program file.

“make”

Finally we do an install
This copies everything to right place.

“sudo make install”

Again look out for errors.

The oscam program should now be in
/usr/local/bin

7. The config files
OSCAM expects the config files to be in
/usr/local/etc
needed are oscam.conf, oscam.server, oscam.user
Within oscam.conf are the browser credentials and used port
Within oscam.server is the usb interface which can be found with lsusb (look for FT232)
Within oscam.user is the user defined later needed for sasc-ng to communicate over newcamd

8. Test by starting oscam
sudo oscam -b
oscam should now be accesible with a webbrowser according to the settings in oscam.conf
if not start with "-b" to see error messages on screen

Anoniem zei

Verder heb je ook SASC-ng nodig (deel 1)

install Sasc-NG

Meet dependecies
apt-get install linux-headers-`uname -r` build-essential subversion mercurial openssl gettext libssl-dev screen
(unsure if libv4l-dev is also needed since source files are available)

Getting sasc-ng source
hg clone http://85.17.209.13:6100/sc
optional hg clone http://85.17.209.13:6100/sc sc -r 569 (to get version 569)
cd sc/contrib/sas-ng/
chmod +x configure
chmod +x dvbloopback/module/config_dvb.pl

Correct Makefile by remove "-lv4l1" from LIBS line (since v4l v2 is now used and source files are available)
cd sc/contrib/sasc-ng/
nano Makefile

On the line with LIBS it should say

LIBS = -lpthread -lcrypto -lcrypt -lv4l1

Remove the "-lv4l1" (if present), so it looks like this:

LIBS = -lpthread -lcrypto -lcrypt

Don' treat warning as errors (optional)
There's a setting in the makefile that, should you get a warning during compile, it'll treat this as an error. It's best to just shut t$

cd sc/contrib/sasc-ng/
nano Makefile

On the 11th line it should say

CXXFLAGS ?= -Wall -D__user= -Werror

Remove the "-Werror", so it looks like this:

CXXFLAGS ?= -Wall -D__user=

Compile using the media_build from dvb-v4l
cd sc/contrib/sasc-ng/
./configure --dvb-dir=~/media_build (zeker geen!!! --shared toevoegen, die geven segmentation faults)
this is the media_build directory of dvb-v4l



Option (if you don't want all decryption included, you could remove all except irdeto for Ziggo)
Je kan deze verwijderen door de verschillende overbodige directories in de source code te verwijderen:
Ik heb dit uiteindelijk niet gedaan
cd sc/systems
rm -Rf shl constcw viaccess sc-viaccess sc-nagra nagra seca sc-videoguard2 sc-seca sc-cryptoworks sc-conax cryptoworks conax nds

Anoniem zei

sasc-ng (part 2)


Start Compiling
make
make module

Installing the files
Installing the dvbloopback module (so it can load at boot)

sudo su
cd sc/contrib/sasc-ng/
rm /lib/modules/`uname -r`/misc/dvbloopback.ko
cp sasc-ng /usr/bin
cp sc/PLUGINS/lib/* /usr/lib/
mkdir /lib/modules/`uname -r`/misc
/usr/bin/install dvbloopback.ko /lib/modules/`uname -r`/misc/
depmod

Loading the modules

since we installed the module at the appropriate position we can modprobe it:

modprobe dvbloopback

If you have multiple adapters (like I do, the reason why I'm using sasc-ng) you need to specify the amount of adapters you have. I have$

modprobe dvbloopback num_adapters=3

Check with lsmod | grep dvb to see if dvbloopback is loaded (or dmesg)

Make config file, e.g. /etc/sasc-ng
create file cardclient.conf with
newcamd:127.0.0.1:15050:1/0604/FF00:user1:password1:0102030405060708091011121314
don't forget to change user1 and password1 to your likings!
touch other files to ignore message they are missing later on
cardslot.conf, orride.conf, smartcard.conf, SoftCam.Key (so all are empty)

Finally start sasc-ng to create a virtual interface
sudo sasc-ng -j 0:1 --cam-budget --sid-allpid --sid-nocache --buffer 8M --cam-dir /etc/sasc-ng --daemon
in this case -j 0:1 indicates interface 0 is real, interface 1 is virtual
to see (error) messages start without "--daemon"

Unknown zei

Hi. Ik ben wel geinterresseerd in een oplossing met een Smargo. Heb je het cookbookje van Robin gehad? Zou ik het ook mogen hebben?

Tycho Lürsen zei

Voor wie het interesseerd: ik heb ook een kookboekje, het staat op http://dolot.kipdola.com/wiki/Mythtv_0.25_%2B_Ziggo_on_Ubuntu_Precise

Hierin wordt ook beschreven wat je moet doen om één en ander stabiel samen te laten werken.