Import Media Using GEDCOM
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
- Configure TNG's media folders with the PC file paths that are used in your GEDCOM files. (One time)
- Upload a GEDCOM file as described in Import Data
- Upload your media files to the appropriate media folders, using an an FTP Client or a File Manager utility.
- Set the appropriate media collection for some of your files (as required).
- Create Thumbnails for your media files.
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).
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
Note that the GEDCOM media records specify a full file path and file name for the media file. There are two related complicating factors:
- The file path from the device root to the collection folder will be different on the web server, and
- 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.).
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
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
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
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
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.
When you are doing an import, you have to select the option to Import Media as shown below.
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.
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:
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...
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
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.
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:
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.
- Media - Collections
- External Link Collection
- Media - Add New - Collection
- Media - Add New - Collection (Military Ribbons example)
- 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.
- Histories - Creating - Create a new TNG Media record without importing a multimedia file into TNG.
- 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.
Other Useful Articles
- Batch updates of IPTC tags using IrfanView
- Folios on how to handle multi-page documents as if it were a single TNG media object
- Folios - Examples
- Media Functions on how to hook videos into TNG
- Preserving Digital Photos