INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Support Tags From Windows Media Center WTV Files  (Read 16165 times)

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Support Tags From Windows Media Center WTV Files
« on: September 13, 2014, 10:28:11 pm »

I've got a view setup in MC that imports shows that were recorded in Windows Media Center (running on another PC) so that I can watch them in JRiver or JRemote.  Unfortunately, even though the files contain tags for things like show names, episode names, episode descriptions, etc., JRiver seems to completely ignore the tags.

Is there any hope for getting support for these tags in WTV files added so the values can be used in MC?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71603
  • Where did I put my teeth?
Re: Support Tags From Windows Media Center WTV Files
« Reply #1 on: September 14, 2014, 08:39:10 am »

We'll check this.
Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #2 on: September 14, 2014, 08:55:27 am »

We'll check this.
Thanks!

If you look at the Properties of a wtv file in Windows Explorer, the tags all show up under the Details tab.  Here are a few links you guys might find useful while looking into it:

Manually Editing WTV and DVRMS Metadata:

http://www.hack7mc.com/2009/09/manually-editing-wtv-and-dvrms-metadata.html

Fun with DVR-MS (there's a section titled "Accessing DVR-MS Metadata" that discusses how to access the tags):

http://blogs.msdn.com/b/toub/archive/2007/09/22/fun-with-dvr-ms.aspx

So it looks a bit more complex than accessing ID3V2 tags, but not too bad.  Besides, if Microsoft can make it work in the Windows Explorer Properties, how hard can it be? :)
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #3 on: January 08, 2015, 06:02:09 pm »

Quote
show names, episode names, episode descriptions, etc.

By "show name", did you mean "title"?  We should at least have gotten that one.

What other tags should we have retrieved?
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #4 on: January 08, 2015, 07:26:18 pm »

By "show name", did you mean "title"?  We should at least have gotten that one.

What other tags should we have retrieved?
Yes, title is correct.

As far as other tags, there are at least several others that would be useful.  Here are the tags I would grab and what tag I would populate in Media Center:

WTV Tag -> Media Center Tag

Title -> Series
Subtitle (this appears to also be tagged as "episode name") -> Name
Program description -> Description
TV credits -> Actors
Directors -> Director
Producers -> Producer
Broadcast Date -> Date

The TV credits content looks like this:

Mariska Hargitay/Ice-T/Kelli Giddish/Danny Pino/Raúl Esparza/Peter Scanavino;;;Harry Hamlin/Dreama Walker/Peter Gallagher/Delaney Williams/Jenna Stern/Myk Watford

So it's delimited by slashes and semi-colons.  Everything up to the first semicolon is the list of main actors and the other names are secondary credits (guest stars).  This specific example is from the most recent episode of Law & Order: Special Victims Unit that aired on 1/7/2015 (S16E10).  I don't know if the number of semicolons is significant.

The Directors and Producers fields are definitely not always populated and probably aren't worth bothering with unless it's easy to include them.

Broadcast date is the original air date.  In the absence of series and episode numbers, this might be an alternative way to get the rest of the info from tvdb and would at least give the user useful info to work with in figuring out the series and episode numbers.

I hope this is helpful.
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #5 on: January 09, 2015, 08:50:47 am »

Do you have a sample recording that you can share with us?
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #6 on: January 09, 2015, 09:13:23 am »

Do you have a sample recording that you can share with us?
Sure.  I just recorded short ~30 second segments of a TV show and a movie and uploaded them here:

http://geoff-reynolds.net/SampleRecordings/Blue%20Bloods_WGNA_2015_01_09_09_55_26.wtv.zip
http://geoff-reynolds.net/SampleRecordings/The%20Recruit_FXHD_2015_01_09_09_58_21.wtv.zip

Just nuke the .zip extension after you download them as my web server wouldn't serve them up for downloading with the wtv extension.

You can download a metadata editor from here to see what tags are in the files:

http://blogs.msdn.com/b/toub/archive/2005/05/12/416874.aspx

