View Full Version : Mythtv *on* the xbmc machine (with Intrepid)
Hallo everybody,
I'd like to start a thread about setting up mythtv on the same machine where we nicely set up the minimal Intrepid installation explained in the wiki.
That's what I'm struggling with right now, and other threads are not so helpful. I'd like to hear (read) from those who were successful: what packages are needed to make it work - still trying to keep the os as light-weight as possible?
What about precompiled solutions like http://www.avenard.org/files/ubuntu-repos/ compared to standard packages or svn?
What about the mythtv user used/needed for mythtv compared to "our" xbmc user? Can we merge them? Should we?
I'm seeing lots of pitfalls: my setup worked for the backend part: my hauppauge 1300 is one of the "most supported" for mythtv but I was not able to find any howto's regarding it's setup. I succeeded in adding two cards: one for analog, one for digital (dvb-t) tv, then scan for channels...also successfully. And stop. No way to watch tv. Not from native xbmc, not from mythbox, not even from mythfrontend. Strange errors, nothing helpful in the logs...
I thought installing just the mythtv-backend (+ mysql and xmltv) is enough. Am I wrong?
Any experiences? Can we build a mythtv-for-xbmc howto? I did not find the wiki entry about mythtv helpful as it does not go into details enough (at all).
rodercot
2009-03-07, 13:50
Rickx,
I tried all that from running the minimal install. Finally I just installed mythbunyu 8.10 which is really close to a min. install anyhow, it runs xfce4 or you can set up to run a full gnome or kde desktop if you like.
I was at first auto-loading xbmc but could not get the myth protocol to perform how I wanted so I ended up running mythtv frontend and added an XBMC launcher to the mythfrontend as well as a Suspend system button. I now have two machines a master b/e with a pvr-150 and a pvr-1250 and then a slave b/e with a pvr-150 the 150's share the Vu source setup on the master each with there own bell rcvr and hd, and the 1250 supplies DVB-T to the house and all machines.
Everything needed is installed with mythbuntu it's lite anyhow, the hardest thing I had to do was to get myth to suspend and resume.
I use pm-utils for this, I had to create 5 scripts and add myself to the sudoers list. to edit the sudoers list YOU NEED TO USED VI Editor from ROOT.
All the files created below need chmod +x to work.
1. mythtv-susend a call to pm-suspend script plus puts the stb to sleep, pwrs of the TV
2. /etc/pm/sleep.d/01mythtv - kill mythfrontend and restart and call the resume script
3. /etc/pm/sleep.d/07LCDd - stop the lcd and restart the lcd
4. /etc/pm/sleep.d/08lirc - stop lirc and restart lirc
5/ mythtv-resume - starts mythfrontend, powers on the TV and wakes up the stb.
/etc/pm/config.d/modules (note NO CHMOD ON THE FILE) This just tells pm-suspend to unload my tuner module and then reload it on resume.
So the issues, Lirc is a pain, but it works, scripting to control everything with one remote The mce - WORKS. I have full and EASY control over my LiveTV and REcordings (great for the WAF factor) I have an easy portal to XBMC for all stuff media related and I just need to create an easy button to have xbmc exit instead of power - Exit XBMC.
This is all for the slave machine. I am currently working on ACPI auto power to shutdown and wake auto magically.
***NOTE*** - Everything I read about myth anywhere and modifying your lircrc file for myth says you need to load up irexc on boot (false) If you have one line in your lircrc that has the prog = irexec then mythbuntu will autoload the irexec program as it is built into the myth start up. If you do create a startup script for irexec make sure you grep first to see if it is already running or this may cause you problems.
I could create a how to but each has there own settings, etc, so it varies. but installing myth and then xbmc, setting up main page button is all pretty easy and simple.
Dave
thanks Dave,
that's interesting. My goal is still that of sticking with xbmc as primary gui...unless I get convinced that's really not working. So, could you please explain what you mean:
I was at first auto-loading xbmc but could not get the myth protocol to perform how I wanted so I ended up running mythtv frontend and added an XBMC launcher to the mythfrontend ...
...
Dave
What was the problem(s)? (And did you try mythbox?)
And another question: although it does not make much sense with your setup, did you or could you try to use xbmc's protocol to access the myth b/e?
rickx
rodercot
2009-03-07, 16:53
Rickx,
No problems. Well I had the issue of no matter where I pointed the SLAVE xbmc machine - It would connect to the master b/e BUT I could not view any recordings nor did it know which card to grab when I chose to view LiveTV, now I did try and change this to connect to the local host IE the slave machine and could get liveTV only on the slave machine with it's own card but still no recordings nor did get any icons for channels and could not access the guide, and obviously so as I was not connected to the master b/e.
eluplus has said that adding the actual host name to each machines hosts file will fix this, I have not tried it out yet to see if in fact it does. The other thing I have not tried to do is commment out the bind address line in mysql.cnf and restart mysql to see if that fixes it.
I did not try mythbox as I had set my sites on a Mythbuntu machine with the limited install. Hey! I would love to have the myth protocol working 100% then I could turn both machines into a backend only and strip that much more from the system and XBMC suspends and resumes 100% every time without any work involved. It took me nearly a week to get suspend and resume working 100% from the mythtv frontend.
I never had ANY problems connecting to the master b/e with the myth protocol I had problems viewing recordings AND selecting the wrong tuner when i chose liveTV and then not releasing the tuners properly when I ended liveTV. The other thing for me is the WAF, I know I keep reverting to that but having a LiveTV icon on the main page is VERY USEFUL in this respect, Instead of trying to find the source in XBMC and then choose it and then select livetv choose a channel, wait for it to buffer then stop all that and start again to view another channel. Having it on the main page and then launching a LiveTV session with the guide opening mimics using the dish and she does not have any trouble with that moreso on Thrusday night when Grey's Anatomy is on (YAWN...), I do not get the HUN IT"S NOT WORKING SCREAM ANY MORE - LOL.
Dave
Well useless to say we are all driven by the WAF factor :laugh::laugh:
Indeed the scenario you describe is not exactly user friendly. I'll keep on exploring though: xbmc - if it does not have a geeky skin like horizon - is indeed very simple to understand and use, WAF-proof and last but not least, beautiful - this last one a concept more or less unknown to the mythtv world...(yes, I know they plan to shape up with v. 0.22).
Regarding the hosts thing, I'll test that also. Moreover there's also an "xbmc-hosts" function using advancedsettings.xml. I don't think mysql is involved - not here at least. I have it on a dedicated box and can connect from the whole network. It's a matter of binding it to the (eg. 192.168...) network address instead of 127.0.0.1, then granting rights to the user from everywhere...and it works.
Reporting back to my own thread :rofl:
I thought fighting with a Soundgraph imon Pad Vs. LIRC thing was tough...before I met Mythtv!!!
Long story short: I'm the winner!
My HTPC has a GA-E7AUM-DS2H which is a rather new mobo with lots of nice features. Only negative point: no TV-OUT. No other noticeable things except the before mentioned remote/ir receiver. Well, the TV cards obviously :shocked: : the first attempts where with a Hauppauge HVR-1300 (dvb-t + analog). Then I added a dual dvb-t WinTV-NOVA-T-500.
After THREE (3) Mythbuntu 8.10 installations and all sorts of trouble with the cards, audio, nvidia drivers...trying vanilla, custom PPA repos and self-built attempts the solution was:
1. passing to Mythbuntu 9.04
2. concentrating on CHANNELS.
I don't know if all problems are solved (pulse, vdpau, etc.) but I have a good feeling AT LAST.
My conclusions are that:
Mythbuntu 9.04 (still alpha) solves some mysterious hardware issues with this mobo and the tv cards: alsa (also cx88_alsa) and nvidia in first place.
The order of TV cards plays a role. If you have more than one. If your setup does not work, try swapping the cards or use blacklist+modprobe tricks to swap their recognition.
Channels were the MAIN issue after all. I still don't know the exact role of all the "channel" db-fields, but having badly configured channels was my last and biggest problem, so I will go into detail here.
Last but not least let me criticize after all this swearing: MythTV is the worst documented, worst user-friendly and least intuitive GUI application I have seen in the last...10+ years. There is A LOT of work to do there...somehow the opposite of xbmc.
Configuring channels is a clear example of the last point above. Nobody tells you what the function/use of the fields you have to provide are used for. Nobody tells you what relation there is between some of them. If you have a grabber without channel numbers, you have to provide:
- channel numbers, but you don't know what that means exactly
- channel ids which seam classical db ids but then again, are you sure?
- a channel name - this seams feasible :rolleyes:
- a channel short name - what for? aren't channels names short enough? necessary? optional?
- to make things even funnier you get something like (just like awtv) which is probably supposed to be a helpful message :sad:
- after you've inserted all this data for all those channels with all your good will, it starts all over again and nobody tells you that:
- you may interrupt at that point and pass to a "normal" mythfilldatabase
- things you add in the second+ run are not even updated in the database if they regard non essential fields like icon :sniffle:
After this rant - which could go on for a while but I interrupt here, I'll tell you what worked:
- scan for channels
- run mythfilldatabase --manual WITHOUT changing channel numbers which exist
- interrupt after first day. Then run the normal mythfilldatabase. Let it finish.
- Reopen myth-setup.
- Make all service/useless channels INVISIBLE using the checkbox after a double click on the channel in the channel list. If you delete the channel, it will return the next time you scan.
- Configure all the channels, fill in missing data etc.
- Rescan for channels
- Re-mythfilldatabase
- Re-try frontend.
That worked for me. Why? Because the Mythfrontend has no smarter way of handling a non-working channel than throwing you out of the "TV-view" back to the menu with a not helping generic error message if you are lucky, or completely out of frontend or freezing if you're not. Wouldn't a blank image be better, or one with a more helpful message but remaining in the TV-view??
AAAhh!!!
I still hope to accomplish my goal (see thread title) and I will report when I'm done or near there...should someone be interested :no:
i am using mythtv on ubuntu intrepid x86_64. used mythtv debs that come with this distribution of ubuntu.
i have 2 frontends on the same computer. i added a menu option on the frontend to run xbmc ( which i installed from ppa).
i have the following issues:
1. i have 2 tuners in myth. xbmc only see the second.
2. playing recordings starts from the beginning instead of from where it stoppped. i also don't see an option to erase recordings.
i have other issues but they are not myth related.
-are you using built-in plugin or something else?
-Did you try mythbox?
-is the "second" your default tuner - the one that starts with mythfrontend?
rickx,
I hear you. :)
While fiddeling with MythTV, I thought the devs who produced this piece of software were eager to make it as complicated as humanly possible. I had it halfway working, but then decided to have a look at VDR. And yes, it not only switches channels in <1s, it is stable and WELL documented. And it doesn't have this - uh, how should I call it, incredibly ugly? - GUI forced on you for setup and configuration.
Now XBMC's support for VDR is not yet mass-compatible, but there is a patch and for some it's working quite well. Looking forward to future progress though, specially from the skinners department.
I didn't know there was a way to make xbmc interact with vdr at all. I'll investigate that! And...thanks for the "support", it's good to know others feel the same [pain] after all.
I didn't know there was a way to make xbmc interact with vdr at all. I'll investigate that! And...thanks for the "support", it's good to know others feel the same [pain] after all.
Check here -> http://xbmc.org/forum/showthread.php?t=45314
ads_german
2009-03-19, 15:31
Hi rickx,
I Just wanted to let you know i have felt exactly the same pain as you - I set up mythbuntu 8.10 and xbmc on the same machine and have slowly been tweaking it for about 2 weeks now to get it [almost] the way i want...
I used the script from the following link: http://www.xpmediacentre.com.au/community/mythtv-front-backend/33370-myth-tweak-switch-between-myth-xbmc-via-remote.html to set up the LiveTV button on my MCE remote to switch between xbmc and mythtv, after initially playing with xbmc's inbuilt myth:// protocol functionality.
Although I prefer the more integrated look of the myth protocol in xbmc, i wanted to be able to skip back/forward through live tv, not just pause and resume like the myth protocol in xbmc offers. I ended up modifying the script i downloaded to launch just mythtv (live tv) instead of the entire myth frontend (so tv appears straight away instead of the myth interface first), and used a mythtv skin that looks similar to my chosen xbmc skin.
As you probably discovered, the process is very similar to following the wiki install guide for a minimal 8.10 install, but you can use gui options for a few things (like setting xbmc to autolaunch upon boot) instead of doing everything via command line.
My plan is to now also try out the vdr patch and compare it to mythtv, hopefully the same sort of functionality offered by that patch will also be available for mythtv in the next 6 months or so but in the meantime i figure I should be trying out the vdr stuff and providing as much feedback as possible...
Originally Posted by Freezy:
Now XBMC's support for VDR is not yet mass-compatible, but there is a patch and for some it's working quite well.
By the way, freezy, do you know if the vdr patch allows you to change channels using the channel buttons or the up/down arrows on an mce remote, or do you have to bring up an osd or stop playing the current channel first before you can switch?
Now if I could just get my pc to suspend under mythbuntu :angry: i might stop tearing my hair out... if anyone happens to spot this and has an asus m3n78-em suspending succesfuly under mythbuntu 8.10, please please please let me know the magic tricks you applied to get it working...
Cheers,
Adam.
By the way, freezy, do you know if the vdr patch allows you to change channels using the channel buttons or the up/down arrows on an mce remote, or do you have to bring up an osd or stop playing the current channel first before you can switch?
You can zap directly, and it's very fast. Nothing compared to MythTV.
Cheers,
-freezy.
rodercot
2009-03-20, 00:01
Hi rickx,
Now if I could just get my pc to suspend under mythbuntu :angry: i might stop tearing my hair out... if anyone happens to spot this and has an asus m3n78-em suspending succesfuly under mythbuntu 8.10, please please please let me know the magic tricks you applied to get it working...
Cheers,
Adam.
Adam,
What do you need help with on Suspend. What is it doing and not doing. I have been going down the same road, trying to get the bedroom machine to suspend. It is a little more difficult as that machine is a secondary b/e.
I have since created a new master b/e and put one rcvr in the basement with the new mstr b/e and as soon as I convince the wife it is stable I will move the 2nd rcvr to the basement as well making both machine on the main floor myth/xbmc front ends only.
I use pm suspend scripts to suspend that machine and the issue I have is the L.P. PVR 150 just will not behave, one time it will resume just fine with the card and the next it will not. I basically created a mythtv-suspend script and a mythtv resume script. The mythtv suspend kills the myth frontend and call the pm suspend script. Then I have couple scripts in /etc/pm that kill lirc and lcdd. Then the resume script checks the network, check lirc, lcdd and fires up myth as well as sending a lirc command to turn on the TV and switch the input to HDMI1 for the PC and it shoots a command to the STB to wake it up if it is alseep.
I can supply some of those scripts if you think they will help you out.
Dave
Now if I could just get my pc to suspend under mythbuntu :angry: i might stop tearing my hair out... if anyone happens to spot this and has an asus m3n78-em suspending succesfuly under mythbuntu 8.10, please please please let me know the magic tricks you applied to get it working...
Cheers,
Adam.
Hey Adam,
maybe you should try to contact rodercot (see post #2). He's found a solution for suspending. Or has your mobo some peculiar model-related issues?
edit: ooops bad post timing...there he is...
-are you using built-in plugin or something else?
-Did you try mythbox?
-is the "second" your default tuner - the one that starts with mythfrontend?
assuming your reply was to me:
-i am using the built-in plugin
-mythbox ? what do you mean ? myth wiki says that mythbox is a computer (box) with mythtv installed (see http://www.mythtv.org/wiki/MythBox )
-only channels from the first tuner (which is the not default one) are shown in xbmc.
thanks,
erez.
assuming your reply was to me:
-mythbox ? what do you mean ? myth wiki says that mythbox is a computer (box) with mythtv installed (see http://www.mythtv.org/wiki/MythBox )
thanks,
erez.
Yes, assuming right :laugh:
No, mythbox is (also) something else (http://xbmc.org/forum/showthread.php?t=43115&highlight=mythbox)
ads_german
2009-03-21, 10:47
What do you need help with on Suspend. What is it doing and not doing...
I can supply some of those scripts if you think they will help you out.
Dave
I can't actually get my machine to suspend at all - it just goes to a blank screen with a flashing cursor and becomes totally non-responsive to keyboard/mouse/remote input (needs a hard reboot at this point). Video output isn't actually killed and the power and cpu fans keep spinning. There actually sounds like a momentary dip in the fan speeds when this happens so I'm not sure if it's actually suspending then immediately resuming but not resuming video correctly or not going in to S3 state at all. I think it's the latter though...
I tried mythbuntu 8.04 & 8.10 live cd's and xbmc live 8.10 cd and the mythbuntu ones both suspended ok but resumed with blank video (can't remember offhand what the xbmc live cd did). I think with the appropriate tweaks, a base mythbuntu 8.04 or 8.10 install would resume video ok too.
I have a spare hard drive which I have installed mythbuntu 8.04 on (the uneven core usage in 8.10 is annoying me) so I'm going to try and get suspend/resume working on that before installing the latest nvidia driver, upgrading alsa, installing xbmc etc and make changes one at a time to see where the problem gets introduced. From some searching I've done, I suspect it may be lirc related.
I'll finish trying this first to see if I can get a base install suspending/resuming then start a new thread (and pm yourself) to ask for help if I'm still stuck, as I think I'm getting a bit off topic from rickx's original request...
Cheers,
Adam.
No, mythbox is (also) something else (http://xbmc.org/forum/showthread.php?t=43115&highlight=mythbox)
thanks,
with the mythbox script i see all channels.
but i can't watch anything ... (live or recording)
i get a "Exception: can't find recording 123_200903.....mpg"
I'm just guessing, when I had such errors it was
- access rights on the folder where mpgs are stored - make sure both user (mythtv usually) and group have rw rights. If processes run as different user, make that user part of mythtv group after the step above.
- messed up database containing actually not (no more) existing mpg entries. In that case best bet is dropping all the tables from the mythconverg db (through phpmyadmin) and letting mythtvfrontend (or backend) fill it from skratch - though that means going through the whole channel setup pain again, it should help if the first guess didn't do it.
- if finally it is mythbox's fault...well you're out of luck, don't know :oo: ???
to edit the sudoers list YOU NEED TO USED VI Editor from ROOT.
Not really related to the thread but as an FYI for the vi adverse you can do the above with:
su - root
export EDITOR=nano
export VISUAL=nano
visudo
and edit the sudoers file with nano ;)
Cheers,
Arkay.
...
Although I prefer the more integrated look of the myth protocol in xbmc, i wanted to be able to skip back/forward through live tv, not just pause and resume like the myth protocol in xbmc offers. I ended up modifying the script i downloaded to launch just mythtv (live tv) instead of the entire myth frontend (so tv appears straight away instead of the myth interface first), and used a mythtv skin that looks similar to my chosen xbmc skin.
...
Hi Adam,
Could you post your modified script? I would also like to use xbmc & mythtv liveTV combination without having to browse throught the mythtv frontend menus. I think xbmc & mythtv liveTV combination is currentely the best way to use XBMC as mythtv frontend. XBMC script MythBox (http://code.google.com/feeds/p/mythbox/) looks promising, but imo it still lacks some important functions like changing channel without stopping the playback first.
Thanks in advance,
Kar1
ads_german
2009-05-04, 15:57
Hi Kar1,
Yeah, lack of channel changing ability without stopping playback was another big killer for me with mythbox as it currently worked, but I think that's a limitation of the myth:// protocol, not the script. I only had to change a couple of lines in Arkay's appswitch.pl script, as per below - basically just change references to mythfrontend to mythtv:
# Global vars, paths, commands to call.
################################################## ################################################## ###########################
my ($LOG) = "/home/xbmc/Shell_Scripts/appswitch.log"; #Log location.
my ($LOGSIZE) = 1024; #Maximum log size in kbytes, self pruning.
my ($DEBUG) = $FALSE; #Debugging default is off.
my ($BASENAME) = $0; #How was the program called?
my ($MYTHTV)="/usr/bin/mythtv"; #Process name to start
my ($XBMC)="/usr/share/xbmc/xbmc.bin"; #Process name to start
my ($KMYTHTV)="mythtv"; #Process name to use with killall
my ($KXBMC)="xbmc.bin"; #Process name to use with killall
my ($KMPLAYER)="mplayer"; #Also kill any external players
my ($KILLALL)="/usr/bin/killall"; #kill command.
my ($AUDIOHACK)="/usr/bin/iecset audio on"; #Shitty Alsa hack with intel HDA
################################################## ################################################## ###########################
You'll just need to adjust the path to your xbmc and mythtv installs if they're not in the default locations as I have. From memory I left everything else as per Arkay's example that I downloaded. As mentioned, the code snippet above is within appswitch.pl, fairly close to the top... I hope that helps.
Cheers,
Adam.
dteirney
2009-05-05, 11:08
The standard myth:// source (not MythBox) allows you to change up and down channels when watching Live TV. Press whatever is mapped to PageUp to go up a channel and press whatever is mapped to PageDown to go down a channel. You don't need to stop playback and then choose the next channel.
Granted channel changing is painfully slow though. Starting playback of any recordings seems to have gotten slower as well. Not sure if I'm just imagining things though.