Import Media Using GEDCOM

From TNG Wiki
(Redirected from Media - Import)
Jump to: navigation, search

This is one of several ways to load new media files to TNG. (See Getting Media into TNG) This technique is available only to administrators, and is appropriate when you want to upload media files in conjunction with the upload of GEDCOM data.

With this procedure you must

  1. Configure TNG's media folders with the PC file paths that are used in your GEDCOM files. (One time)
  2. Upload a GEDCOM file as described in Import Data
  3. Upload your media files to the appropriate media folders, using an an FTP Client or a File Manager utility.
  4. Set the appropriate media collection for some of your files (as required).
  5. Create Thumbnails for your media files.

Preliminaries

Local Folder Setup

In almost all cases, you must have a set of media folders on your PC (whether a Windows PC or a Macintosh) that match the media folders on your TNG server. In order to be able to import the media links in a GEDCOM file you need to have a set of folders on your local computer that "mirror" the media folders in your TNG setup. You will typically have folders named "photos", "documents", "headstones", and "histories", and possibly others, depending on what custom collections you have defined.

One Media Folder

Some desktop programs, such as Family Tree Maker (which is associated with Ancestry.com), cannot separate different types of media files into media folders. And, sometimes, the person managing a TNG site may decide not to use separate media folders. In those cases, there whould be just one PC media folder and one one media folder on the TNG server, and all of the media types in TNG Admin >> Setup >> Import Settings >> Local foldername Path(s) will specify the same folder name.

GEDCOM Media Records

A media item in the GEDCOM file is represented by a set of lines that might look similar to the examples just below. Each line in a GEDCOM file is known as a "segment" and is identified (not uniquely) by the keyword that follows the initial number. A GEDCOM "record" is a segment plus any subordinate segments (that start with larger numbers). The three examples below each show one hypothetical media record, and represent MacIntosh, a Windows PC, and a local PC's simulated Linux environment. The only meaningful difference among the three is the FILE segment (on the second line).

Macintosh

1 OBJE                               
2 FORM jpg
2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

or on Windows

1 OBJE
2 FORM jpg
2 FILE C:\My Documents\ReunionPictures\photos\people\RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

or if you are also using a local Wamp Server on your Windows computer with the media for this linked to your genealogy software as well as to the Wamp server.

1 OBJE
2 FORM jpg
2 FILE C:\www\htdocs\genealogy\photos\people\RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

Local Paths

Note that the GEDCOM media records specify a full file path and file name for the media file. There are two related complicating factors:

  1. The file path from the device root to the collection folder will be different on the web server, and
  2. The specified file path may include folders below the collection folder.

For instance, looking at the Macintosh example above, the partial path "~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos" represents the path to the collection folder (for photos, in this case), and the partial path "people/" indicates that the file is to be stored in a folder below the collection folder. As far as TNG is concerned, the filename is people/RogerOval.jpg.

You have to tell TNG what your local paths for the media so that TNG can strip off that portion of the path when it imports the GEDCOM file. You do that in the Administration >> Setup >> Import Settings screen as shown below. (Note that this screen shot is "doctored" to show the paths on multiple lines so that the whole field contents can be seen.)

If you know your local collection path, then you can just enter it in the form. Or, you can look at a FILE segment of your GEDCOM file and extract the path to and including the collection folder ("photos", "documents", "histories", etc.).

ImportSettings.gif

Note that there is an entry (i.e. a field) on the form below for each standard TNG media collection, because it is generally assumed that you will separate the collections in different folders. But some of these fields need multiple paths in them because desktop genealogy software doesn't necessarily recognise all of the different media types that TNG allows. So for example in the photos field I have entered the path to the photos folder, and also the path to the headstones folder.

Note: separate multiple paths by a comma, do NOT include a space, but DO include the trailing / at the end of each path.

Note: if you're using Windows the paths in the GEDCOM file are probably separated by a backslash \ not a forward slash /. If this is the case make sure you use the \ in the paths in the import settings.

(Note that the first path listed for each Local Path type is used if you Export a GEDCOM file out of TNG and you choose to "Export media links")

