Adding Meta Data to a file type that already has a handler.

Jan 9, 2014 at 5:56 AM
Hello!

I've been looking for this for a really long time now and had only found third party software that handled tagging on their own so far... Your program seems to be exactly what I had been looking for!

I had no problem adding File Meta Handler to the .txt extension for example and it did what I wanted (more specifically enabled tags). However, I was looking for a way to enable tags for some file types that appear at the top of the list in the File Meta Association Manager. FLV, for example, which are shown to already have a handler and won't let me click Add File Meta Handler.

Is there a way to make this possible? I might just not understand your program very well... If you'd care to explain to me why it is or it is not possible?

Thank you.
Coordinator
Jan 9, 2014 at 11:19 AM
Hi Tomatoshadow

Yes, it is certainly possible. However, it is important to understand what is going on, so as not to leave yourself worse off than you started.

When Windows Explorer reads and writes metadata, it does so using a Property Handler registered for the file’s extension. As you have observed, File Meta Association Manager will only allow you to specify its own Property Handler if there is none already registered for an extension.

Take .flv as an example, which I believe is Flash Video. My machine has no Property Handler registered for this extension, but yours evidently does. So the question arises, what put it there? Also, what are its capabilities?

If the Property Handler can read and write tag properties, as can the Property Handler for.jpg installed by Windows, then you are done. If it cannot, then we can remove it, but then what functionality would we lose? Presumably, whatever installation put it there, put it there for a purpose. Unfortunately, there is no way to 'chain' Property Handlers: there can only be one for a given file extension.

Assume for a moment that we know what the installed Property Handler does, and we are happy to dispense with its services. How do we replace it? The cleanest way is to uninstall the software that set up the Property Handler, but of course we then lose the other capabilities of that software. The alternative is to edit the registry to remove the Property Handler from the extension, so that the File Meta Association Manager will be happy to set up its own. But of course, this leaves the installation of the software whose Property Handler we overrode in an odd state. What would happen if we subsequently uninstalled it? It would depend on exactly which installation technology it used, but the results are not, in general, predictable.

So, that is the territory. It should be clear why I was careful to ensure that File Meta Association Manager would not override existing Property Handler registrations: you have to know what you're doing, and it leads into murky places.

If you want to go that way, I can give you guidance about the registry edits required, but I think a better question would be, do you need the software that has installed the conflicting Property Handler, or is there some other software that provides a Property Handler with metadata capabilities?

Dijji
Jan 10, 2014 at 1:33 AM
Hi!

Thank you for the quick and very helpful response!

I understand, thanks for confirming what I thought! Flv is Flash Video indeed. I have K-Lite codec install which makes Windows Media Player able to read Flvs and allows Explorer to show a thumbnail for Flvs! I'm assuming that's why.

I would also assume that by removing any association with the current property handler, I would lose my playback support and definitely lose my thumbnails...

I do not know of some codec pack that adds metadata capabilities to most video files but that sounds like something possible... Not something I would be able to do myself though!

I think the easiest way to solve my problem would be to re encode my videos in h.264 (mp4). Not only is that a very efficient format and might help me save some space but that format handles metadata natively from what I've seen.

...Problem is, I literally have over a thousand videos. Some of them are mp4 and wmv which handle metadata but most are FLVs, some avi and little 3gp too. It would take an extremely long time to re-encode a thousand FLVs into mp4, even though my machine is quite powerful (Overclocked Haswell i7).

I'm wondering what would be the best solution for me. Thank you for your help! I love what you're doing, I was tired of finding nothing but third party software and unhelpful people saying it was impossible to tag anything else than jpegs. Your program might not be what I was looking for but I'll definitely remember it if I need it!

If you have any ideas for my problem, don't hesitate to share them :)
Coordinator
Jan 10, 2014 at 8:07 AM
Hi Tomatoshadow

I think your analysis is spot-on.

The only alternative approach that I can think of is to use VLC media player, http://www.videolan.org/, which is the pick of the open source solutions, and commendably omnivorous. It comes with its own codecs, which would allow you to uninstall K-Lite and free up the Property Handler registration slot. The drawback is that you would lose the thumbnails, which I assume are the reason that K-Lite installs a Property Handler in the first place.

Sorry, I can't think of any approaches that give you the best of all worlds.

Dijji
Jan 10, 2014 at 11:40 PM
Hey!

I already use VLC media player, I'm aware that it comes with its own codecs but I usually have k-lite installed anyway... Considering I use K-lite most of the time now, I'd only have to uninstall it but having thumbnails for every type of video files is very, very useful for me, so even if just for that I'd keep it... I'm not sure there is any other solutions to have thumbnails that don't involve having a handler for those files.

