MythTV Backend Scheduler

Tell us your most wanted features from QNAP products.

Re: MythTV Backend Scheduler

Postby 321liftoff » Tue Mar 20, 2012 7:28 pm

Lately, I've been having strange behavior with mythbackend, where I will start it and come back later to find that it is no longer running. I check the dmesg, and MythTV.log and don't see any errors or messages that point to the program crashing; it just seems to quit on its own. I tried running "mythbackend -v all" to really see if there was something going on, but again no errors. I don't know if compiling on firmware 3.5.1 and then upgrading to 3.6.0 has anything to do with it.

Is there another log I can look at? Anyone else having this issue?

UPDATE:
I reverted to 3.5.1 and was still having the same issue. So I tried disabling upnp through inspiration of this site. It seemed to help. So I upgraded to 3.6.1 and it's working there also. So my new command in the script is as follows:

Code: Select all
/share/MD0_DATA/.qpkg/Optware/bin/mythbackend --noupnp --noautoexpire --daemon


Since running this, it's been stable for a couple of days. I added the noautoexpire just to experiment, so I don't know if that's helping stability either...
321liftoff
Know my way around
 
Posts: 142
Joined: Sat Oct 22, 2011 6:54 pm
NAS Model: TS-219P+

Re: MythTV Backend Scheduler

Postby meshuga » Tue Apr 24, 2012 2:35 am

I can't get QT to compile, even using 4.7.4:
http://c.hadm.net/G4bG

I first encountered the same '64bit not enabled' issues others had, since I am compiling on a TS-809.

I got passed that by using '-platform linux-g++-32'.

I have modified g++.conf under mkspecs to have '-march=i686' add the end of QMAKE_CC and QMAKE_CXX but get the same issues.

If anyone has any ideas, please let me know.

I am using 3.6.1 firmware.
meshuga
Starting out
 
Posts: 49
Joined: Tue Nov 03, 2009 8:55 am
NAS Model: TS-809 Pro

Re: MythTV Backend Scheduler

Postby ybot » Tue Apr 24, 2012 6:52 am

@meshuga

I don't have a x86 platform, however http://stackoverflow.com/questions/7994 ... -and-add-4 would suggest that you are still looking at a 32/64 bit issue.
ybot
Starting out
 
Posts: 49
Joined: Sun Jul 31, 2011 3:50 pm
NAS Model: TS-109/209 Pro II

Re: MythTV Backend Scheduler

Postby meshuga » Wed Apr 25, 2012 8:42 am

Correct! I played with the same settings and was able to get it compiled!! Thanks for the tip.

But now I can't get X11 Forwarding working on the QNAP. I got it going fine on my Linux box from my Mac. Here's a log:
http://c.hadm.net/G6nj

I ssh into my linux machine with -X, DISPLAY is correct, run xterm and it comes up great.
When I do the same from the QNAP, it doesn't set DISPLAY variable, in addition even if I use the same session info (localhost:10.0) it still won't connect.

Sorry to ask basic Linux questions, but I'm stumped (and think it might be a QNAP issue?) and thought I'd ask you guys for ideas. Maybe I can use MythWeb or something else to do the basic configuration?
meshuga
Starting out
 
Posts: 49
Joined: Tue Nov 03, 2009 8:55 am
NAS Model: TS-809 Pro

Re: MythTV Backend Scheduler

Postby ybot » Wed Apr 25, 2012 9:14 am

@meshuga

Yeah, X11 forwarding is a real pain to get working correctly. I followed a systematic path to get it working.

* Make sure you are able to get Qnap -> display working correctly, this might involve turning logging on for ssh on the qnap and x server on the host.
* Consider authentication issues, I know on my OSX setup I was puzzled for a while why it was not connecting correctly.

meshuga wrote:When I do the same from the QNAP, it doesn't set DISPLAY variable, in addition even if I use the same session info (localhost:10.0) it still won't connect.

So when you set the DISPLAY variable on the remote machine you are telling remote applications they should use this address to display their graphical content. So, for local applications it makes sense to have the DISPLAY set to localhost:<something>, however your remote machine's DISPLAY should be set to the IP address of the local computer (the one you are looking at) and the port, well that can be tricky, it is usually '0.0'. I was fritzing around with this for a long time to get it right. So when I set mine it was something like "DISPLAY=192.168.0.7:0"