Note the following for opening wtv files using that viewer:

Quote
When opening a WTV file you’ll just need to adjust the file filter dropbox to show all file types and select the WTV file you’d like to edit.

Let me know if you need anything else and thanks for looking into this.
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #7 on: January 09, 2015, 09:53:52 am »

Thanks.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #8 on: January 09, 2015, 12:19:56 pm »

Regarding "Credits", the only sure things that I figured out are:

The first group (before the first ';') are actors
The second group are directors

I have not seen an example of the third group, so I have no idea.  The last group according to you, are the guest stars.  I am not sure how to deal with that (perhaps just merge them with the first group?).
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #9 on: January 09, 2015, 01:46:48 pm »

Regarding "Credits", the only sure things that I figured out are:

The first group (before the first ';') are actors
The second group are directors

I have not seen an example of the third group, so I have no idea.  The last group according to you, are the guest stars.  I am not sure how to deal with that (perhaps just merge them with the first group?).
The Blue Bloods sample I sent has this value for WM/MediaCredits:

Tom Selleck/Donnie Wahlberg/Bridget Moynahan/Will Estes/Len Cariou/Jennifer Esposito;Alex Zakrzewski;;Amy Carlson/Tony Terraciano/Andrew Terraciano/Sami Gayle/Manley Pope/Arianna Hoeppner/Erik Hegner/Kieran Campion/Taylor Gildersleeve/Josh Tower/Gloria Votsis/Gary Basaraba/Rob Leo Roy/Li Jun Li

The primary actors would be: Tom Selleck/Donnie Wahlberg/Bridget Moynahan/Will Estes/Len Cariou/Jennifer Esposito
The secondary actors would be: Amy Carlson/Tony Terraciano/Andrew Terraciano/Sami Gayle/Manley Pope/Arianna Hoeppner/Erik Hegner/Kieran Campion/Taylor Gildersleeve/Josh Tower/Gloria Votsis/Gary Basaraba/Rob Leo Roy/Li Jun Li
The director would be: Alex Zakrzewski

This seems to agree with thetvdb.org's listing for this episode: http://thetvdb.com/?tab=episode&seriesid=164981&seasonid=251251&id=3173701&lid=7

So it looks like you're correct about the 2nd group being directors.  And yes, the last group should probably be merged with the first group since MC doesn't have a separate tag for guest actors.

If you're willing, there are probably other fields in there of interest, such as WM/Genre, which contains "Drama;General;Series" for this particular program.  There's also WM/ParentalRating, which contains "TV-14" for this program.

Sorry for the long-winded answer :).
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42028
  • Shoes gone again!
Re: Support Tags From Windows Media Center WTV Files
« Reply #10 on: January 09, 2015, 01:48:21 pm »

Sorry for the long-winded answer :).

Oh gosh, thanks so much for all your help!
Logged
Matt Ashland, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #11 on: January 09, 2015, 01:52:31 pm »

Oh gosh, thanks so much for all your help!
It ultimately benefits me, so I'm more than happy to help. :)  I'm glad to see that you guys are working on this.  I just wish that WMC saved tags for the season and episode numbers as that would make it fairly simple to combine that with the series name and do a tvdb lookup to get everything else.  But making use of the tags that are available will be a big improvement.
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #12 on: January 09, 2015, 04:55:47 pm »

If you're willing, there are probably other fields in there of interest, such as WM/Genre, which contains "Drama;General;Series" for this particular program.  There's also WM/ParentalRating, which contains "TV-14" for this program.

I got those.
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #13 on: January 14, 2015, 06:51:57 am »

I installed release 20.0.55 that added support for WTV flags last night and just wanted to report back that it seems to be working fine.  I had to reboot my WMC PC to force MC to re-import all of my wtv files (is there another way to get MC to re-read tags from files?) and after doing so, MC brought the files back in with series name, episode name, episode descriptions, etc. populated properly.  Nice job and thanks for implementing this.
Logged

