Archiv der Kategorie: Hauptmenue

Build driver for Digital Devices Cine CT V6

There is also a complete package if you do not want to roll your own. Unfortunately it does not work with Ubuntu 14.10 as of today.

Getting the drivers for the Digital Devices Cine CT V6 to work is a bit different from 14.04 as there is no prebuilt version in a PPA. So it is back to recompiling from source with every kernel update. Luckily it is fairly easy after I found this post:

It will work with Kernels up to 3.18

Build and install driver for Ubuntu 14.10

First install a few packages. Mercurial to get hg to work, ncurses and the current linux source files needed if you want to only build drivers for your card and deselect the others with make menuconfig.

sudo aptitude install mercurial git libproc-processtable-perl ncurses-dev linux-source
hg clone http://linuxtv.org/hg/~endriss/media_build_experimental
cd media_build_experimental
make download
make untar
./build --check-only
make menuconfig
make
make install

install the firmware for the card (still in the same directory):

experimental/oe/get_dvb_firmware drxk

load the kernel module

modprobe ddbridge
After a kernel update, the drivers need to be rebuilt:
cd media_build_experimental
make distclean
make untar
make menuconfig
make
make install

More information can be found on Digital Devices support page and on vdr-portal.de.

Thanks to Oliver Endriss who made this work!

Digital Devices Cine CT V6 and MythTV – DVB-C with UPC Cablecom

Since my first MythTV system I relied on analog PAL TV. When digital TV was introduced by UPC Cablecom in Switzerland it was mandatory to use their cable box, all channels were encrypted. Now of course it would have been possible to use an IR blaster to control that unit and digitize the output of the set-top box.  It took a few years but now FTA digital (and partly HD) TV is available in Switzerland on UPC Cablecom’s network.

As before I wanted a dual tuner card that would allow me to record one show while watching another. After a bit of research I found only Digital Devices Cine CT V6 Card would fit the bill. It is a PCIe 1x card that is downright tiny, about the size of a business card. Compared to my analog Hauppauge PVR-500 this is a nice development. The Cine CT V6 is a hybrid dual tuner card that either takes a DVB-C or DVB-T signal on either of its tuners that records straight into h.264. or MPEG2. yay!

The card can be upgrade with a DuoFlex CT card that adds another two tuners – all running off the same PCIe slot. And if that is not enough that system can yet be upgraded with an Octopus bridge bringing up to 8 tuners to one PCIe port.

There is even the possibility to include CI modules. It almost seems like the card we’ve all been waiting for.

And best of all, Linux driver support is there too.

I am currently running kernel 3.2.0. Driver support should be built into kernels for versions greater 3.6. So I guess the whole process will be easier once 14.04 is released. For the time being on my Mythbuntu 12.04 installation was straight forward.

The installation consists of two parts:

  • driver
  • firmware
[Edit]

As of today this will only work up to Ubuntu 14.04

Instead of building your own drivers, you can also just add the following to /etc/apt/sources list for your Mythbuntu 12.04 system:

# https://launchpad.net/~yavdr/+archive/main
# linux-media-dkms for digital devices cine ct v6 (ddbridge)
deb http://ppa.launchpad.net/yavdr/main/ubuntu precise main
deb-src http://ppa.launchpad.net/yavdr/main/ubuntu precise main

afterwards it is a simple run of

# apt-get update
# apt-get install linux-media-dkms

and you should be good to go!

The package linux-media-dkms takes care of everything. After rebooting or manually adding the needed kernel modules, you should see the adapters as

/dev/dvb/adapter0/frontend0
/dev/dvb/adapter1/frontend0

frontend0 is used for DVB-C whereas frontend1 would be used for DVB-T.  Switching between the two is done via software.

Now you simply modify your entries in mythbackend-setup for the new cards and input connections and make a full channel scan in MythTV.

Lirc IR Remote with MythTV

I use one of the newer Microsoft Media Center remotes for my system. For one it was dirt cheap, does what I need it to do and does it well. Also from what I have read it is well supported by Lirc. All this proved true.
The buton layout is fairly good, it has a comfortable shape and it’s got a power button that you can program to turn off your tv set.
The IR receiver has a long USB cable. Thus it can be place almost anywhere. Even though that will probably not even be necessary as this is one of the most powerful remotes I’ve seen. It works in bright sunlight and even if the receiver is directly behind you. Something I cannot say of my rather expensive Pioneer Plasma screen.
On top of that the remote comes with two IR blasters that allow you to control a couple set top boxes for cable or satellite tv. I have never used the blasting capabilities though.
Mythbuntu makes it extremely easy to select a remote an configures it for you. Contrary to my Gentoo installation the back button on the remote stopped working. I hacked the .lircrc file of my tv user to set that button accordingly.
For now it works nicely.

