[DOCKER] Mythtv


Recommended Posts

It shouldn't make a jot of difference where you point the recordings folder, I use TVHeadEnd and can successfully point to a non-array drive (Have done in the past) The mount point makes no difference.

 

I'm all out of ideas, but if you're still struggling in a couple of days I'll try and fire up the docker and test it.  Can't do it right now as the wife is watching TV..  ::)

Link to comment
  • Replies 236
  • Created
  • Last Reply

Top Posters In This Topic

It shouldn't make a jot of difference where you point the recordings folder, I use TVHeadEnd and can successfully point to a non-array drive (Have done in the past) The mount point makes no difference.

 

I'm all out of ideas, but if you're still struggling in a couple of days I'll try and fire up the docker and test it.  Can't do it right now as the wife is watching TV..  ::)

 

get in there and show her who's the boss.

Link to comment

It shouldn't make a jot of difference where you point the recordings folder, I use TVHeadEnd and can successfully point to a non-array drive (Have done in the past) The mount point makes no difference.

 

I'm all out of ideas, but if you're still struggling in a couple of days I'll try and fire up the docker and test it.  Can't do it right now as the wife is watching TV..  ::)

 

get in there and show her who's the boss.

She knows who's boss, but if you want to try and convince her it's anyone else be my guess and pop around...

 

Good Luck with that.

Link to comment

 

get in there and show her who's the boss.

CHBMB, my guess is that Sparkly likely has several tents - in addition to a sizable alimony payment - that he could loan to you.

 

It shouldn't make a jot of difference where you point the recordings folder, I use TVHeadEnd and can successfully point to a non-array drive (Have done in the past) The mount point makes no difference.

 

My stand-alone Myth box points to a separate drive as well. Are you using TVHeadEnd in a VM or a docker?

Link to comment

get in there and show her who's the boss.

 

CHBMB, my guess is that Sparkly likely has several tents - in addition to a sizable alimony payment - that he could loan to you.

 

Quite possibly, he's always come across as a smooth talking beast, women would fall at his feet in amazement at his dockerising skills.  This would also be a good reason not to take his marriage guidance.  ;D

 

Just for giggles, I worked out how much it would cost me if we got divorced (I had a bit more in the way of financial security than my wife, and quite a bit less in terms of loans, in fact I didn't even find out about my wife's student loans until we were married!) Let's just say I can't afford to get divorced. I did tell Mrs CHBMB that if I could see my time again I'd get a pre-nuptial agreement, hehe  ;D

 

My stand-alone Myth box points to a separate drive as well. Are you using TVHeadEnd in a VM or a docker?

 

I use TVHeadEnd in Saarg's docker, with my DVB-Tuner passed through to it.  Using Kodi (Openelec) as a client.  I've also used Argus TV in a Win7 VM before anyone worked out how to passthrough DVB hardware to a container. 

 

I have setup MythTV before, helping Sparklyballs test it, (In fact, think I was meant to do a write up for him, forgot about that as I was in the midst of a house move - Sorry Sparkly, but the video is pretty self-explanatory)

Link to comment

Thanks CHBMB. I saw Saarg's TVHeadEnd docker post/thread, but it looked as if there were still some loose ends, so I decided not to mess with it. Besides, I was somewhat familiar with the Myth interface.

 

Perhaps I'll have to re-consider - after I figure out Sparkly's "smooth talking beast" ways to buy me some more time at home ...

Link to comment

Did you ever try reformatting your drive as xfs?  Been thinking about it and the MythTV docker is almost a OS inside a docker, so it might make sense to try a Linux natively compatible file system.

Yes, I re-formatted it last night as XFS and re-mounted it via "Unassigned Devices" - but nothing changed. It shows up as a separate drive when I go into my UnRaid box via Windows too. Yet, when I map to it via the Myth docker (by clicking in the box and navigating to it vs. manually typing the text, so as to avoid transcription errors), nothing transfers into it (which, because of my OS guide recordings issue, would only be my livetv files).
Link to comment

Did you ever try reformatting your drive as xfs?  Been thinking about it and the MythTV docker is almost a OS inside a docker, so it might make sense to try a Linux natively compatible file system.

Yes, I re-formatted it last night as XFS and re-mounted it via "Unassigned Devices" - but nothing changed. It shows up as a separate drive when I go into my UnRaid box via Windows too. Yet, when I map to it via the Myth docker (by clicking in the box and navigating to it vs. manually typing the text, so as to avoid transcription errors), nothing transfers into it (which, because of my OS guide recordings issue, would only be my livetv files).

 

