ELAN
- Introduction
- Availability, Support and Use-case
- Tips & Tricks
Introduction
ELAN is free and opensource software that is used for annotating (coding) and transcribing video and/or audio.
When coding behavior, the use of ELAN is highly recommended over the Observer XT, as ELAN is free and opensource. SOLO does not guarantee the availability of licenses for the Observer in the future. A comparison between ELAN and the Observer can be found here: Comparison the Observer vs ELAN.
When using ELAN, make sure to cite it in publications, see information here: Download | The Language Archive.
Availability, Support and Use-case
ELAN is installed in the Researchdata analysis room (on the Desktop). It can be downloaded here: Download | The Language Archive. On managed devices, the portable .zip version can be downloaded and used. SOLO provides limited technical support for ELAN.
Official documentation can be found here: Documentation | The Language Archive (mpi.nl). Additionally, these video tutorials are highly recommended: ELAN Intro - ELAN explained in plain LEGO - VILA VIDEO TUTORIALS (youtube.com).
Tips & Tricks
Creating a New Project
In ELAN, one project is created per observation. When multiple video's were recorded per observation, multiple video's can be added into one project and synchronized if required.
To create a new project, go to File > New. Here, navigate to the folder where the video that needs to be annotated is located, select the video and move it to the Selected Files area. Additionally, a template can be selected and added to the project. When all necessary files are moved to Selected Files, press OK.
By default, the File Format of the media files is set to Common Media Files (*.mpg, *.mpeg, *.wav, *.mp4, *.mpg4, *.mov, *.qt). When you have a different media format, you could select All Files at File Format. If you have difficulties playing your video in ELAN, try transcoding it to for example an mp4 format (see Audio and Video Transcoding for Research - XWiki for more information on how to do this).
Setting Up a Project
Before setting up a project, it is important to understand some important structural elements of ELAN: Tiers, Tier Types, and Controlled Vocabularies.
Tiers
A Tier is used to organize and structure annotations. Each Tier represents a specific type of annotation and is displayed as a separate row in the Timeline Viewer. Tiers can have a hierarchical structure, where a parent Tier can have one or multiple child Tiers, but usually, Tiers are independent layers.
Tier Types
In general, a Tier Type defines the type of annotations that are inserted on a specific Tier. Multiple Tiers can have the same Tier Type, but it is also common to have a oneTier Type for each Tier.
Controlled Vocabularies
Controlled vocabularies (CVs) are predefined lists of annotation values or codes that are used on specific tiers. These vocabularies help ensure consistency and reduce errors during the annotation process. A CV needs to be associated with a Tier Type to be able to use it for a specific Tier.
Creating Tiers and Tier Types
In the current example, we are annotating a short video clip which depicts an interaction between parent and child. For simplicity, we will only be coding the following:
- The gaze direction of the parent
- The gaze direction of the child
As such, we will create two Tiers and two Tier Types:
- Tier: "gaze_parent" with Tier Type: "gaze_parent"
- Tier: "gaze_child" with Tier Type: "gaze_child"
In the example above, the Tiers and Tier Types have the same name.
First, the Tier Types need to be created.
- Go to Type > Add New Tier Type.
- Fill in the Type Name: "gaze_parent". Other settings are left as is. Click Add.
- Do the same for Tier Type "gaze_child".
Next, the Tiers are created.
- Go to Tier > Add New Tier.
- Fill in the Tier Name: "gaze_parent".
- Select the Tier Type: "gaze_parent".
- Additionally, you can fill in the Participant: parent, and the Annotator: your name. For the current example, other options can be left as is.
- Click Add.
- Do the same for the "gaze_child" tier.
In this example, the Tier Types do not add much information or functionality to the Tiers. However, below we will see that a Tier Type is necessary when Controlled Vocabularies are used.
The behavior on the newly created Tiers can now be annotated. This is done by selecting part of the video, double-clicking on the selection in the desired Tier and then typing the desired annotation name.
Creating Controlled Vocabularies
In the current example so far, Tiers can have any annotation and the annotation needs to be typed in each time a new annotation is made. However, usually only a few predefined annotations are relevant for a certain Tier. Additionally, typing in annotations each time, is error-prone and typos can mess up the final analysis.
To solve this, one can create Controlled Vocabularies. In the current example, we will create two Controlled Vocabularies, "gaze_parent", with values "child" and "away" and "gaze_child", with values "parent" and "away". Thus, to keep it simple, we will only annotate when the parent is looking at the child or away from the child and when the child is looking at the parent or away from the parent.
To create the Controlled Vocabularies:
- Go to Edit > Edit Controlled Vocabularies.
- Enter the CV name: "gaze_parent". Click Add.
- Enter the Entry value: "child". Click Add.
- Enter another Entry value "away". Click Add.
- Add another CV by putting in a new CV Name: "gaze_child", then click Add.
- Add the Entry values: "parent" and "away".
The newly created CVs need to be added to the already existing Tier Types and Tiers.
- Go to Type > Change Tier Type.
- Select the gaze_parent Type and change the Use Controlled Vocabulary to "gaze_parent". Press Change.
- Select the gaze_child Type and change the Use Controlled Vocabulary to "gaze_child". Press Change.
Now, when we select a part of the video and double-click on the selection, we get only two options. In the gaze_parent Tier we get the options "child" and "away", and in the gaze_child Tier we get the options "parent" and "away".
Using Templates
So far, we have created our own Tiers with Tier Types and Controlled Vocabularies. To avoid making these for each project, a template can be created and opened in a next observation. Save the template by going to File > Save as Template. Fill in a File Name and click Save.
When you want to use a template in the next observation, it can be added when going to File > New. Add the desired Media to the Selected Files and select Template to add the template to the Selected Files.
Annotating Behavior
Annotating behavior can be done in the default Annotation Mode. As mentioned before, this can be done by selecting part of the video, double-clicking on the selection and entering an annotation value (either manually or by using a Controlled Vocabulary).
Another way to annotate behavior in a faster way, is by using Segmentation Mode. Go to Options and click Segmentation Mode. Here, the start and stop of each annotation can be indicated by a mere keystroke. There are different options, like creating adjacent annotations or non-adjacent annotations. Press SPACE to start and stop the video. Press ENTER to insert a start and/or stop of an annotation.
In Segmentation mode it is thus possible to quickly insert annotations. However, annotation values cannot be added here. All annotations are ‘empty’. To add values to the annotations, you will need to switch back to Annotation Mode (using the Options menu). Alternatively, you can create Tiers on which only one behavior is coded, so that there is no need to add a value to the behavior (the behavior can only be ‘on’ or ‘off’). This may however not be a workable solution when a lot of behaviors need to be annotated.
Analyzing the Data
Basic statistics such as duration and frequency of annotations can be obtained by going to View > Annotation Statistics. Select the desired Tier. These statistics can be saved in a text file by clicking Save.
Synchronizing Multiple Video’s
Some observations are performed with multiple camera’s. In such cases, it is likely that not all camera’s were started at the same time. In ELAN, multiple video files can be added to the same project. These video files can then be synchronized by going to Options > Media Synchronization Mode.
When you have two video’s, there are two players. Select the player with the video that is lagging behind on the other video. Play the video and stop it where it is in sync with the other video. Then, hit Apply Current Offset. Select both players and double-check that the video’s are in sync.
ELAN sometimes does not play multiple video’s properly. Playing the video from the beginning again, or restarting the program can help.
Analyzing Clusters of Behavior
For some studies, it may be relevant to analyze clusters of behavior. In our example, we have annotated whether the parent was looking at the child or away, and whether the child was looking at the parent or away. A cluster of behavior would be, for example, when the parent is looking at the child and when the child is looking at the parent, i.e. they make eye contact.
To analyze clusters of behavior, a new Tier can be created that combines two or more Tiers. To do so:
- Go to Tier > Create Annotations from Overlaps.
- Select the relevant Tiers: "gaze_child" and "gaze_parent". Click Next.
- Leave the next screen to its default regardless of their annotation values. Click Next.
- Enter the name for the destination tier: "eye_contact". Add a new Tier Type by clicking Add new type. Add Type Name: "eye_contact". Click Add then click Close. Select the newly created eye_contact Tier Type and click Next.
- Leave Concatenate the values of the annotations selected, but do select Compute values in the order of the selected tiers. This will ensure that the overlapping annotations will have the same name regardless whether the child looked at the parent first (which would otherwise be named "child parent") or whether the parent looked at the child first (which would otherwise be named "parent child"). In the current example, all such overlapping annotations will be called "parent child", which makes analysis a lot easier. Click Finish.
A new Tier has now been created with annotations that are concatenations of the annotations of the gaze_parent and gaze_child Tiers.
Performing Lag Sequential Analysis
Performing a lag sequential analysis is not possible in ELAN, but can be performed outside of ELAN in R. Data from ELAN can easily be exported by going to File > Export As, and choosing the desired file format. A Tab-delimited Text file would be easily imported into R. R offers a package called LagSequential to perform lag sequential analysis on categorical data. For more information on how to use the package, see LagSequential: Lag-Sequential Categorical Data Analysis.
Performing Reliability Analysis
A reliability analysis can be performed by going to File > Multiple File Processing > Calculate Inter-Annotator Reliability. Different methods can be used for calculating the reliability. For more information, see Calculate inter-annotator reliability.
Importing Annotations/Events
Events can be imported as annotations. Some standard types of files can be imported, such as a PRAAT file. It is also possible to import a custom event file. Go to File > Import > CSV / Tab Delimited Text File. The event file should be a .txt, .csv or .tsv file, with comma or tab separated columns. The file can contain header rows, which can be skipped when the file is imported.
The custom event file can have the following columns:
- Annotation (event)
- Tier
- Begin Time
- End Time
- Duration
The Begin Time, End Time, and Duration can be formatted as hh:mm:ss.ms or s.ms
With this method, events can be imported as annotations. This could be useful when the observed participant was administered a task with different conditions. These conditions could be saved in a text file and the text file could be imported into ELAN.
When the event file is not synchronized with the video file, one can do so by
- Playing the video and determining the moment where the Event file is timepoint 0.
- Going to Edit > Linked Files
- Fill in the offset in the video
Synchronizing event and media files with the above method requires the following:
- The video needs to be started before the event file’s timepoint 0.
- It needs to be visible in the video where timepoint 0 of the event file is. For example, when events are sent from stimulus presentation software, the video could register the start of the task.
Using the Observer Data in ELAN
It is possible to annotate data that has previously been coded in the Observer. To do this, you will need the following:
- The observational data (the video’s)
- The annotation data
To obtain the annotation data (or observational data) from the Observer, in the Observer go to File > Export > Observational Data. Now, you can select the data type. It would seem obvious the select the Other software option. However, this will result in quite oddly formatted files, which cannot be imported into ELAN without modification. It seems easier to select the Microsoft Excel option. Since the data in ELAN is analyzed per observation, select Create separate files per observation at Export option and press OK. The data is saved in .xlsx files.
To be able to import the data into ELAN, the Excel files need to be converted to a different format, e.g. tab delimited files. This can be done by opening the xlsx file in Excel, then saving the file as Text (Tab Delimited) (*.txt) file.
To then import the file into ELAN, in ELAN go to File > Import > CSV / Tab-delimited Text File. Open the text file with the observational data. For each column, a data type needs to be selected. In general, the Time_Relative_sf column can be used as the Begin Time, the Duration_sf as the Duration, the Subject could be imported as Tier and the Behavior as Annotation. Note that in ELAN, behaviors or annotations cannot overlap in one Tier, so it may not be possible to easily import behavioral data into ELAN. Some modifications may be required. When done, press OK.
Note that it seems that the Duration is not always interpreted correctly. Always double-check your data in ELAN to confirm it was imported correctly! Instead of using the Duration, you could create an additional column with the end time. This can be done by adding the columns Time_Relative_sf and Duration_sf, for example in Excel. Then, classify this newly created column as End Time when importing the behavioral data.
Archiving ELAN data
When archiving ELAN data, make sure to save the following:
- The project files of each observation (.eaf file).
- The template file (.etf).
- The raw video files.
- The ELAN software used to analyze the data. Make sure it is the same version that was used to analyze the data. It is advised to include the .zip with the software, that can be downloaded here: Download | The Language Archive. One major advantage of ELAN is that the software is freely accessible and can be stored with the data archive.
When working on a project in ELAN, a .pfsx and .001 file are automatically generated. These do not need to be archived. The .pfsx file contains user- and document- specific settings like the font size used to display text, but does not contain any annotation data. The .001 file is an automatically generated backup.