PSA: 1 minute recordings/missing metadata

Post Reply
Space

Posts: 2532
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

PSA: 1 minute recordings/missing metadata

#1

Post by Space » Mon Aug 02, 2021 9:11 am

I've been juggling a lot of recordings around in order to record as much of the Olympics as possible.

One of the things I've needed to do is offload recordings from the WMC "recorder storage" drive to an external USB drive in order to free space for new recordings.

I've added the "E:\Videos\Olympics" folder of an external USB drive to WMC as a "Recorded TV" "Media Library" so that I can still play back all the recordings located in this folder from within WMC.

One problem I ran in to was that when I moved a WTV from the recording folder (on drive X:) to the external drive folder (E:\Videos\Olympics) the metadata for that WTV file was not populated in WMC correctly. It would get the show subtitle and description, but that was pretty much it. The date it was recorded, the length of the recording, and all other metadata was missing. This meant that you could no longer sort the recordings by the "date recorded" because that date didn't exist in the metadata of these recordings (in actuality, the WMC database did not properly load the metadata from the recordings). Also, since the length also did not exist, WMC would just report that they were "1 minute" long, even though they were actually (in most cases) multiple hours long.

I was confused by this for a little while, but I was able to "fix" it by removing the folder on the USB drive from the WMC "Media Library" and then adding it back. When I did this, WMC read all the metadata from the WTV files correctly, and all was good.

But then I got an idea. I was copying over the WTV files from the X: (recording) drive to the E: (external USB) drive, and this could take several minutes per file. I figured the reason that WMC was not able to read the metadata properly from the files on the external WMC drive was because it was reading it before the file was completely moved over from the recording drive. When it read the file, the metadata hadn't been copied over yet!

So my solution to this was simple...

Instead of copying the files directly from the recording folder to the media library folder on the external HD, I instead created a temporary folder on the external HD and copied them there. Then, after all the files were copied over, I would just use the DOS MOVE command to move them all at once in to the media library folder.

Note that when you move a file from one folder to another on the same filesystem (same volume or drive letter in Windows) you don't actually move the file anywhere, you are just removing the pointer to that file from one folder and adding it to the other. This is done extremely quickly and there is no point at which the file will exist in the media library folder in an incomplete form, so there is no way for WMC to see an incomplete file.

Here is the command I used after I moved the WTV files from the recording drive/folder to the E:\Videos\Olympics_temp folder (E: is the external USB drive and E:\Videos\Olympics is the folder on that drive that was added as a media library in WMC):

Code: Select all

MOVE E:\Videos\Olympics_temp\*.WTV E:\Videos\Olympics
So far I've done this twice and the metadata in all the files that were moved populated correctly in WMC. Prior to doing this I was moving the files directly from the recording drive/folder to E:\Videos\Olympics and they would always be missing the metadata.

Post Reply