meshuga wrote:Sorry to ask basic Linux questions, but I'm stumped (and think it might be a QNAP issue?) and thought I'd ask you guys for ideas.

No problems, everyone was learning this stuff at some stage. And especially when you are so close :) !

meshuga wrote:Maybe I can use MythWeb or something else to do the basic configuration?

The MythWeb component does not provide a low enough interface to configuration. You can only scan and add channels in the mythtv-setup application (CLI would be good, but I'm not writing it).

ps TVHeadEnd also exists for QNAP, so if you want something more specific for dvb tuners you might try that instead viewtopic.php?p=262397
ybot
Starting out
 
Posts: 49
Joined: Sun Jul 31, 2011 3:50 pm
NAS Model: TS-109/209 Pro II

Re: MythTV Backend Scheduler

Postby meshuga » Wed Apr 25, 2012 9:50 am

Looks like I got it! I forgot 'xhost +' on OSX, and using 'DISPLAY=192.168.0.10:0' fixed me right up. Presently scanning for channels. I just found out I have to rebuild (I need mythtv-.24-fixes apparently for HDHR PRIME) but at least its scanning on my old HDHR!

Thanks for all your help ybot. If I can help with making a QPKG let me know.
I'm also testing with TVHeadend, but it ** for us North American users because of how it does channel mapping, especially for HDHR. I'm hoping MythTV is a little better.
meshuga
Starting out
 
Posts: 49
Joined: Tue Nov 03, 2009 8:55 am
NAS Model: TS-809 Pro

Re: MythTV Backend Scheduler

Postby ybot » Wed Apr 25, 2012 10:13 am

@meshuga

Excellent, good to hear of your success!

QPKG is an interesting issue, I have had success with compilation of Qt into a ipkg, and have gotten most of the way with a mythtv ipkg. However I looked into the qpkg format and didn't really know where to start, so gave up at that point, besides mine works, so I have not really experimented. Although now with the release of .25 I am going through the build process in exactly the same way.

I would like to give TVHeadEnd a test run, but it does not support my tuner.
ybot
Starting out
 
Posts: 49
Joined: Sun Jul 31, 2011 3:50 pm
NAS Model: TS-109/209 Pro II

Re: MythTV Backend Scheduler

Postby meshuga » Wed Apr 25, 2012 1:27 pm

ybot wrote:@meshuga
I would like to give TVHeadEnd a test run, but it does not support my tuner.


Are you in the states? I'd be happy to donate you a ATSC/QAM tuner if so. I have 4 USB ones I don't use anymore.

Did you see the QDK info? http://wiki.qnap.com/wiki/QPKG_Development_Guidelines

ipkg would be pretty ** good too though.
QT definitely seems to be the hardest to compile, esp on 64bit platforms like mine.

Did you get .25 to compile? I'm having problems because I need the patches on the wiki, and they dont apply cleanly to .25.
Any tips/tricks? Thanks!
meshuga
Starting out
 
Posts: 49
Joined: Tue Nov 03, 2009 8:55 am
NAS Model: TS-809 Pro

Re: MythTV Backend Scheduler

Postby virtualdj » Wed Apr 25, 2012 5:06 pm

ybot wrote:However I looked into the qpkg format and didn't really know where to start, so gave up at that point, besides mine works, so I have not really experimented.

Actually Micke has done a great work, and building a QPKG is not a difficul thing.

Just install the QDK QPKG, create a folder on your NAS using SSH and type:
Code: Select all
# qbuild --create-env MythTV

It will create some folders where you should place your files; you will have to compile the application for all the processor architectures you want to deploy to and copy the relevant files on the corresponding subdirectories.
The difficult part is creating a Bash script (which will be named as the QPKG, so MythTV.sh in your case) which should handle at least two arguments: start (called at NAS start) and stop (called before poweroff). Inside that script you should enable or disable your app, the same way that you do manually through SSH.

When I first approached QDK, I read the PDF documents that Micke had created (those linked on the wiki page) but I found more easy to "decompile" some QPKGs to see how they were built.

I was (and am) a Linux noob, so I don't think you shouldn't be able to, if you have some spare time (always the hardest part...). I also think that it should be easier to do QPKG than IPKG (but I don't know the latter a lot).

Just to say, my hardest thing to build was the XMLTV QPKG because it had a lot of dependencies; TVHeadend QPKG for the app was easier (it was quite self-contained) but there were some quirks with the hotplug patching and the load/unload of kernel modules.
But in the end, I've done it! 8)

ybot wrote:I would like to give TVHeadEnd a test run, but it does not support my tuner.

Just out of curiosity, what tuner do you have?
virtualdj
Been there, done that
 
Posts: 622
Joined: Wed May 26, 2010 2:44 am
NAS Model: TS-239 Pro II

Re: MythTV Backend Scheduler

Postby ybot » Wed Apr 25, 2012 10:27 pm

Yeah, I have been interested in providing that, but as I said just have not got to it.

virtualdj wrote:if you have some spare time (always the hardest part...)

Yep, pretty much, I have been fooling around with a raspberrypi and qt5 of late. As well as seeing if there are any differences between mythtv .24 and .25 compilation and setup (doesn't seem to be, I'm up to channel config).

virtualdj wrote:Just out of curiosity, what tuner do you have?


An Afatech 9035 (http://www.linuxtv.org/wiki/index.php/Afatech_AF9035) and specifically with an FC0011 (http://www.linuxtv.org/wiki/index.php/EzCap_DVB_T_Stick). I have been able to compile a dvb-usb module to work with DVB using mythtv.
ybot
Starting out
 
Posts: 49
Joined: Sun Jul 31, 2011 3:50 pm
NAS Model: TS-109/209 Pro II

Re: MythTV Backend Scheduler

Postby 321liftoff » Fri Apr 27, 2012 8:50 am

@meshuga and ybot, the directions on the wiki for setting up X-forwarding for windows worked for me. If you have some time, maybe add to the wiki the steps you took to setup on OSX to help others?

@meshuga, what firmware version are you using? I had problems getting QT 4.7.4 to compile in 3.5.2 on an QNAP ARM x19 (3.5.1 worked). I haven't tried but I wonder if 3.6 has more problems? For me also (USA, FL), TVHeadend has been a pain for channel mapping: after scanning muxes and mapping to services, each service has to be mapped to a xmltv channel and this has to be done for each HDHR tuner. Is this a result of using ATSC with TVHeadend, where dvb maps the xmltv channels automatically?

@virtualdj, thanks for the QPKG tips. Time permitting, I may give it a shot...at least for the ARM architecture. I'm fearing how to include all the dependencies for QT and MythTV. I remember in the beginning installing everything, just to make sure it would work because having the 12hour compile stop in the middle is very frustrating! I think step 1 for this would be to double check the dependencies specified by the wiki. I posted a MythTV.sh on the wiki (based heavily on TVHeadend.sh), since I created a pseudo QPKG to start and stop MythTV on boot/shutdown; it's at least a start for whoever wants to build a QPKG.
321liftoff
Know my way around
 
Posts: 142
Joined: Sat Oct 22, 2011 6:54 pm
NAS Model: TS-219P+

Re: MythTV Backend Scheduler

Postby virtualdj » Sat Apr 28, 2012 12:04 am

Just for information, when you've built the MythTV Backend how will you "connect" to it?
Does it have a web interface to schedule recordings? Is there any program (also for Windows) that do the frontend (e.g. to watch TV live)?

I haven't understood this things very well at the MythTV website.
virtualdj
Been there, done that
 
Posts: 622
Joined: Wed May 26, 2010 2:44 am
NAS Model: TS-239 Pro II

Re: MythTV Backend Scheduler

Postby ybot » Sat Apr 28, 2012 8:12 am

@virtualdj

MythTV contains both a frontend and backend. Scheduling can occur from a web interface as well as several platform frontends.
ybot
Starting out
 
Posts: 49
Joined: Sun Jul 31, 2011 3:50 pm
NAS Model: TS-109/209 Pro II

Re: MythTV Backend Scheduler

Postby 321liftoff » Sat Apr 28, 2012 10:35 pm

There is a web interface that must be installed separately called MythWeb. For the frontend, I'm using XBMC with the libcmyth add-on, which is in development as all the features aren't ironed out. If you look at the wiki here, there's a link to a XBMC forum where there are some downloads, including a windows xbmc setup with the addon included. Another one for Windows that worked for me was MythTv Player. It's not intended to be used with a remote, but is a simple interface to play and delete exiting recordings.

I'm curious to know what frontend everyone is using...
321liftoff
Know my way around
 
Posts: 142
Joined: Sat Oct 22, 2011 6:54 pm
NAS Model: TS-219P+

Re: MythTV Backend Scheduler

Postby 321liftoff » Mon Apr 30, 2012 5:46 am

If you have mythtv on the QNAP as the master backend, has anyone tried to get commercial detection to work on a slave backend (or jobqueue)? I tried using a windows binary 0.24.3 from here with a 0.24.1 backend on the QNAP. I followed the directions here to have transcoding and commercial detection disabled on the QNAP and enabled on the windows machine. When I flag a recorded show for commercial detection, the jobqueue running on windows detects the job, but stops milliseconds later:

Code: Select all
2012-04-29 16:53:09.578 MythJobQueue, Warning: Unable to ignore SIGPIPE
2012-04-29 16:53:09.578 mythjobqueue version: fixes/0.24 [v0.24.3-2-ge12af86-dirty] www.mythtv.org
2012-04-29 16:53:09.578 Using runtime prefix = C:/Program Files/MythTV
2012-04-29 16:53:09.578 Using configuration directory = C:/Documents and Settings/Parris/.mythtv
2012-04-29 16:53:09.593 Empty LocalHostName.
2012-04-29 16:53:09.609 Using localhost value of laptopold
2012-04-29 16:53:09.609 Testing network connectivity to '192.168.25.120'
2012-04-29 16:53:09.687 New DB connection, total: 1
2012-04-29 16:53:09.718 Connected to database 'mythconverg' at host: 192.168.25.120
2012-04-29 16:53:09.734 Closing DB connection named 'DBManager0'
2012-04-29 16:53:09.734 Connected to database 'mythconverg' at host: 192.168.25.120
2012-04-29 16:53:09.750 Current locale en_US
2012-04-29 16:53:09.750 Reading locale defaults from C:/Program Files/MythTV/share/mythtv//locales/en_us.xml
2012-04-29 16:53:09.875 MythCoreContext: Connecting to backend server: 192.168.25.120:6543 (try 1 of 1)
2012-04-29 16:53:09.921 Using protocol version 63
2012-04-29 16:53:09.968 New DB connection, total: 2
2012-04-29 16:53:09.968 Connected to database 'mythconverg' at host: 192.168.25.120
2012-04-29 17:33:59.593 Event socket closed. No connection to the backend.
****REBOOT MYTHTV BACKEND for a clean logfile ***
2012-04-29 17:35:31.578 JobQueue: Commercial Detection Starting for "CBS News Sunday Morning" recorded from channel 1061 at 2012-04-29T09:00:00
2012-04-29 17:35:31.593 commflag: Commercial Detection Starting: "CBS News Sunday Morning" recorded from channel 1061 at 2012-04-29T09:00:00
2012-04-29 17:35:31.625 MythCoreContext: Connecting to backend server: 192.168.25.120:6543 (try 1 of 1)
2012-04-29 17:35:31.656 Using protocol version 63
2012-04-29 17:35:32.328 commflag: Commercial Detection Finished: "CBS News Sunday Morning" recorded from channel 1061 at 2012-04-29T09:00:00 (1 commercial break(s))

I've never used MythTV before having it on the NAS, so I don't know what it should be doing. It could be the incompatibility between the two versions (0.24.1 and 0.24.3), but I doubt it. Anything glaringly wrong? Link to MythTV.log
321liftoff
Know my way around
 
Posts: 142
Joined: Sat Oct 22, 2011 6:54 pm
NAS Model: TS-219P+

PreviousNext

Return to Features Wanted

Who is online

Users browsing this forum: lunaticasylum and 3 guests