Migrating WMC Recorded TV files to MythTV

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
afremont
Newcomer
Posts: 9
Joined: Sat May 23, 2015 9:08 am
United States of America

Migrating WMC Recorded TV files to MythTV

Post by afremont » Sun May 24, 2015 11:26 pm

What's the best way? I've done some Googling and found suggestions to just put the WTV files into the videos directory, but this is kind of ugly since it doesn't seem to have a series concept of the shows. Is there a way to put them into the recordings folder and get them scanned into the database? Is there a good way to name them so that they will be recognized as episodes of a series? I could use some advice here. I have about 1.6TB of recordings and I'd really like them to show up as recorded TV series in myth instead of 2048 individual videos. If I could accomplish this then the Raspberry Pi front-end would be a seamless migration solution.

User avatar
bill6502
Developer
Posts: 1367
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Migrating WMC Recorded TV files to MythTV

Post by bill6502 » Mon May 25, 2015 12:51 am

Take a look at this: https://www.mythtv.org/wiki/Mythlink.pl
I know it's popular, but haven't used it myself.

afremont
Newcomer
Posts: 9
Joined: Sat May 23, 2015 9:08 am
United States of America

Re: Migrating WMC Recorded TV files to MythTV

Post by afremont » Mon May 25, 2015 10:13 am

I found that, and I'm going to play with it a bit. I also found some other utilities that would rename the WMC recordings using embedded metadata. I found that I can use avconv (ffmpeg fork?) to extract the metadata from WMC recordings. I'm new to MythTV in a way, but I used to run it about 12 or 13 years ago.

SInce I want these to be grouped with TV recordings and not filed as videos per se, I'm thinking of writing something (assuming nobody else has yet) in C or possibly perl that will extract the metadata and load it into the Myth DB "recorded" table. I can't seem to find a lot of documentation on exactly what else is required to make it all work. I've dumped some records from the "recorded" and "recordedprogram" tables. I see other tables that seem to be related, but have no information in them. Right now I only have about 80 recordings made by MythTV so the database is still small enough to dump and review. Are there any other tables that I need to consider?

I'm a bit confused as to why I have 84 rows in the "recorded" table and 88 rows in the "recordedprogram" table. I don't want to destroy my database, so I'll be backing it up as I experiment with it. I'm hoping that I can get these files loaded into the database so that they appear to be actual TV recordings that were made by MythTV. I have over 2000 recordings that were made by WMC and they go back to 2013. I'm sure that I have a good many duplicates and I also want to strip them out of archive to free up some space. For example, I have 376 recordings of Perry Mason, but there were only 271 total episodes produced. I could free up about 90GB at least by cleaning that up.

Any ideas where I could go and chat with some developers or other experts on what I need to do exactly to make entries in the MythTV DB that won't break things? The wiki is helpful, but quite sparse on detail.

afremont
Newcomer
Posts: 9
Joined: Sat May 23, 2015 9:08 am
United States of America

Re: Migrating WMC Recorded TV files to MythTV

Post by afremont » Mon Jun 08, 2015 11:55 am

Using mythbuntu and mythlink.pl doesn't work. I get the dreaded "Unable to connect to mythbackend, is it running?" error. Everything is fine as far as the config.xml files. After doing a bunch of googling, it appears that it's simply not going to work for me as none of the threads ended with any resolution to the problem. Any ideas?

User avatar
paulh
Developer
Posts: 436
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Migrating WMC Recorded TV files to MythTV

Post by paulh » Mon Jun 08, 2015 5:31 pm

One possibility is using the recording import in MythArchive. It was originally designed so you could export a recording from one system and import in to another keeping all the metadata intact. You would have to create a script to create the xml file similar to that created by the native export in MythArchive then use that to import the recording into Myth.

I know it used to work without problems since I used it quite a lot to move single recordings between dev and production machines and also to move some stuff to my parents but haven't used it in several years so it may need updating. I'm not sure I'd like to move 2000 recordings using it though at least not without adding some automatic mode :)

HiTechHiTouch
Newcomer
Posts: 1
Joined: Wed Nov 06, 2019 5:27 pm
United States of America

Re: Migrating WMC Recorded TV files to MythTV

Post by HiTechHiTouch » Wed Nov 06, 2019 5:56 pm

@afremont -- If you have an command line example that takes a .wtv file and outputs the meta data, please share it.

@afremont -- From the writeup https:__www_mythtv_org_wiki_Mythlink_pl (fix the underscores to / and .)
If you get this error: "Unable to connect to mythbackend, is it running?" check the following file:

.mythtv/config.xml, and you need to ensure the following has a value (Mythbuntu 14.04.1 does not):
<LocalHostName>my-unique-identifier-goes-here</LocalHostName>
Back to the more general question, has anyone ever cobbles some scripts or that can extract and format the metadata from WMC files then import the recording (i.e copy it to a mythtv storage location) and update the mythtv mySQL database by adding the metadata which describes the recording just copied?

Post Reply