INTERACT FORUM

Please login or register.

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

Author Topic: Importing meta data as playlist  (Read 2882 times)

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Importing meta data as playlist
« on: April 02, 2009, 09:27:22 pm »

I would love to switch to MC for managing my photos but I have hundreds of hours of work invested into ThumbsPlus meta data for my 20,000 photos. The meta data is nothing unusual (keywords, text description, galleries (aka playlists), plus a few simple user fields) and would map nicely to MC fields. ThumbsPlus data is easy to get at because they use Access under the hood. Unfortunatley I do not know how to import the data into MC and it is not an option to re-enter the data given the high volume.

If you have Access, you should be able to export to XML and import that as a playlist.

Thanks. I've thought about trying this but am fuzzy on how to do it, especially for meta data that is relational like galleries (aka nested playlists) and keywords. Are you aware of a good thread in this forum or something in the wiki that might shed some light?

If there is, I never found it. Fortunately, it's easier than it may seem...

MC's MPL playlist files are simple XML files. If data from another application can be exported as XML, there's a good chance it can be manipulated into valid MPL format and imported to MC. The field name references, of course, have to be correct. And, AFAIK, the media pathname has to be used identify the record. (Aside: I don't know if this technique can be used to import list data, using some other means—other matching data—to identify the record.)

In this situation, this is the approach I would try... Import some representative images into MC. Tag them as closely as possible to the way they are tagged in ThumbsPlus. Then export them as a playlist. Examine the structure of the MPL file—it should look something like this:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="Photos"><Item>
<Field Name="Filename">E:\Photos\2008\DSC02436.JPG</Field>
<Field Name="Album">2008-09 Lady Selena Cruise</Field>
<Field Name="Name">DSC02436</Field>
<Field Name="File Type">jpg</Field>
<Field Name="Date">39719.5708333333313931</Field>
<Field Name="Media Type">Image</Field>
<Field Name="Last Played">1237886879</Field>
<Field Name="File Size">2936245</Field>
<Field Name="Number Plays">4</Field>
<Field Name="Date Created">1222634561</Field>
<Field Name="Date Modified">1225058495</Field>
<Field Name="Date Imported">1224824413</Field>
<Field Name="People">Friend\Cathy</Field>
<Field Name="Places">Genoa Bay</Field>
<Field Name="Width">2304</Field>
<Field Name="Height">3072</Field>
<Field Name="Camera">SONY DSC-H5</Field>
<Field Name="Rotation">0</Field>
<Field Name="Aperture">F/5</Field>
<Field Name="ISO">125</Field>
<Field Name="Shutter Speed">1/1000 sec.</Field>
<Field Name="Focal Length">9.1 mm</Field>
<Field Name="Flash">0</Field>
</Item>
<Item>...
...</Item>
</MPL>

I don't know Access, but the next step is to try to get it to export in an XML format that closely resembles this structure. Your actual import file, of course, can include as many or as few fields as you choose. To the extent you can't get Access to use this format, or MC field names, you can change these using the search & replace function of a text editor. You also have the option of importing data to temporary custom fields, and then manipulating the results in MC (i.e., using formula to change, combine and/or reformat data and put it into other fields). So, even if you can't figure out a way to import your gallery data intact, you may be able to get it in some form, and use MC to manipulate (or manually reoganize it) back into a nested list. BTW, note my "People" data is nested—as indicated by the "\" in the data.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #1 on: April 02, 2009, 10:45:24 pm »

Thank you very much for the excellent tips.

The piece I am confused about is one to many relationships specified by Access linked tables. These are used for Keywords and Galleries (Playlists).

When I export xml from Access it maintains this one to many structure in the xml, rather than flattening it out into semi-colon delimited lists that MC seems to require.

I have not yet tried to import the xml exported by Access so maybe it will work, but I doubt it.

Another member here kindly pm'd me with an offer to convert my database to mpl. I've sent him the database and will see how he approaches the problem before experimenting more.

Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #2 on: April 02, 2009, 11:00:53 pm »

I think I see another problem. Playlists that a file belongs to are not exported by MC in the MPL. This probably means that I cannot import a delimited list of playlists associated with a file.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Importing meta data as playlist
« Reply #3 on: April 03, 2009, 01:50:54 am »

Quote
The piece I am confused about is one to many relationships specified by Access linked tables.

Frustrating, isn't it. I had hoped Access might offer a way to "flatten" the data. But I suppose that's not logical for an XML export—although the MPL format is clearly "flat." :-\

Quote
Another member here kindly pm'd me with an offer to convert my database to mpl.

That sounds like a good deal! I hope he can share here about how that is done.

Quote
This probably means that I cannot import a delimited list of playlists associated with a file.

I wonder about that. I was surprised when I first learned something called a "playlist" is be used to import meta data. I assumed a "playlist" was just a list—as in a list of files to play. But the fact it's much more than that doesn't mean it's still can't be just that. I really don't know. I don't use playlists much, and I certainly don't import and export them (other than for importing meta data). But why would you not be able to export all of your galleries as individual playlists, and import those—as playlists? You might want to do that, even if you can save a list of galleries each file belongs to.

If you actually have a delimited list of galleries associated with each file, however, there shouldn't any difficulty importing that. I've imported movie data, much of which is multi-item list data (actors, genres, etc). I think the only challenge in this case is nesting. You will be able to keep that too, if you can get the names into the form level1\level2\galleryx. We're using galleries as an example here—the same is true for your keywords, or any similar data.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #4 on: April 03, 2009, 10:25:04 am »

My helper angel sent me some work in progress to check. The approach he seems to be taking is to create a separate mpl for each playlist. This appears to be a lot of work to get around an MC limitation. I think playlists should be treated just like as any other list of MC data because they are just another means of organizing files, like Keywords or any other MC field.

I think your suggestion of importing a delimited list of playlists to a list data field might work however once imported you would have to manually create each corresponding playlist which is a real pain if you have a lot of them.

I'll report back more on what I learned later when this project is complete.
Logged

pwantzel

  • World Citizen
  • ***
  • Posts: 112
Re: Importing meta data as playlist
« Reply #5 on: April 03, 2009, 12:06:05 pm »

With regards to importing of playlists (lists of files), you might want to read this post.

http://yabb.jriver.com/interact/index.php?topic=51111.0
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Importing meta data as playlist
« Reply #6 on: April 03, 2009, 03:15:38 pm »

Quote
I think playlists should be treated just like as any other list of MC data because they are just another means of organizing files, like Keywords or any other MC field.

I tried a little experiment, and maybe the fog has lifted a little...

As suggested in the topic recommended by pwantzel, I made an M3U Playlist file consisting of a simple list of file pathnames. It imported as a Playlist—found under Playlists/Imported Playlists. Selecting the list displays all the files in the list—i.e., they have been added to the library. The name of the playlist appears in "Playlists" in the tag viewer.

I then exported the same files as an MPL playlist, changed some of the tagging information, and renamed the file. When this file was re-imported, it updated the tags, but did not produce an entry in Playlists/Imported Playlists.

So, while both called "playlists," M3U and MPL files are distinctly different. M3U are simple text files listing file pathnames. Importing them creates a playlist. MPL files are XML files for importing meta data to files (which, I assume, will be added if they don't exist). They do not result in a playlist being created.

There is no playlist "field"—it just appears that way in the tag viewer. Playlist names cannot be imported to it, as I previously suggested. It would seem the only way to import playlists is via M3U files. Still, you should be able to import the information to a custom list field (e.g., "Galleries"). The data in this field may be nested by separating levels with a "\". If you do that, you can very easily select any particular gallery for viewing using a pane view. I find this much more effective than using playlists.

Maybe your angel can use Access to create a new field that records the existing gallery relations in the form level1\level2\galleryx.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #7 on: April 03, 2009, 06:05:54 pm »

Thanks for investigating further. Your suggestion to replace gallery playlists with a nested field is good however it will only work for those cases where you do not need a specific sequence within the group. I often use galleries to create audio/visual presentations and for these the sequence is important.
Logged

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 771
Re: Importing meta data as playlist
« Reply #8 on: April 03, 2009, 07:25:23 pm »

Those ThumbPlus galleries seem to be pretty specific for a 20000 picture collection. Did you build them by hand, pic after pic? :)
I'm a ThumbPlus user myself but I still don't get what exactly is the problem here, importing metadata that doesn't have equivalent fields in MC, or importing galleries, or both or...? If you'd be able to import the metadata (whatever means necessary), assuming that your galleries are build around objective criteria, wouldn't you be able to recreate them querying the MC database by the now-existing fields?
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Importing meta data as playlist
« Reply #9 on: April 04, 2009, 01:19:17 am »

Quote
Your suggestion to replace gallery playlists with a nested field is good however it will only work for those cases where you do not need a specific sequence within the group.

It seems silly, but saving Gallery as level1\level2\galleryx\seq# would work. Just select galleryx and sort by Gallery. Alternatively, output an ordered playlist. Both, of course, depend on being able to find the sequence number in Access and outputting it with the gallery name. How angelic is your angel? ;)
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #10 on: April 04, 2009, 03:59:51 am »

It seems silly, but saving Gallery as level1\level2\galleryx\seq# would work. Just select galleryx and sort by Gallery. Alternatively, output an ordered playlist. Both, of course, depend on being able to find the sequence number in Access and outputting it with the gallery name. How angelic is your angel? ;)

The angel managed to create an M3U for each of my galleries and maintained the sequence so I think I'm in good shape. Just have to import them all.

I've been working on the project for the last 6 hours and it's going really well. Found a few minor problems/bugs in MC which I will discuss later when I report the conclusion of this adventure.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: Importing meta data as playlist
« Reply #11 on: April 04, 2009, 04:08:11 am »

Those ThumbPlus galleries seem to be pretty specific for a 20000 picture collection. Did you build them by hand, pic after pic? :)
I'm a ThumbPlus user myself but I still don't get what exactly is the problem here, importing metadata that doesn't have equivalent fields in MC, or importing galleries, or both or...? If you'd be able to import the metadata (whatever means necessary), assuming that your galleries are build around objective criteria, wouldn't you be able to recreate them querying the MC database by the now-existing fields?

Moving all my meta-data from T+ to MC has gone really well.

My only concern is that recreating a bunch of playlists in MC is more painful than it should be.

To answer your question, the only reason for using a gallery, in my opinion, is when you need to create a collection of images that cannot be found with a query, and when you need the collection to have a manually specified order.

I only have a few hundred photos in galleries but they are there for good reasons.
Logged
Pages: [1]   Go Up