No promises, I'll try and take a look, but pretty busy this week..

Link to comment

 

No promises, I'll try and take a look, but pretty busy this week..

 

No problem. In the big scheme of things and life this whole virtual TV thing is pretty meaningless. Nonetheless, now that I'm into it this far, I'm determined to figure it out somehow. Many thanks for your valuable time and input.

Link to comment

What volume mappings do you have now?

 

From telnet or console

ls -lah /mnt

Password:

Linux 4.0.4-unRAID.

Last login: Mon Aug 31 20:04:50 -0700 2015 on /dev/pts/0.

root@UR2:~# ls -lah /mnt

total 0

drwxr-xr-x 21 root  root  420 Aug 31 20:04 ./

drwxr-xr-x 18 root  root  380 Aug 31 20:03 ../

drwxrwxrwx  4 nobody users  32 Aug 30 15:13 cache/

drwxrwxrwx  7 nobody users 168 Aug 20 22:23 disk1/

drwxrwxrwx  7 nobody users 168 Apr 13  2013 disk10/

drwxrwxrwx  7 nobody users 168 Mar  1  2014 disk11/

drwxrwxrwx  7 nobody users 168 Apr 11  2014 disk12/

drwxrwxrwx  7 nobody users 168 Nov 21  2014 disk13/

drwxrwxrwx  7 nobody users 168 Aug 21 15:03 disk14/

drwxrwxrwx  3 nobody users  21 Aug 30 21:57 disk15/

drwxrwxrwx  6 nobody users 144 Apr  6  2014 disk2/

drwxrwxrwx  7 nobody users 168 Apr  6 06:51 disk3/

drwxrwxrwx  7 nobody users 168 Sep 28  2013 disk4/

drwxrwxrwx  7 nobody users 168 Apr  6  2014 disk5/

drwxrwxrwx  7 nobody users 168 Aug 24  2013 disk6/

drwxrwxrwx  7 nobody users 168 Mar 10  2013 disk7/

drwxrwxrwx  7 nobody users 168 Sep  7  2013 disk8/

drwxrwxrwx  7 nobody users 168 Feb 22  2013 disk9/

drwxrwxrwx  3 root  root  60 Aug 31 20:04 disks/

drwxrwxrwx  1 nobody users  32 Aug 30 21:57 user/

drwxrwxrwx  1 nobody users 168 Aug 30 21:57 user0/

root@UR2:~#

 

The "disks" drive is my non-array drive that I mounted with "Unassigned Devices".

 

 

Link to comment

 

 

One of my MythTV problems has mysteriously cleared up with a simple reboot of my UnRaid box! I'm sorry that I didn't try that earlier. I now get livetv to transfer to my non-array drive.

 

Thus, the only problem that I have left to resolve is why I cannot record via my onscreen guide. Again, live tv records with no problems AND I when I switch over to my other Ubuntu MythTV stand-alone box, I can record via the onscreen guide from it. I am utilizing Kodi on the same client computer (I merely change the IP in the Myth add-on), so I doubt that Kodi is the problem.

 

Again, when I remote into the MythTV docker, I don't seen any recordings from the onscreen guide in any of the var/lib/mythtv sub-folders (the live tv recordings are there so I know that something is working). Thus, I don't think that it is a docker mapping problem. Regardless, here are my current MythTV docker mappings (the "disks/ST31000340AS_9QJ0MD34-part2" partition is my non-array drive):

 

/home/mythtv /mnt/cache/.docker/myth/

/db /mnt/cache/.docker/myth/data/

/var/lib/mythtv /mnt/disks/ST31000340AS_9QJ0MD34-part2/myth/

 

Thanks in advance for any suggestions that you might have.

Link to comment

Ok, container is running, RDP in to the desktop and now have an issue where I cannot set my Unraid ip and the IPv4 Local Backend address.

 

pHybIH0l.png

 

I didn't run into this when I ran myth in a unbuntu VM, it found the IP right away.

 

Anyone have an idea on this one? All I can pull up are the 172 and 127 ip's. My server starts with 192

Link to comment

 

I finally found out what my problem was re not being able to record from the on-screen guide - and it was on my end. For whatever reason I never created a "Directory" in the "Default" group within "Storage Directories". Once I did this, I had instant success. I'm really sorry for wasting your time on this. Hopefully, however, somebody else will benefit from my idiocy. Thanks again for all of your help.

 

Sparkly, at the risk of increasing the size of your already exploded skull, you are back to being brilliant. Sorry that I every doubted you!

 