# LIRCRC Auto Generated by Mythbuntu Lirc Generator
# Author(s): Mario Limonciello, Nick Fox
# Created for use with Mythbuntu
begin
remote = mceusb
prog = mythtv
button = Seven
config = 7
repeat = 0
delay = 0
endbegin
remote = mceusb
prog = mythtv
button = Right
config = Right
repeat = 0
delay = 0
endbegin
remote = mceusb
prog = mythtv
button = Mute
config = |
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Skip
config = Z
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = One
config = 1
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Down
config = Down
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Zero
config = 0
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Replay
config = Q
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Home
config = M
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Pause
config = P
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Six
config = 6
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Two
config = 2
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = ChanDown
config = Down
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = ChanUp
config = Up
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Rewind
config = <
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Forward
config = >
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Play
config = P
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = VolDown
config = [
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Stop
config = Escape
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mythtv
button = Back
config = Escape
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = VolUp
config = ]
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Five
config = 5
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = More
config = I
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Four
config = 4
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = OK
config = Return
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Up
config = Up
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = RecTV
config = R
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Nine
config = 9
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Three
config = 3
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Enter
config = Enter
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Eight
config = 8
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Guide
config = S
repeat = 0
delay = 0
end

begin
remote = mceusb
prog = mythtv
button = Left
config = Left
repeat = 0
delay = 0
end

xorg NVidia DVI/HDMI and a Pioneer Plasma

Getting my Pioneer PDP436-XDE to display MythTV is easy and not so easy at the same time. First off, automatic xorg configuration does not work, but with the proprietary NVidia drivers there is a 720p option.

While the panel itself has a resolution of 1024×768 pixels and a 16:10 aspect ratio the electronics espects either a 1080p or 720p signal on the HDMI input.

So I have to get the X server to output a signal at 1280x720p. I tried using the integrated Intel 945 graphics but had no luck. If anyone has gotten his system to output 1280x720p with Intel graphics let me know in the comments or contact me here.

Mythbuntu has a very minimal xorg.conf file after installation relying heavily on automatic configuration of the X server and correct EDID information that needs to be provided by the display. Unfortunately automatic configuration did not work as expected so I had to slightly modify my xorg.conf file to work correctly with my plasma display.

# File generated by xorgconfig.
# XORG.CONF for 1280x720p on a Pioneer Plasma via DVI with NVidia graphics
# NVidia proprietary driver
Section „ServerLayout“
Identifier     „Simple Layout“
Screen         „Screen 1“ 0 0
InputDevice    „Mouse1“ „CorePointer“
InputDevice    „Keyboard1“ „CoreKeyboard“
EndSectionSection „Files“
FontPath        „/usr/share/fonts/misc/“
FontPath        „/usr/share/fonts/TTF/“
FontPath        „/usr/share/fonts/Type1/“
FontPath        „/usr/share/fonts/75dpi/“
FontPath        „/usr/share/fonts/100dpi/“
EndSectionSection „Module“
Load           „dbe“   # Double buffer extension
SubSection     „extmod“
Option         „omit xfree86-dga“   # don’t initialise the DGA extension
EndSubSection
Load           „type1“
Load           „freetype“
Load           „glx“
EndSectionSection „InputDevice“
Identifier     „Keyboard1“
Driver         „kbd“
Option         „AutoRepeat“ „500 30“
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
Option         „XkbModel“ „pc104“
Option         „XkbLayout“ „us“
EndSection

Section „InputDevice“
Identifier     „Mouse1“
Driver         „mouse“
Option         „Protocol“ „Auto“
Option         „Device“ „/dev/input/mice“
Option         „ZAxisMapping“ „4 5“
# Mouse-speed setting for PS/2 mouse.
Option         „Emulate3Buttons“
EndSection

Section „Monitor“
Identifier     „Pioneer Plasma PDP436-XDE“
VendorName     „Pioneer“
ModelName      „PDP436-XDE“
HorizSync       25.0 – 50.0
VertRefresh     59.0 – 60.0
ModeLine       „1280x720p“ 74.5 1280 1336 1472 1664 720 721 724 746 -hsync +vsync
Option         „DPMS“
Option         „UseEdidDpi“ „FALSE“
Option         „DPI“ „100 x 100“
EndSection

