jalto
Posts: 4
Joined: Sun Nov 25, 2012 3:06 am

Mythtv Working (Packages Provided)

Tue Dec 18, 2012 6:18 am

I've been interested in a dedicated raspberry pi mythbox since my sheevaplug died a few months ago and I wanted to share my working packages. Technically, I compiled them on raspbmc but they should work fine on raspbian. My goal in this whole process was to have a working backend that interfaced with my Hauppauge HVR-1950 to act as a pvr. The mythtv frontend installs fine, but I like the XBMC frontend on raspbmc, so I haven't played with it too much. The backend is working great.

In compiling I tried to change as few things as possible. I've documented my steps below, so hopefully they can be repeated if necessary. The installation packages are set up so that they can act as a local debian repository an your raspberry pi. There are a lot of small packages, so it makes it a lot cleaner to install. See http://www.togaware.com/linux/survivor/ ... ebian.html for more details.

INSTALLATION INSTRUCTIONS
On the rpi

Code: Select all

cd /
sudo wget http://dl.dropbox.com/u/4581144/mythtv-rpi_packages.tgz
sudo tar -zxvf mythtv-rpi_packages.tgz
Add the following to /etc/apt/sources.list

Code: Select all

deb file:/mirrors local local
Update and install mythtv

Code: Select all

apt-get update
apt-get install mythtv
The additional modules are there so mythweb is also available.

COMPILATION INSTRUCTIONS
Add the following to /etc/apt/sources.list

Code: Select all

deb-src http://www.deb-multimedia.org wheezy main
Get the apt keys

Code: Select all

wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2012.05.05_all.deb
dpkg --install deb-multimedia-keyring_2012.05.05_all.deb
apt-get update
Make a compilation directory

Code: Select all

mkdir /root/src
cd /root/src
Install flaac-dev

Code: Select all

apt-get build-dep libfaac-dev
apt-get source libfaac-dev
cd faac-*
The deb-multimedia looks for libmp4v2-dev with a version greater than 2.0.0. However, debian used 2.0.0~, so you have to cheat a bit and lower the version it looks for. Edit ./debian/control and change libmp4v2-dev (>= 2.0.0) to libmp4v2-dev (>= 1.9.0).

Code: Select all

dpkg-buildpackage
cd ..
dpkg -i libfaac-dev_*
Raspbmc was in the process of updating the kernel when I was compiling, so their kernel headers were incorrect for a while. Since they're now on kernel 3.6, the __kernel_ulong_t in /usr/include/linux/sysinfo.h is correct and won't need to be modified. If anyone runs into a problem with the headers I can post more on this issue, but I think it's resolved now.

Install mythtv

Code: Select all

apt-get build-dep mythtv
apt-get source mythtv
cd mythtv-dmo-*
dpkg-buildpackage
cd ..
To install mythplugins, follow the same process. You'll likely have to install some of the mythpackages before it will let you compile the plugins. I would again strongly recommend putting the compiled packages into the mirror to make them easy for apt to find. If mythtv and all the libraries were placed in the repository, the mythplugins can install using:

Code: Select all

apt-get build-dep mythtvweb
apt-get source mythweb
cd mythtv-dmo-*
dpkg-buildpackage
cd ..
I hope this helps. Please let me know if I missed a step in my explanations and I will update them.

John

BerndS
Posts: 7
Joined: Sun Dec 16, 2012 12:07 pm

Re: Mythtv Working (Packages Provided)

Wed Dec 19, 2012 8:53 pm

Thank you for providing the packages. They installed fine on Raspbian.

First I tried to follow your compiling instructions but I gave up after failing to build the libfaac-dev package. After editing the version of libmp4v2-dev in the control file, I still get the version conflict error when I install the build-dependecies for libfaac-dev. I wonder if the ./faac-1.2.8/debian/control file is the one to change?

User avatar
bonelifer
Posts: 128
Joined: Thu Jan 12, 2012 4:01 am
Location: http://www.phpbb.com/community/memberli ... e&u=147848

Re: Mythtv Working (Packages Provided)

Wed Dec 19, 2012 10:22 pm

