Kodi Community Forum

Full Version: [RELEASE] MythBox for XBMC - a MythTV Front-end Python Script for XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think there's a way to spit out logging straight to the screen, but I don't know how to do that off the top of my head. However, you could always check ~/.xbmc/temp/xbmc.log to see if anything shows up there.

Otherwise, the built-in mythtv functionality worked fine for me in Dharma beta 3. How are you adding it as a source? The following source syntax worked for me:
Code:
myth://<myth user>:<myth db password>@<host>/

It's not nearly as pretty as mythbox but it'll do the job for the time being, though at home it doesn't have a particularly high WAF.
Deleted
@dyinman

Will check out the logs, but thanks for the reminder on the myth://path

I rechecked my sources.xml and I was using an ip, sure it read the contents but never played the clip through. I must have hacked something in the past on my other system that enabled using IPs instead of hostnames(this sources file has been around a while)

Swapped the IP for a hostname and voila!

Thanks for the info and the quick replies!Big Grin
For all you guys running dharma...

Pull down the latest trunk. I just fixed the 4 major issues w/ dharma:

1. Labels/translations blank or plain old wrong
2. coverflow on home page spins busy indefinitely until you navigate to it
3. edit/create schedule dialog box missing labels/controls
4. i don't remember but i know i fixed something...


cd ~/.xbmc/addons
ln -sf <dir where mythbox is checked out> script.mythbox


let me know if it works..
analogue Wrote:let me know if it works.
Yes, it works correctly with Dharma. Translations are also displayed natively with this last version.
Good work done... I will sent you soon by email a new updated french translation. (with last changes)
1. Never used those, so I can't comment. Sorry...
2. Works
3. Works

Other than that, I'm still experiencing some stability issues (pressed "stop" while watching a recording and it froze). Channel surfing is also still really slow for some reason.

Thanks for all the work you've put into this! I find it easier/cooler to use than the native MythTV frontend.

Question: will it some day be able to stream recordings without needing to mount a shared folder from the backend?
analogue Wrote:For all you guys running dharma...

Pull down the latest trunk. I just fixed the 4 major issues w/ dharma:

let me know if it works..

Recording screens now show proper verbage...looks good. Play show from watch TV works but when selecting show from guide I got an invalid number of arguments error.

06:29:56 T:3077732208 M:1577127936 DEBUG: OnKey: 61453 pressed, action is Select
06:29:56 T:2746731376 M:1577127936 NOTICE: ERROR | mythbox.core | util.py | MainThread | Line 394 | (<class exceptions.TypeError at 0xad5ec8c>, <exceptions.TypeError instance at 0xa069554>, <traceback object at 0xadd2864>)
06:29:56 T:2746731376 M:1577127936 NOTICE: .
06:29:56 T:2746731376 M:1577254912 NOTICE: ERROR | mythbox.core | util.py | MainThread | Line 395 | CATCHALL_UI: Caught <type 'instance'> exception getLiveTvBrain() takes exactly 3 arguments (2 given) on method <function onControlHook at 0xb0309e4>
Dobyken Wrote:Recording screens now show proper verbage...looks good. Play show from watch TV works but when selecting show from guide I got an invalid number of arguments error.

06:29:56 T:3077732208 M:1577127936 DEBUG: OnKey: 61453 pressed, action is Select
06:29:56 T:2746731376 M:1577127936 NOTICE: ERROR | mythbox.core | util.py | MainThread | Line 394 | (<class exceptions.TypeError at 0xad5ec8c>, <exceptions.TypeError instance at 0xa069554>, <traceback object at 0xadd2864>)
06:29:56 T:2746731376 M:1577127936 NOTICE: .
06:29:56 T:2746731376 M:1577254912 NOTICE: ERROR | mythbox.core | util.py | MainThread | Line 395 | CATCHALL_UI: Caught <type 'instance'> exception getLiveTvBrain() takes exactly 3 arguments (2 given) on method <function onControlHook at 0xb0309e4>




Recorder screen does show correct now, however does addinging a recording work? I click save, but it never shows up in upcoming recording. I can also not start recording a live show. (might be due to dharma)