This can be necessary because on initial import from the GEDCOM file, TNG looks at the line that starts 2 _TYPE to see if it is importing a photo or a document or a headstone to then know what Collection to put it into. But since most desktop genealogy software only make distinction between PHOTO and DOCUMENT (or as Reunion specifies it a PHOTO DOCUMENT) it's necessary to "cover the bases" with the settings in TNG to ensure that the paths are imported successfully.

So using the GEDCOM line from the 1st example above

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG

in conjunction with the line

2 _TYPE PHOTO

which has told TNG that it's a photo, and from the first line from the Import Settings screen shot above

~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/

we can see that it's a match up to the end of "photos/".

So on import of this line, TNG will strip off the specified "Local Photos Path(s)" and import this item into the Photos collection as

people/RogerOval.JPG

If the linked file is a headstone - for example

2  FILE  ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

with the line

2 _TYPE PHOTO

TNG will also think this is a photo, which is why the "Local Photos Path(s)" as specified above needs to also include

~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/

to ensure that the item is imported correctly, with the matching part of the "Local Photos Path(s)" stripped off so that this item would be imported into the Photos collection (see below for notes on changing this to the Headstones collection) as

NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

Note that the use of sub-folders within the 5 different folders from above is fully supported, and the headstone image HildaLinehamHeadstone.jpg is stored in a folder "Rangiora" in a folder "Canterbury" in a folder "NewZealand" in my "headstones" folder.

Importing Media

When you are doing an import, you have to select the option to Import Media as shown below.

ImportGEDCOMMedia.gif

During the Import

Starting withing TNG9, the GEDCOM import process displays a status dashboard that pops up over the kick-off screen. The dashboard shows a progress bar and a running count of certain types of GEDCOM tags. The counts may not mean exactly what you might expect, but they are still useful progress indicators.
Import media using gedcom-dashboard.png

The dashboard is handy, but if an error occurs during the import, the dashboard just freezes, and the error messages are hidden. To see error messages, you must select the "Old-style Import" option as you kick off the import. That option produces a scrolling progress listing that shows every 10 occurrences of the same counts that the dashboard shows: Import media using gedcom-old.png
The scrolling progress can be hundreds of lines long, but at least it will show any error messages that occur.

After the Import

After the import has completed you need to perform some other steps...


Ambox notice.png NOTE that for TNG 10.1.x and TNG 11 onwards, TNG will assign media items to the correct collection as long as the folder names defined for a collection in TNG match up to a folder name in the path of that media item.

So in the above example of a headstone in the GEDCOM file

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

the first part of this path

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/

matches the path specified for Headstones, so this item is automatically assigned the Headstones category on import.

TNG 10.1.0


If you know that you have probably imported some items that will have been put into the wrong collection then "Convert" such items to their correct collection using the TNG Admin ------> Media screen.

Before TNG 10.1 - For the headstone example shown above

CollectionConversion.gif

Once you think all of the media items are in the correct Collection, you then need to generate the thumbnails for the newly imported media items.

GenerateThumbs.gif

If any media items are not found (often because they've not yet been converted to the correct Collection, or because the proper "Local Photos Path(s)" wasn't specified in the Import Settings screen), they will be listed at the end of the Generate Thumbs operation. For example:

ThumbGenerationFailures.gif

shows that generation of the thumbnail for the headstone used in the examples above failed. This is because it was imported by TNG as a Photo, and hadn't been converted to a Headstone prior to trying to Generate the thumbnail for it. See above for conversion to a Headstone, after which the thumbnail is generated correctly.

Related Links

Media Overview
Setup - Media

Using Collections

Adding Media

  • Getting Media into TNG - A summary of the various techniques.
    • Add New Media - Linked to Person or Family - For Editors as well as Administrators
    • Media - Add New - Import one multimedia file into TNG. Then link its new Media record to other objects.
    • Media - Import - Import files that are already on the server, but not already defined as Media records.
    • Media - Upload - Upload several media files, import them into TNG, and link them (individually or collectively) to other objects.
    • Import Media Using GEDCOM - Upload new media files that are referenced inside of a uploaded GEDCOM file.

Body Text

Thumbnails

Image Maps

Other Useful Articles

Some TNG Media Mods