Import Media Using GEDCOM

From TNG_Wiki
Revision as of 07:33, 28 January 2015 by KenRoy (talk | contribs) (added Media related links)
Jump to navigation Jump to search

You can import media records into TNG by checking the box in front of Import media if present in the TNG Admin >> Import/Export screen.

Note that TNG only imports the media links in a gedcom. You still have to FTP the media to your site (unless your software uses the "BLOB" method of encoding the actual media file into the GEDCOM file - this article is NOT about this method).

Local Folder Setup

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 various media folders in your TNG setup. For example on your computer create a folder called "Genealogy Media" (in my examples below the folder is called "ReunionPictures") and inside that a set of folders that matches your TNG media folders. So for example:

FolderSetup.gif

shows the 5 folders I have set up on my local computer to store the various types of media item that are linked in my desktop genealogy software. These folders mirror the folders that are specified in the TNG Admin >> Setup >> Import Settings >> Local foldername Path(s)

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 should be just one PC media folder and one one media folder on the server, and all of the media types in TNG Admin >> Setup >> Import Settings >> Local foldername Path(s) will specify the same folder name.

What's in the GEDCOM file

A media item in the GEDCOM file is represented by a block of lines that might look similar to this. Each line in a GEDCOM file is known as a "segment" and is identified (not uniquely) by the keyword that follows the initial number. The three examples below represent the 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).

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

You have to tell TNG what your local paths for the media are in TNG Admin >> 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.)

To determine what to put in these various path fields, open your GEDCOM file in a Text Editor and look for lines that start with "2 FILE" and see what has been entered as the path to various folders that you set up as shown above. The path is everything after the "2 FILE " to the slash (/ on Macintosh, \ on Windows) after the folder name (eg photos, headstones, documents etc). So for the first example above of the photo, the path is

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

while the item itself is

people/RogerOval.JPG

ImportSettings.gif

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

After the Import

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

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. 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

Body Text

Thumbnails

Image Maps

TNG version: 12.3.0
TNG version: 7.0

Information on Image Maps apply to TNG versions prior to TNG 13

Image Tags

TNG version: 13.0.0

Information on Image Tags apply to TNG v13 and later

Other Useful Articles

Some TNG Media Mods