Link to comment

Ok, container is running, RDP in to the desktop and now have an issue where I cannot set my Unraid ip and the IPv4 Local Backend address.

 

pHybIH0l.png

 

I didn't run into this when I ran myth in a unbuntu VM, it found the IP right away.

 

Anyone have an idea on this one? All I can pull up are the 172 and 127 ip's. My server starts with 192

 

I just type the IP address in...

Link to comment

Ok, container is running, RDP in to the desktop and now have an issue where I cannot set my Unraid ip and the IPv4 Local Backend address.

 

pHybIH0l.png

 

I didn't run into this when I ran myth in a unbuntu VM, it found the IP right away.

 

Anyone have an idea on this one? All I can pull up are the 172 and 127 ip's. My server starts with 192

 

I just type the IP address in...

 

For some reason I cannot type anything in to that field. The other ones will let me change them, but that one only allows the two that already exist.

Link to comment

For some reason I cannot type anything in to that field. The other ones will let me change them, but that one only allows the two that already exist.

 

I've just gone back into it and I can't change it either.  I definitely typed it in manually yesterday, so maybe start again and see if it will let you do it initially.

 

Other than that can't think of anything else..

Link to comment

I don't know if NTFS on Unraid is a format that can be written to, although I know you can read it.

You have to use ntfs-3g to write. I do it all the time. Unassigned devices works for this.

it's all complicated stuff that mythtv.

 

I just formatted a drive in my Windows box with "plain" NTFS and transferred it to my UnRaid box. I then mounted it via the "Unassigned Devices" plugin as a non-array drive. After this, I mapped the /var/lib/mythtv/ location to the NTFS drive (in the MythTV docker/container) with no issues. For a non-Linux guy like me, it's fantastic because I don't have to mess with the Linux command line AND all of my recordings are easily accessible/playable/archivable via my Windows boxes.

Link to comment

For some reason I cannot type anything in to that field. The other ones will let me change them, but that one only allows the two that already exist.

 

I've just gone back into it and I can't change it either.  I definitely typed it in manually yesterday, so maybe start again and see if it will let you do it initially.

 

Other than that can't think of anything else..

 

For some reason on my first try the network type was set to Bridge. I upgraded my cache drive tonight and re-installed the container and the default is Host and I was able to enter the correct Ip for the server. I have the backend setup now (I think) and just need to setup the frontend plugin on Kodi tomorrow.

 

Thanks again for all your help, hopefully I will be watching TV tomorrow!

Link to comment

After further research, I still have no clue why it sometimes works and why it doesnt work. Looking at the log files, it seems to be something with the 'mythconverg' database in the mysql install. MythTV advises me to run 'optimize_mythdb.pl', but I could not find it in the installation (googled around a bit for different locations).

 

Found a copy of the script online

 

#!/usr/bin/perl -w
#
# Connects to the mythtv database and repairs/optimizes the tables that it
# finds.  Suggested use is to cron it to run once per day.
#
# @url       $URL$
# @date      $Date$
# @version   $Revision$
# @author    $Author$
# @license   GPL
#

# Includes
    use DBI;
    use MythTV;

# Connect to mythbackend
    my $Myth = new MythTV({'connect' => 0});

# Connect to the database
    $dbh = $Myth->{'dbh'};

# Repair and optimize each table
    foreach $table ($dbh->tables) {
        unless ($dbh->do("REPAIR TABLE $table")) {
            print "Skipped:  $table\n";
            next;
        };
        if ($dbh->do("OPTIMIZE TABLE $table")) {
            print "Repaired/Optimized: $table\n";
        }
        if ($dbh->do("ANALYZE TABLE $table")) {
            print "Analyzed: $table\n";
        }
    }

# Defragement seek table
    if ($dbh->do("ALTER TABLE `recordedseek` ORDER BY chanid, starttime, type")) {
        print "Defragmented: recordedseek\n";
    }
# Defragement program table
    if ($dbh->do("ALTER TABLE `program` ORDER BY starttime, chanid")) {
        print "Defragmented: program\n";
    }
# Defragement video seek table
    if ($dbh->do("ALTER TABLE `filemarkup` ORDER BY filename")) {
        print "Defragmented: filemarkup\n";
    }

 

When the script is run, I get:

 

DBI connect('database=mythconverg:host=localhost;port=3306','mythtv',...) failed: Access denied for user 'mythtv'@'localhost' (using password: YES) at /usr/share/perl5/MythTV.pm line 371.
Cannot connect to database:

 