My solution right now, although it may not be optimal, is to re-encode all my videos in mp4. While it may sound like a lot of trouble, I was very relieved to see that Handbrake handles batch encoding.

If anyone is wondering, you can simply select a folder and open it as the source in Handbrake, it will go through every single video files in it which you can then all add to the batch queue. I set things up so that they keep their original name and case and are saved as mp4 in a "re-encoded" folder. The default settings usually keep the same FPS and similar bitrate so the file size will either be the same, slightly bigger or much smaller (especially when going from badly encoded files or wmv files). Then I only have to press "Start" and it will go through all files one by one, you can even set it up to shut down your computer once it's done.

So yesterday, I was able to re-encode a whole subfolder of around 100 videos in about 10 minutes. Then simply select all the re-encoded files and tag them all with the folder name (which was used as the category I wanted to make a tag).

I wish I could have kept the files as they were and use your program but batch encoding them is not as much of a bother as it seemed. Plus, I'll save tons of space in the long run... I also had a couple of corrupted avis that could only be played with VLC etc... A bit of a hassle but worth it in the end, I guess!

I'm sure I'll find some other use for your program though, tagging is a functionality I never took advantage of in windows and really should have! Thanks for your help :)
Jan 15, 2014 at 4:24 PM
Hi,

I just found this site and your program, and this is great! I would really like to be able to tag all of my images, but my Win7 x64 system already has "IPropertyStore Handler for Images". That applies to bmp, gif, ico, jpg, jpeg, png, tif, etc. The jpg and tif extensions already have the ability to add tags, but the others do not. I am comfortable making changes in the registry, provided you would walk me through exactly what and where. I already have a full backup of my registry.

Thanks.
Coordinator
Jan 16, 2014 at 7:02 AM
Hi shadow98cat

OK, here we go. I will use .bmp as an example. The registry setting that specifies "IPropertyStore Handler for Images” as the property handler for .bmp is:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.bmp] 
@="{a38b883c-1682-497e-97b0-0a3a9e801682}"
The steps to take are:
  1. Backup the current registry settings, either per extension, as above, or perhaps specifying the PropertyHandlers key to backup the settings for all extensions.
  2. Delete the key for the extension, in this case .bmp, under PropertyHandlers
  3. Use the File Meta Association Manager to apply the File Meta Property Handler to the extension (at this point, the registry key you just deleted will be back, but with a different value).
  4. Kill all instances of explorer.exe and restart it
To restore the original state, use File Meta Association Manager to remove the File Meta Property Handler, and then reapply the backed up registry settings.

Note that this replaces the Windows Property Handler completely. Any capabilities that it provides, such as displaying thumbnails, will be lost.

Dijji
Jan 21, 2014 at 12:14 AM
Hello Dijji,

That worked just the way I was hoping it would, thank you. I was pleasantly surprised to see that Windows is still showing thumbnail / icon previews, and is giving me the opportunity to add extra details like tags. Based on your description, I'm not sure why the preview images are still showing. I would like to know that this is reliably reproducible (enhanced metadata and preview images), so if there's any other information I can give you on my configuration please let me know.

One other brief issue that the registry information you provided was helpful in fixing. The extension .chm was not already assigned on my computer, so I attempted to add it in the file association manager. As soon as I click to add that type, the program gave me a not responding error, then crashed completely. After re-opening the program it functions normally except for that extension shows that it was assigned the handler. But when I right click a .chm file in Windows, I'm not seeing the extra fields in the properties that should be there. In the file association manager, if I try to click on the .chm extension to remove the handler, the program crashes. The fix I found was deleting the .chm registry key in the location you specified. Just an FYI, I don't know what it is about .chm, but maybe something worth looking into.

Thanks.
Coordinator
Jul 23, 2014 at 10:22 AM
Hi shadow98cat

I'm sorry about the delayed response, I've just been going through the Discussions, and found that I missed this one.

Icon and Preview handlers are separately registered Explorer extensions, so I guess it does make sense that they will carry on working, even after the property handler has been removed. This should be repeatable on other systems.

On the crash, it turns out that the registry entries for .chm (and a few other help related extensions) have special permissions set that do not allow Administrator write access. A bug in the File Association Manager caused it to crash when its attempts to update the entry failed.

This has been fixed in version 1.2, producing a sensible error message instead. If you ever did want to add metadata to a .chm file you would have to go in and change the permissions on the registry key, though you might have to write a program to do it, as you would need to be running as System!

Dijji