I also get the live TV error.
Code:
2:56:05 T:2779609968 M:3502137344  NOTICE: ERROR | mythbox.core | util.py | MainThread | Line 395 | CATCHALL_UI: Caught <type 'instance'> exception getLiveTvBrain() takes exactly 3 arguments (2 given) on method <function onControlHook at 0xb90a25c>
                                            Traceback (most recent call last):
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/util.py", line 392, in catchall_ui
                                                return func(*args, **kw)
                                              File "<string>", line 1, in <lambda>
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/util.py", line 205, in lirc_hack
                                                return func(*args, **kwargs)
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/ui/tvguide.py", line 339, in onControlHook
                                                self.watchLiveTv(program)
                                              File "<string>", line 1, in <lambda>
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/ui/toolkit.py", line 193, in window_busy
                                                result = func(*args, **kwargs)
                                              File "<string>", line 1, in <lambda>
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/mythtv/conn.py", line 122, in inject_conn
                                                result = func(*args, **kwargs)
                                              File "/home/media/.xbmc/addons/script.mythbox/resources/src/mythbox/ui/tvguide.py", line 314, in watchLiveTv
                                                brain = self.conn().protocol.getLiveTvBrain(self.settings)
                                            TypeError: getLiveTvBrain() takes exactly 3 arguments (2 given)
from what i've read, myth is an interface for pvr, or dvr cards...I have the FIOS MOTOROLA HD DVR and I also have a Mygica hybrid HD Thriller ClearQAM, ATSC/NTSC PCI card...how would I integrate mythtv into one or both of those on windows...I downloaded the windows frontend and backend of myth, but have yet to set either up...anyone got a good walkthrough that would somehow integrate my FIOS HD DVR into myth and xbmc as a front end?
modernninja Wrote:from what i've read, myth is an interface for pvr, or dvr cards...I have the FIOS MOTOROLA HD DVR and I also have a Mygica hybrid HD Thriller ClearQAM, ATSC/NTSC PCI card...how would I integrate mythtv into one or both of those on windows...I downloaded the windows frontend and backend of myth, but have yet to set either up...anyone got a good walkthrough that would somehow integrate my FIOS HD DVR into myth and xbmc as a front end?

There are a few MythTV setup guides. You can start here:
http://www.mythtv.org/wiki/User_Manual:D...on_Backend

Somewhere in the MythTV wiki is a list of supported hardware so you would need to check to see if you QAM card is in the list. In most cases you will only be able to get local channels via QAM. As for your HD DVR the only way to hook that up to get all your HD channels would be using something like the Hauppauge HDPVR which captures component video. You would not be able to record anything that requires a secure digital HDMI connection like pay for view. On the surface MythTV looks complicated but once you learn a few of the quirks it's pretty easy. If you're using XBMC as the front end then myth setup is a lot easier since you're not required to configure the video and music features.

Software wise the choices are very limited if you want to use XBMC. There's built in support for Myth but it's a little on the crude side. There are a small subset of XBMC developers working on the PVR branch but it could be another year or two before we see it migrated into main branch . The Mythbox addon is about the only choice for XBMC that gives you a decent guide along with viewing and recording features. Mythbox too is under development but at least we can see the progress Analogue is making and the effort he's putting into it. It's still a little buggy yet on the new XBMC version but he's getting things fixed as fast as he can.
Quote:As for your HD DVR the only way to hook that up to get all your HD channels would be using something like the Hauppauge HDPVR which captures component video.

Well, actually, you can use the firewire port on the HD DVR to capture the video. The FCC requires that the firewire port is active on these boxes, and so what you would end up doing is hooking up an IR blaster to control the HD DVR (changing channels, etc) and the firewire port to do the capture. There's a ton of people who do this (works with satellite tv too), and it's fairly straight forward to set up like this. If you have any questions, the MythTV forums are a pretty good resource.
dyinman Wrote:Well, actually, you can use the firewire port on the HD DVR to capture the video. The FCC requires that the firewire port is active on these boxes, and so what you would end up doing is hooking up an IR blaster to control the HD DVR (changing channels, etc) and the firewire port to do the capture. There's a ton of people who do this (works with satellite tv too), and it's fairly straight forward to set up like this. If you have any questions, the MythTV forums are a pretty good resource.