Not sure the command, but if you had already run the compile, you might need to clear some cache. I remember this happening on some other software I had to compile, but can't remember the command.

jalto
Posts: 4
Joined: Sun Nov 25, 2012 3:06 am

Re: Mythtv Working (Packages Provided)

Thu Dec 20, 2012 12:43 am

BerndS wrote:After editing the version of libmp4v2-dev in the control file, I still get the version conflict error when I install the build-dependecies for libfaac-dev. I wonder if the ./faac-1.2.8/debian/control file is the one to change?
Looks like I left out a step, before dpkg-buildpackage, do a dpkg-checkbuilddeps. This should hopefully fix the version dependency problem.

It doesn't look like I can edit the original post, hmm.

BerndS
Posts: 7
Joined: Sun Dec 16, 2012 12:07 pm

Re: Mythtv Working (Packages Provided)

Fri Dec 21, 2012 1:07 pm

I didn't find a solution for the dependency problem. I need to build my own packages because I use 0.25 and don't want to upgrade to 0.26.

I installed the provided libfaac-dev package, changed my source.list to "squeeze-backports" and am now on building the mythtv-0.25 packages. I will also upload them if they work.

dtaylorl
Posts: 1
Joined: Thu Jan 10, 2013 3:02 am

Re: Mythtv Working (Packages Provided)

Thu Jan 10, 2013 3:03 am

So, do you have MythTV running as the backend, and XBMC as the frontend? Both on the same RPi?

jalto
Posts: 4
Joined: Sun Nov 25, 2012 3:06 am

Re: Mythtv Working (Packages Provided)

Thu Jan 10, 2013 12:58 pm

So, do you have MythTV running as the backend, and XBMC as the frontend? Both on the same RPi?
Yes, they are both working fine on the same RPi. I should note that my tv tuner has a built in MPEG2 encoder, so the RPi doesn't have to do any work as far as that is concerned. My only remaining issue is with the IR Blaster I bought. I'm running into power problems even with a powered usb hub. My system records and plays back fine, but channel changing has been an issue.

tomatpasser
Posts: 2
Joined: Fri Jan 18, 2013 2:48 pm

Re: Mythtv Working (Packages Provided)

Sat Jan 19, 2013 6:07 pm

Do you have a plain setup guides to get it running after install? I tried searching, but the result was deficient.

I tried to run

Code: Select all

mythtv-setup
as pi, root and the user mythtv

But it returns

Code: Select all

mythtv-setup: cannot connect to X server
I hope someone have a solution for me :)
Thanks in advance

jalto
Posts: 4
Joined: Sun Nov 25, 2012 3:06 am

Re: Mythtv Working (Packages Provided)

Sat Jan 19, 2013 7:07 pm

mythtv-setup: cannot connect to X server
If you are using ssh you have to include the -X parameter. (ie ssh -X -l pi 192.168.1.#). Also, be sure to run it as a regular user not sudo. SSH won't let you change user and still work with x-server apps. A warning the application will be very slow, but it's only for setup.

If you are using it from the rpi itself through the hdmi, you need to start an xserver first. Do a 'startx' and then start an xterm and run the mythtv-setup.

I hope that helps.

John

tomatpasser
Posts: 2
Joined: Fri Jan 18, 2013 2:48 pm

Re: Mythtv Working (Packages Provided)

Sat Jan 19, 2013 7:22 pm

Thank you so much! I managed to get into the configuration now.

robwriter
Posts: 114
Joined: Sat Feb 25, 2012 6:26 pm

Re: Mythtv Working (Packages Provided)

Tue Jan 29, 2013 11:04 pm

Has anyone got mythweb up and running? I installed it, but can't quite get it to work. Apache is running because I get an "It Works" page, but I can't get mythweb to show up. I got errors around Apache/MythWeb when I installed it, but I didn't think to keep a note of them at the time.

I found assorted guides but none appear to correspond exactly to the way it's all set up on the Pi - I always get the impression they may have been written a few years ago!

I'll try again tomorrow.

awaterson
Posts: 1
Joined: Mon Jan 14, 2013 10:55 am

Re: Mythtv Working (Packages Provided)

Mon Feb 04, 2013 12:19 pm

HI,

The mythtv 0.26 build works great, I am running 0.27 has anyone been able to sucessfuly build this on the PI as I am getting errors every time?

Thanks

Andy

greatfront7
Posts: 1
Joined: Tue Feb 05, 2013 5:36 am

Re: Mythtv Working (Packages Provided)

Tue Feb 05, 2013 5:45 am

Would anyone be kind enough with posting instructions on how to install *just* mythfrontend for .24? Jalto's instructions generally work for me but have no idea where to start modifying to allow backporting to .24.

B1G
Posts: 5
Joined: Tue Feb 12, 2013 2:35 pm

Re: Mythtv Working (Packages Provided)

Tue Feb 12, 2013 2:56 pm

Wow! It's exactly what i was looking for in these days!

Does the package include mythbackend 0.26?

B1G
Posts: 5
Joined: Tue Feb 12, 2013 2:35 pm

Re: Mythtv Working (Packages Provided)

Tue Feb 12, 2013 6:51 pm

Well, i looked into the package and yes it's the 0.26 version, but what about mysql?
Is automatically installed as a dependency?

I look forward to my raspberry pi :)

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: Mythtv Working (Packages Provided)