Section „Device“

# simeli added
Option         „UseEvents“ „True“
Identifier     „NVidia GF7300“
Driver         „nvidia“
#simeli old xorg
Option  „TVStandard“ „HD720p“

EndSection

Section „Screen“
Identifier     „Screen 1“
Device         „NVidia GF7300“
Monitor        „Pioneer Plasma PDP436-XDE“
DefaultDepth    24
Option         „ConnectedMonitor“ „DFP“
Option         „TVStandard“ „HD720p“
SubSection     „Display“
Depth       24
Modes      „1280x720p“
EndSubSection
EndSection

Linux and Bluray

I bought myself a Playstation to watch Bluray movies. But every once in a while I thought it would be nice to be able to make backups and put them in the MythVideo library just like DVDs.

Due to AACS present on Bluray discs this was a bit complicated. However I found a solution that seems reasonable for me and works very well.

The following is needed:

  • Windows XP or Vista License
  • VMware server
  • Slysoft AnyDVD HD
  • a samba share on Linux with lots of free space

The procedure is simple: Install VMware Server on your Linux host and have it access the drive – in my case /dev/scd0 directly.

screenshot of vmware server

VMWare Server optical drive selection

Windows will see the inserted disc just like a regular Windows machine. By having Windows accessing the drive directly, AnyDVD can read all sectors as its supposed to. Set up AnyDVD to rip to a samba share you’ve set up previously. That way your virtual disk is not going wild.

After the actual ripping process you can use various programs to re-encode the rip to get it down to a more manageable size. I usually set my films to end up as a 720p 4.5GB h.264 video using ripbot264. RipBot is a small Delphi program that bundles all necessary tools – quite a few – with a nice GUI.

If you use very recent releases of mencoder, mplayer, gpac, mkvtoolnix and x264 you may also use Linux directly for the encoding process which may result in a performance increase compared to using a virtual machine such as vmware.

HyRax has posted a small bash script on his blog that will do the encoding for you. You’ll need to install the required packages first:

aptitude install mencoder mplayer gpac mkvtoolnix x264

The packages in your distro may not be recent enough in which case you may wanto to compile a cvs snapshot from source.

#! /bin/bash

# =====================================================================

# Blu-ray encoding script by HyRax February 2009 http://www.serenux.com

# =====================================================================

# Make sure the user has specified what to work on.

if [ -z „$1“ ]; then

echo „\nBlu-ray movie encoding script\n—————————–“

echo „Written by HyRax February 2009\nhttp://www.serenux.com“

echo „\nUsage: $0 <m2ts file without extension>“

echo „\nExample: If your movie file is called TheDarkKnight.m2ts then\nyour usage will be: $0 TheDarkKnight\n“

exit

fi

# The crf=21 option controls encoding quality, and indirectly the final

# filesize. The higher the value, the more compression and thus smaller

# file size. Reduce the value and file size will go up. A value of 21

# should produce a file of approximately 4GB in size for a typical movie.

# Encode the video using x264, ignore the audio for now.

mencoder $1.m2ts \

-ovc x264 -x264encopts crf=21:frameref=3:bframes=3:b_pyramid:direct_pred=auto:weight_b:partitions=all:8x8dct:me=umh:mixed_refs:trellis=1:nopsnr:nossim:subq=6:level_idc=41:threads=4 \

-nosound \

-of rawvideo \

-o $1.×264

# Dump the first original audio track (should be the English track) but

# don’t re-encode it. Ignore the video.

mplayer $1.m2ts -dumpaudio -dumpfile $1.ac3

# Copy the raw x264 encoded video into an MP4 container so we can set

# the correct framerate (generally 23.976 – adjust it if MPlayer or

# MEncoder report something different)

MP4Box -add $1.×264 $1.mp4 -fps 23.976

# Finally, merge everything into a single MKV file

mkvmerge -o $1.mkv $1.mp4 –track-name 0:Eng $1.ac3

# Remove the hash in front of the next command to have the script delete

# your working files when encoding is complete.

# rm $1.m2ts $1.×264 $1.ac3

# Tell the user we’re done.

echo „All done! Your final movie file is called $1.mkv – enjoy!“

Simply copy the script to the directory containing the main m2ts file and run it with

./encodevideo.sh maintitle

leaving out the m2ts extension from maintitle.m2ts when calling the script. Videos encoded using the VC-1 codec result in errors so far. Your mileage may vary.

Keep in mind that it may not be legal in your country to employ tools to get rid of copy protection on digital media.