You're mostly correct except I've had both Dishnet and DirecTV and none of them come with firewire ports except the Dish5000 which required a hack to get it working. They do, however, have USB ports which can be used for changing channels. It also assumes the user has a firewire port on his system and that the port on the cable box is active. Some cable companies don't turn them on by default and you have to threaten them with a complaint to the FCC.
Analogue, I saw you changed the code by adding the missing arg in the load script from the guide...that worked and I was able to start watching a show on my PVR-150. After 10 minutes I clicked the stop button with the mouse and everything froze up. I waited a few minutes then ran my killxbmc script from a terminal. Operating system is Mythbuntu 10.04, Mythtv .23fixes and XBMC dharma beta 3.

Here's the log entry from when watching to the end of the log:

12:38:49 T:3061644144 M:1595142144 DEBUG: Process - MythTV event UNKNOWN (error?)
12:44:56 T:3077965680 M:1587335168 DEBUG: Previous line repeats 36 times.
12:44:56 T:3077965680 M:1587335168 DEBUG: UDisks: DeviceChanged (/org/freedesktop/UDisks/devices/sdb)
12:44:56 T:3077965680 M:1587335168 DEBUG: DBus: Creating message to org.freedesktop.UDisks on /org/freedesktop/UDisks/devices/sdb with interface org.freedesktop.DBus.Properties and method GetAll
12:44:56 T:3077965680 M:1587335168 DEBUG: UDisks: DeviceChanged - DeviceUDI /org/freedesktop/UDisks/devices/sdb: IsFileSystem false HasFileSystem IsSystemInternal true IsMounted false IsRemovable false IsPartition false IsOptical false
12:44:56 T:3077965680 M:1587462144 DEBUG: UDisks: DeviceChanged (/org/freedesktop/UDisks/devices/sdc)
12:44:56 T:3077965680 M:1587462144 DEBUG: DBus: Creating message to org.freedesktop.UDisks on /org/freedesktop/UDisks/devices/sdc with interface org.freedesktop.DBus.Properties and method GetAll
12:44:56 T:3077965680 M:1587462144 DEBUG: UDisks: DeviceChanged - DeviceUDI /org/freedesktop/UDisks/devices/sdc: IsFileSystem false HasFileSystem IsSystemInternal true IsMounted false IsRemovable false IsPartition false IsOptical false
12:44:57 T:3077965680 M:1587834880 DEBUG: UDisks: DeviceChanged (/org/freedesktop/UDisks/devices/sda)
12:44:57 T:3077965680 M:1587834880 DEBUG: DBus: Creating message to org.freedesktop.UDisks on /org/freedesktop/UDisks/devices/sda with interface org.freedesktop.DBus.Properties and method GetAll
12:44:57 T:3077965680 M:1587834880 DEBUG: UDisks: DeviceChanged - DeviceUDI /org/freedesktop/UDisks/devices/sda: IsFileSystem false HasFileSystem IsSystemInternal true IsMounted false IsRemovable false IsPartition false IsOptical false
12:44:59 T:3061644144 M:1587617792 DEBUG: Process - MythTV event UNKNOWN (error?)
12:46:03 T:3077965680 M:1586954240 DEBUG: Previous line repeats 6 times.
12:46:03 T:3077965680 M:1586954240 DEBUG: ------ Window Init (VideoOSD.xml) ------
12:46:03 T:3077965680 M:1586954240 INFO: Loading skin file: VideoOSD.xml
12:46:03 T:3077965680 M:1587081216 DEBUG: Load VideoOSD.xml: 6.64ms
12:46:03 T:3077965680 M:1587081216 DEBUG: Alloc resources: 9.05ms (6.90 ms skin load)
12:46:07 T:3077965680 M:1586946048 DEBUG: ExecuteXBMCAction : Translating PlayerControl(Stop)
12:46:07 T:3077965680 M:1586946048 DEBUG: ExecuteXBMCAction : To PlayerControl(Stop)
12:46:07 T:3077965680 M:1586946048 NOTICE: CDVDPlayer::CloseFile()
12:46:07 T:2669607792 M:1587073024 DEBUG: CAnnouncementManager - Announcement: PlaybackSpeedChanged from xbmc
12:46:07 T:3077965680 M:1587073024 NOTICE: DVDPlayer: waiting for threads to exit
12:46:07 T:2669607792 M:1587085312 NOTICE: CDVDPlayer::OnExit()
12:46:07 T:2669607792 M:1587085312 NOTICE: DVDPlayer: closing audio stream
12:46:07 T:2669607792 M:1587085312 NOTICE: Closing audio stream
12:46:07 T:2669607792 M:1587085312 NOTICE: Waiting for audio thread to exit
12:46:07 T:2773121904 M:1587085312 DEBUG: CDVDPlayerAudio:: Discontinuity - was:-4536192.488258, should be:475080263.366227, error:479616455.854485
12:46:07 T:2773121904 M:1587085312 NOTICE: thread end: CDVDPlayerAudio::OnExit()
12:46:07 T:2773121904 M:1587085312 DEBUG: Thread 2773121904 terminating
12:46:07 T:2669607792 M:1587085312 NOTICE: Closing audio device
12:46:07 T:2669607792 M:1587085312 DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
12:46:07 T:2669607792 M:1587085312 DEBUG: RemoveActiveDevice - Removing device 2
12:46:07 T:2669607792 M:1587085312 DEBUG: CGUIAudioManager::Initialize
12:46:07 T:2669607792 M:1587085312 NOTICE: Deleting audio codec
12:46:07 T:2669607792 M:1587085312 NOTICE: DVDPlayer: closing video stream
12:46:07 T:2669607792 M:1587085312 NOTICE: Closing video stream
12:46:07 T:2669607792 M:1587085312 NOTICE: waiting for video thread to exit
12:46:07 T:2661215088 M:1586958336 NOTICE: thread end: video_thread
12:46:07 T:2661215088 M:1586958336 DEBUG: Thread 2661215088 terminating
12:46:07 T:2669607792 M:1586958336 NOTICE: deleting video codec
12:46:07 T:2669607792 M:1586958336 NOTICE: CDVDPlayer::OnExit() deleting demuxer
12:46:07 T:2669607792 M:1586958336 NOTICE: CDVDPlayer::OnExit() deleting input stream
12:46:07 T:3061644144 M:1587220480 DEBUG: Process - MythTV event DONE_RECORDING
12:46:07 T:3061644144 M:1596870656 DEBUG: Process - MythTV event LIVETV_CHAIN_UPDATE: LIVETV_CHAIN UPDATE live-htpc1-2010-10-27T12:38:02
12:46:07 T:3061644144 M:1596870656 DEBUG: Process - MythTV event UNKNOWN (error?)
12:46:07 T:2669607792 M:1598775296 DEBUG: CAnnouncementManager - Announcement: PlaybackStopped from xbmc
12:46:07 T:2669607792 M:1598775296 DEBUG: Thread 2669607792 terminating
12:46:07 T:3077965680 M:1598902272 NOTICE: DVDPlayer: finished waiting
12:46:07 T:3077965680 M:1598902272 DEBUG: LinuxRendererGL: Cleaning up GL resources
12:46:07 T:3077965680 M:1598902272 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate
12:46:07 T:3077965680 M:1598902272 DEBUG: ------ Window Deinit (VideoFullScreen.xml) ------
12:46:07 T:3077965680 M:1598902272 DEBUG: ------ Window Deinit (VideoOSD.xml) ------
12:46:07 T:3077965680 M:1599918080 DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new
12:46:07 T:3077965680 M:1599918080 DEBUG: ------ Window Init (/home/ken/.xbmc/addons/plugin.video.mythbox/resources/skins/Default/720p/mythbox_tvguide.xml) ------
12:46:07 T:3061644144 M:1599918080 DEBUG: Process - MythTV event UNKNOWN (error?)
12:46:07 T:3077965680 M:1599918080 DEBUG: Alloc resources: 5.79ms (0.00 ms skin load)
Hey, this is a truly useful program to have, thanks for proving itNod

Been having a blast using it, most of it works in live dharma beta 3, and I can see our household using it in the near future.

I'd like to integrate it to Confluence, but launching it as a favorite doesn't seem to work on my end. I have to go into the programs category and launch it from there.

Can anyone just add it as a favorite and launch it? All I get is a greyed out programs wallpaper from confluence...Huh

thx
Is anyone having progressively worse audio sync issues when playing back video with this script?

I love the script and want to use it, but the audio gets way out of sync as it plays. Audio is ahead of the video. It happens fast enough that it is unwatchable between commercial breaks. Skipping the video forward or back puts it back in sync. When played through MythTV frontend it works perfectly fine all the way through.

I have an ION box using VDPAU, CPU is around 10% on average while playing a recording. XBMC is 9.11 running on Mythbuntu 10.04, with MythBox RC2, Myth Backend is running 0.23.1+fixes26437-0ubuntu1.

Any ideas?

Thanks