Wed Feb 13, 2013 2:00 am

What video acceleration does the front end use for playback?

B1G
Posts: 5
Joined: Tue Feb 12, 2013 2:35 pm

Re: Mythtv Working (Packages Provided)

Fri Feb 15, 2013 5:42 pm

Hi, i'm trying to install mythtv using your packages but the installation is stuck in Setting up mythlogserver (0.26.0-dmo6) ...
After a reboot i relaunched the installation and appeared the message
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

doing that the installation restarts from Setting up mythlogserver (0.26.0-dmo6) ...

Can you help me?

B1G
Posts: 5
Joined: Tue Feb 12, 2013 2:35 pm

Re: Mythtv Working (Packages Provided)

Fri Feb 15, 2013 11:07 pm

I managed to install everything by removing "&& invoke-rc.d rsyslog restart" from mythtvlogserver.postinst and mythtv-backend.postinst scripts.

But now i can't execute myth-setup. I installed x server (sudo apt-get install xserver-xorg-core xorg) but i get this error "mythtv-setup: cannot connect to X server"

what's wrong? :(

User avatar
jbeale
Posts: 4003
Joined: Tue Nov 22, 2011 11:51 pm

Re: Mythtv Working (Packages Provided)

Mon Feb 25, 2013 7:34 am

I am trying to follow the instructions in the OP. After typing 'sudo apt-get install mythtv' and a long set of messages, including two requests from mysql-server-5.5 to set the MySQL admin root password (which I still left blank) I get:

Code: Select all

insserv: warning: script 'udev' missing LSB tags and overrides
insserv: warning: script 'dbus' missing LSB tags and overrides
insserv: warning: script 'xinetd' missing LSB tags and overrides
insserv: warning: script 'cron' missing LSB tags and overrides
insserv: warning: script 'xbmc' missing LSB tags and overrides
insserv: warning: script 'console-setup' missing LSB tags and overrides
insserv: warning: script 'avahi-daemon' missing LSB tags and overrides
insserv: warning: script 'winbind' missing LSB tags and overrides
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed    !
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am running

Code: Select all

Linux raspbmc 3.6.11 #1 PREEMPT Sun Feb 3 04:42:21 UTC 2013 armv6l GNU/Linux
After trying the 'chown root:root /tmp; chmod 1777 /tmp; /usr/sbin/mysqld &' suggestion from
http://askubuntu.com/questions/253023/u ... -root-user

I get

Code: Select all

[1] 5366
root@raspbmc:/# 130224 23:26:26 [Note] Plugin 'FEDERATED' is disabled.
130224 23:26:26 InnoDB: The InnoDB memory heap is disabled
130224 23:26:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130224 23:26:26 InnoDB: Compressed tables use zlib 1.2.7
130224 23:26:26 InnoDB: Using Linux native AIO
130224 23:26:26 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
130224 23:26:26 InnoDB: Completed initialization of buffer pool
130224 23:26:26 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130224 23:26:26 [ERROR] Plugin 'InnoDB' init function returned error.
130224 23:26:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130224 23:26:26 [ERROR] Unknown/unsupported storage engine: InnoDB
130224 23:26:26 [ERROR] Aborting

