Showing posts with label mythtv. Show all posts
Showing posts with label mythtv. Show all posts

19 January 2016

627. Very briefly: Turn off screen blanking in GNOME/debian jessie

Update:
The only thing that worked for turning off screen-blanking when using youtube or vlc was an ugly little hack:
I installed xdotool and ran crontab -e and added:
*/2 * * * * DISPLAY=:0 XAUTHORITY=/home/andy/.Xauthority xdotool key Ctrl


Original post
In spite of not having any screen saver activate and in spite of setting "Blank Screen" to "Never' under Power options, my screen kept on blanking out after 1-3 minutes of watching TV using mythtv. I tried a lot of things, including using xset, but the only thing that worked in the end was editing my /etc/X11/xorg.conf (I use an nvidia driver) and adding the bits in red:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option "BlankTime" "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "DPMS" "0"
EndSection
Now the screen never blanks when watching TV using mythtv. On the other hand, it still blanks when watching DVDs in VLC...

04 January 2014

541. Setting up mythtv on debian with leadtek 1000s (SAA7130)

I've been using me-tv (and occasionally kaffeine and vlc) to watch DVB-T on linux for the better part of two years. While it's working absolutely fine, and I really like me-tv, I'd like to get it to work in mythtv as well in the hope that it will support closed captioning.

Note that mythtv is only available via the deb-multimedia repo and not in the offical debian repos. I first tried to install mythtv that way, and while I got pretty far (scanned for channels etc.) I couldn't get a picture when trying to watch TV using mythtv-frontend. The deb-multimedia packages also screwed up my graphics card set-up somehow, which didn't improve my mood. So while that's probably a viable method, I finally decided to compile things myself. Note that if you do keep deb-multimedia enable and do a dist-upgrade the mythplugins package below will be replaced, and with that the main mythtv package as well, leading to all kinds of fun. You might want to give mythplugins a higher version number than I've done below to circumvent that.


Building

sudo dpkg-reconfigure dash

Select 'No', so that /bin/sh/ points to bash instead of dash.

The next port of call was http://www.mythtv.org/wiki/User_Manual:Initial_Installation 

sudo apt-get install build-essential liblircclient-dev libasound2-dev libdts-dev libdvdnav-dev \
 libxv-dev libxxf86vm-dev transcode libmp3lame-dev subversion qt4-dev-tools libqt4-dev libsamplerate0 \
 libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev msttcorefonts libasound2-doc libmad0-dev \
 libid3tag0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev fftw3-dev libfaad-dev \
 libsmpeg-dev libmp4v2-dev libtag1-dev mysql-server libvisual-0.4-dev libexif-dev libxvmc-dev \
 libxinerama-dev uuid-dev libicu-dev 
sudo apt-get install yasm checkinstall gdb python-mysqldb python-urlgrabber libnet-upnp-perl
mkdir ~/tmp/mythtv -p
cd ~/tmp/mythtv
git clone -b fixes/0.27 git://github.com/MythTV/mythtv.git
cd mythtv/mythtv/
./configure --enable-proc-opt
make
sudo checkinstall --fstrans=no --install=no
0 - Maintainer: [ andy@helium ] 1 - Summary: [ mythtv 0.27 ] 2 - Name: [ mythtv ] 3 - Version: [ 0.27 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ mythtv ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ mythtv ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
Exclude files that are in the home directory.

Continue:
sudo dpkg -i mythtv_0.27-1_amd64.deb
cd ../mythplugins/
sudo apt-get install libmysql++-dev python-oauth libdate-manip-perl libxml-simple-perl libimage-size-perl libdatetime-format-iso8601-perl libsoap-lite-perl libjson-perl 
./configure
make
sudo checkinstall --fsmetrans=no --install=no
0 - Maintainer: [ root@helium ] 1 - Summary: [ mythplugins 0.27 ] 2 - Name: [ mythplugins ] 3 - Version: [ 0.27 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ mythplugins ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ mythplugins ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
sudo dpkg -i mythplugins_0.27-1_amd64.deb

Note that you may want to use a much higher version number for mythplugins than I've done above -- with 0.27 the deb-multimedia version of the package will take precendence, and cause all kinds of fun...

Setting up

sudo useradd mythtv
sudo usermod -a -G mythtv $USER
mkdir ~/.mythtv

Create a file called ~/.mythtv/mysql.txt:
DBHostName=localhost
DBHostPing=no
DBHostName=localhost
DBUserName=mythtv
DBName=mythconverg
DBPassword=mythtv
LocalHostName=helium
where helium is my hostname.
Before you can run mythtv-setup you should prepare the mysql database.

mysql -u root -p
> show databases;
> create database mythconverg;zymichost.com
> create user 'mythtv'@'%' identified by 'mythtv';
> create user 'mythtv'@'localhost' identified by 'mythtv';
> set password for 'mythtv'@'%' = password('mythtv');
> set password for 'mythtv'@'localhost' = password('mythtv');
> connect mythconverg;
> grant all privileges on *.* to 'mythtv'@'%' with grant option;
> grant all privileges on *.* to 'mythtv'@'localhost' with grant option;
> flush privileges;
> exit;

Now run setup:
mythtv-setup

The first time I did this it asked about country and language, and then exited. I then ran it again and went through the setup as shown in the figures below. Note that I had to use the IP, 192.168.2.123, of my computer rather than 127.0.0.1 (i.e. localhost).















I then ran
mythbackend

and let it run in a terminal, followed by
mythfrontend

in another terminal. And it worked! I mean, not the first time, but by following the instructions above I actually got it to work -- up to a point. The audio wasn't working.


While TV is a visual medium it's still nice to have sound. So, in mythfrontend I went to Settings, Audio and picked Pulseaudio, since that's what I use by default anyway.

 I did have the occasional issue with sudden white noise, so I changed to ALSA, and all has been perfect ever since:



Test driving:
Everything seems to be working fine. Hit M for menu:
 You can choose subtitles (or just hit T):

To bring up the Electronic Program Guide (EPG) hit S:
See http://www.mythtv.org/wiki/Keybindings for a list of shortcuts.

Anyway, I'm still exploring. The one thing that's not working yet is the remote control, but that will be solved in due course.

Missing channels:
Mythtv didn't pick up channels Nine, Gem and Go. While scan found them without issue by doing 'scan /usr/share/dvb/dvb-t/au-Melbourne > channels.conf', I couldn't find an easy way to import the scan data.

Nine Melbourne:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:519:720:1072
GEM:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
GO!:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:700:1074
EXTRA:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:520:730:1075
EXTRA 2:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:521:740:1076

Trying to import an existing scan in mythtv didn't allow me to provide a URL, but only showed two old scans pre-populating the import dialogue, which was both weird and annoying.

Instead the key was to add a new transport: fire up mythtv-setup, and go to the Channel editor. Note that I'm using a different skin/menu to the default one (Terra), but the process is the same.


See scan output above for the values to add here



 And you're pretty much done.