AVTechMan

  • World Citizen
  • ***
  • Posts: 102
Re: Support Tags From Windows Media Center WTV Files
« Reply #14 on: January 14, 2015, 11:14:46 am »

I installed release 20.0.55 that added support for WTV flags last night and just wanted to report back that it seems to be working fine.  I had to reboot my WMC PC to force MC to re-import all of my wtv files (is there another way to get MC to re-read tags from files?) and after doing so, MC brought the files back in with series name, episode name, episode descriptions, etc. populated properly.  Nice job and thanks for implementing this.

Have a question for you do you keep your wtv files in the Recorded TV folder in WMC for MC to watch and import? I may test this on my test MC box to where it reads the Metadata correctly from the .wtv files. Currently I have a script where after recording it renames to proper format and transfers the file to my file server.
Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #15 on: January 14, 2015, 12:21:27 pm »

Have a question for you do you keep your wtv files in the Recorded TV folder in WMC for MC to watch and import? I may test this on my test MC box to where it reads the Metadata correctly from the .wtv files. Currently I have a script where after recording it renames to proper format and transfers the file to my file server.
For recordings that I decide to keep, I move the file elsewhere.  For recordings I just want to watch and delete (which is most of them), I leave them where they are (and the Recorded TV folder is in my MC auto import list) and delete them either from within WMC or MC after I watch them.  Unfortunately, the .wtv files don't have season or episode numbers in their tags (though they do have original broadcast date), so the solution isn't perfect, but it's as good as can be expected from MC.  If MC could use the original broadcast date to lookup the season and episode numbers in TVDB, that would make things even better, but I'm not sure what sort of queries TVDB supports.
Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #16 on: January 14, 2015, 01:43:16 pm »

I just noticed a minor issue with date handling.  I've got a few recordings that have what appears to be a default value for the WM/MediaOriginalBroadcastDateTime:

0001-01-01T00:00:00Z

It looks like MC is treating that date as January 1, 2001 when it populates the date tag.  I would suggest that when this value is encountered, you use the file creation date/time to populate the date tag instead, if possible.

I'll post something in the release thread too.
Logged

AVTechMan

  • World Citizen
  • ***
  • Posts: 102
Re: Support Tags From Windows Media Center WTV Files
« Reply #17 on: January 14, 2015, 08:22:31 pm »

For recordings that I decide to keep, I move the file elsewhere.  For recordings I just want to watch and delete (which is most of them), I leave them where they are (and the Recorded TV folder is in my MC auto import list) and delete them either from within WMC or MC after I watch them.  Unfortunately, the .wtv files don't have season or episode numbers in their tags (though they do have original broadcast date), so the solution isn't perfect, but it's as good as can be expected from MC.  If MC could use the original broadcast date to lookup the season and episode numbers in TVDB, that would make things even better, but I'm not sure what sort of queries TVDB supports.

Ok cool. Unfortunately they zapped the .55 build so won't be able to test that out until the build is fixed. Most shows I record I watch once and dispose of them afterward anyway.
Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #18 on: January 14, 2015, 08:23:36 pm »

It occurred to me that I could create a custom tag to handle the 1/1/2001 dates.  But I must be doing something wrong...  I added a user tag with the data being a calculated data value.  The expression is:

if (isequal([Date], 1/1/2001,1), [Date Recorded], [Date])

The values that display for this field look like:

if (0,, 1/1/2001)

I double checked the help and believe the expression is correct - if the [Date] field is 1/1/2001, the custom field should display the value from [Date Recorded] and otherwise it should display the value from [Date].

What am I doing wrong?

Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #19 on: January 14, 2015, 09:48:30 pm »

How about this
if(IsEqual(FormatDate([Date, 0], M/d/yyyy),1/1/2001,1), [Date Recorded], [Date])
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #20 on: January 14, 2015, 10:41:29 pm »

How about this
if(IsEqual(FormatDate([Date, 0], M/d/yyyy),1/1/2001,1), [Date Recorded], [Date])
Thanks, that got me pointed in the right direction.  Here's what worked in the end:

FormatDate(ConvertDate(if(IsEqual(FormatDate([Date, 0], M/d/yyyy),1/1/2001,1), [Date Recorded], [Date])), yyyy//MM//ddTHH:mm:ss)

That outputs a date with time in 24 hour format that is sortable.
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #21 on: January 15, 2015, 07:12:39 am »

Back to the original topic.  It may be better if we just do not fill [date] field when we encounter 0001-01-01T00:00:00Z since 1/1/2001 may be a legitimate release date.  Then you just need to change IsEqual() to IsEmpty([date]) in that expression.
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #22 on: January 15, 2015, 07:21:00 am »

Back to the original topic.  It may be better if we just do not fill [date] field when we encounter 0001-01-01T00:00:00Z since 1/1/2001 may be a legitimate release date.  Then you just need to change IsEqual() to IsEmpty([date]) in that expression.
Yes, that would probably make sense.
Logged

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2940
Re: Support Tags From Windows Media Center WTV Files
« Reply #23 on: January 15, 2015, 01:31:31 pm »

I'll add my comments here since they were probably lost from the beta build thread.

Quote from: Yaobing
We fill in [Date] if we encounter "MediaOriginalBroadcastDateTime" or "OriginalReleaseTime" tag.  I am not aware of a "Date recorded" tag in the file, that is why it is not filled.

Ok, but the broadcast time seems to be in UTC so I'm getting 5:00 AM for everything when it should be 12:00 AM or just the date without the time, probably.  The date/time recorded seems to be in "WM/WMRVEncodeTime" so it hopefully can be filled in.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10875
  • Dogs of the world unite!
Re: Support Tags From Windows Media Center WTV Files
« Reply #24 on: January 16, 2015, 06:35:19 am »

I'll add my comments here since they were probably lost from the beta build thread.

Ok, but the broadcast time seems to be in UTC so I'm getting 5:00 AM for everything when it should be 12:00 AM or just the date without the time, probably.  The date/time recorded seems to be in "WM/WMRVEncodeTime" so it hopefully can be filled in.

On the first one, I do not have enough samples to determine what time zone is in use.  If what you said is true, I can make MC always convert to local time.

On the second one, it has been added for the next build.

For an upcoming new build:
1. Changed: MC will ignore "WM/MediaOriginalBroadcastDateTime" or "WM/OriginalReleaseTime" tags that have values of "0001-01-01T00:00:00Z" or "0" when importing wtv / dvr-ms files.
2. Changed: MC will import "WM/WMRVEncodeTime" tag into "Date Recorded" field in wtv / dvr-ms files.
Logged
Yaobing Deng, JRiver Media Center

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: Support Tags From Windows Media Center WTV Files
« Reply #25 on: January 16, 2015, 07:04:13 am »

I'm not convinced that the timezone is UTC either, but the times just look fishy to me as they seem to be 05:00:00Z for all of my recordings that I've checked, regardless of what the actual original broadcast time was.  It looks to me as though the MediaOriginalBroadcastDateTime field ought to be treated as MediaOriginalBroadcastDate (ignore the time).
Logged

stottle

  • Junior Woodchuck
  • **
  • Posts: 71
Re: Support Tags From Windows Media Center WTV Files
« Reply #26 on: January 31, 2015, 04:05:12 pm »

Thanks for this feature!

I'm hoping you are receptive to an enhancement suggestion.  I can't look up TVDB info from series recording because the filename doesn't have the SxxExx format (it uses the recording time instead).  However, since you already are getting the episode name and series name from the wtv filename/metadata, that is enough to find the unique match in TVDB.  Obviously it needs some enhanced logic, though, and to not force the file naming convention for wtv files.

I do this in python to get the season # and episode # for sorting and other data available from TVDB, but would love to have it automated in jriver.  That would help with sorting and additional metadata.

Thoughts?
Logged
Pages: [1]   Go Up