130224 23:26:26 [Note] /usr/sbin/mysqld: Shutdown complete
...from which I am guessing mysql-server-5.5 wants 128 MB of memory and my (Rev.1) R-Pi doesn't provide that much usable memory for user apps, am I right? Is only the newer 512 MB RPi able to run this software, or can I configure mysql to use less memory? I am running the current stock Raspbmc distribution and 'top' reports 124672 KiB total memory.

User avatar
jbeale
Posts: 4003
Joined: Tue Nov 22, 2011 11:51 pm

Re: Mythtv Working (Packages Provided)

Mon Feb 25, 2013 3:31 pm

Ok, it looks like jalto either has a 512M Pi, or used an older version of MySQL to set up Mythtv. The current one (5.5) defaults to using more RAM than my R-Pi has available:
Below from http://www.raspberrypi.org/phpBB3/viewt ... 77#p191449

Here is the problem and the fix. MySQL 5.5 defaults to an Innodb buffer size of 128M. It was 8M.

So add this to /etc/mysql/my.cnf in the section where it mentions Innodb settingss but doesn't actually have any explicit settings:

innodb_buffer_pool_size = 8M

See http://bugs.mysql.com/bug.php?id=63989 for more info.

martinhj
Posts: 23
Joined: Mon Jan 09, 2012 1:05 pm

Re: Mythtv Working (Packages Provided)

Mon Mar 04, 2013 12:57 pm

So what exactly are people using to build this who have it working. II have tried various and the build has failed on each in different ways

Martin

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: Mythtv Working (Packages Provided)

Thu Mar 07, 2013 5:53 am

Hi all,
I've just made a fresh install of raspbian and installed the mythtv packages. No matter what I do I come up against the msql time zone error when I run mythtv-setup. I've proven the zoneinfo is in msql database but mythtv-setup refuses to accept it. Anyone else seen this?

2013-03-07 15:53:41.120133 E MySQL time zone support is missing. Please install it and try again. See 'mysql_tzinfo_to_sql' for assistance.

martinhj
Posts: 23
Joined: Mon Jan 09, 2012 1:05 pm

Re: Mythtv Working (Packages Provided)

Thu Mar 07, 2013 7:28 am

mongrol wrote:Hi all,
I've just made a fresh install of raspbian and installed the mythtv packages. No matter what I do I come up against the msql time zone error when I run mythtv-setup. I've proven the zoneinfo is in msql database but mythtv-setup refuses to accept it. Anyone else seen this?

2013-03-07 15:53:41.120133 E MySQL time zone support is missing. Please install it and try again. See 'mysql_tzinfo_to_sql' for assistance.
I've not even got that far...did you get it to build to completion by following these instructions with raspbian? Did you use a raspbian image or the installer? If so did you choose the base options or anything different? I didnt even get it built fully to get to running mythtv-setup :-(

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: Mythtv Working (Packages Provided)

Thu Mar 07, 2013 9:29 am

No, I just used the premade packages.

I've fixed the time issue. Turns out the setup uses upnp to detect other backends on the network. It was trying to talk to my other backend database which is still 0.25. Only spotted it with one line in the console of it trying to resolve the IP of the other backend.

martinhj
Posts: 23
Joined: Mon Jan 09, 2012 1:05 pm

Re: Mythtv Working (Packages Provided)

Thu Mar 07, 2013 12:14 pm

mongrol wrote:No, I just used the premade packages.

I've fixed the time issue. Turns out the setup uses upnp to detect other backends on the network. It was trying to talk to my other backend database which is still 0.25. Only spotted it with one line in the console of it trying to resolve the IP of the other backend.
Cheers,

Sent you a PM...hope you got it. Not sure as its sitting in my outbox rather than my sent items folder???

martin

Return to “Raspberry Pi OS”