This is because our mysql is not running on 3306, it runs on 3310. When I edit the MythTV.pm @ line 371 for the correct port, I get "Modification detected in read only file". So any ideas on how to change it so it connects at 3310? This is not my area of expertise. I can upload a copy of MythTV.pm if needed, but it can be found in the above location.

 

The 'optimize_mythdb.pl' script is also suggested to be added to a cron job and run daily, to keep the mythconverg database in optimal shape. MythTV Wiki

Link to comment

  • I'm trying to get Mythtv setup on unraid, I've searched forums, watched videos, read more posts than I can remember and I still don't think its right, please help. I setup unRAID last weekend (replacing Win7 machine with NextPVR). I've spent about 10hrs now trying to get MythTV setup.
     
    Unraid 6.1.0  w/ Parity + 4 Disks
    Unassigned Devices v2015.09.07a
      - currently pre-zeroing an upgrade for the array disk4
      - 400GB IDE drive xfs formated - I'd like to use for mythtv
      - two DVD drives
    Mythtv Docker using sparklyballs instructions
     
    I read that I can have recordings & livetv use an Unassigned Device so the parity drive is not also being written to when recording. This sounded like a good idea to me because I don't see the need to parity protect the livetv buffer or new recordings. I'd rather use unprotected storage for these things, then move recordings to a protected drive if I decide I want to keep it. 90% of the time, I delete after watching.
      So I installed Unassigned Devices v2015.09.07a and mounted the IDE drive /mnt/disks/ST3400632A_5NF0NRE5  I renamed it ST340 at one point, then started over and forgot to rename it before mounting it so this pass through the installation/setup I just left the name Unassigned Devices gave it.
      Followed sparklyballs (and others posted in this string) to install the MythTV container.  Please verify the volume mappings I've used make sense...
    in the Volume Mappings section I see the header lables; "Container volume:  Host path:  Access: "  The next line is two blank boxes under Container volume & Host path, then Read/Write was preselected under the Access column.  The 2-4 rows of Container volume: is prefilled with..
    /home/mythtv -> /mnt/disks/ST3400632A_5NF0NRE5/mythtv
    /db - >/mnt/disks/ST3400632A_5NF0NRE5/mythtv/data
    /var/lib/mythtv -> /mnt/disks/ST3400632A_5NF0NRE5/mythtv
     
    When save I received 'success' messages and see "mythtv" folder appear on the mounted, unassigned disk.  Then from Win10 RDP into mythtv (that took quite a while to figure out how to do since I didn't know anything about rdp or guacamole), and followed through the backend setup. That went pretty much as sparklyballs described in the video starting this thread.
     
    The WebUI keeps giving me errors on various pages but I can see the TVGuide and select a program to record. I connected KODI (running on another machine) to MythTV and Live TV worked one time (ie I could tune into a station and see video).
     
    PROBLEM - I don't think MythTV is actually using ST3400632A_5NF0NRE5 drive.
    • The mounted, unassigned drive shows up in Win10 explorer along side all the other disks in the unRAID computer (array drive, flash drive, shares) but there are no files.
    • MythTV WebUI -> Backend Status page shows Total Space: 5,689 MB - Space Used: 2,884 MB - Space Free: 2,804 MB

[*]From the unRAID console I've logged in as root, using ls and cd (about the only linux commands I know) I've found the ST3400632A_5NF0NRE5 drive and only see the same mythtv folder and the subfolders I created using Win10. No data of any kind.

 

 

Other odd thing is the MythTV log file I can open through the unRaid Dashboard -> Apps -> MythTV -> Logs

icon for kill switch is set
default config file(s) appear to be in place
.Xauthority file appears to in place
kill switch is set
setup desktop icon is set
mythtv folders appear to be set
Database(s) exists.
Starting MariaDB...
Checking whether database(s) are ready
waiting.....
waiting.....
waiting.....
waiting.....

The log keeps repeating this sequence.

Link to comment

While RDP into the box with mythtv user/password as described in the instructions here I see a gui directory explorer. The Volume Mappings are plainly viewed in the file system structure shown here. Also from within RDP I opened a xterm window, using cd & ls I can see the same folders/locations.

  From the unRAID console I logged into Tower as root.  I've explored the file system available there and have been unable to find a tie of any kind between the files/folders I see logged in as the mythtv xterm & root from the unRAID console.  I expected to see a user home directory for mythtv while exploring as root. I figured once I figured out where mythtv is saving everything, I'd have a better idea how to point it to the right place.

please help!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.