From UA Libraries Digital Services Planning and Documentation
Revision as of 11:29, 24 March 2017 by Jlderidder (talk | contribs) (Logfile (spreadsheet))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A version of the [fits2aes script] is provided open source under the [Creative Commons Attribution 3.0 Unported license]. This means that you are free:

  1. to share -- to copy, distribute and transmit the work
  2. to remix --to adapt the work
  3. Under the following conditions:
  4. attribution -- You must attribute the work in the manner specified by the author or licensor
  5. (but not in any way that suggests that they endorse you or your use of the work).

This script will run FITS on wave files provided, and then generate AES57 files, using information provided in a tab-delimited spreadsheet (and the results of the FITS script). It is written on Linux, and would require modifications to run on Windows.

You can read more about this script and how it works in "Generating Standardized Audio Technical Metadata: AES57 in the Code4Lib Journal.

To use

Replace the .txt extension with .pl, and modify the first line to point to PERL on your system. Change permissions to 755 (for executables; example: "chmod 755"). The script expects WAV files in a "waves" sub-directory, an appropriate tab-delimited spreadsheet, and the installation of FITS on your system.

The script expects 2 arguments on the command line: the spreadsheet name (with path if needed) and the path to the script (usage: logfile fitsScript). For example:   u0008_2012038.log.txt   /srv/scripts/preservation/fits-0.8.4/

Logfile (spreadsheet)

The logfile should be tab-delimited UTF-8 or ASCII text file containing the following fields: identifier, title, physical format, clipBegin, clipEnd, regionCondition notes, stream1 notes, stream2 notes, stream3 notes, stream4 notes, priorStream notes, endingStream notes, direction, label, speed correction, WaveFile, length.

   IF USING .1, .2, .3.wav files to handle logical vs intellectual content, then the WaveFile and length columns MUST BE FILLED IN.  Ignore them otherwise. 
   The posted version of Fits2aes does not support this type of transform.  For these, use the following type of log file:
   [Sample with logical vs intellectual.]

Fields (columns) following these will be ignored.

[A sample logfile is provided here.]

Entries in spreadsheet

Entries may be for singletons (one extracted audio clip per file) or multiples, where the identifier of the item is a portion of the identifiers of all subsidiary clips.

Since AES57 files represent analog items, and an intellectual item may span multiple physical items, the script will appropriately respond to either 21-digit or 26-digit identifiers as the file identifier when followed by longer identifiers (for subsidiary entries, or clips) that contain those values. Here is more information on our file naming scheme.

If your file naming system is different, or uses longer/shorter identifiers, this portion of the script will need to be modified to work for your content.

Based on the FITS duration of the WAV file, and the "clipBegin" and "clipEnd" values, the script will generate regions for segments of the WAV file not included in the clips selected for web delivery. Notes about those may be added in the "priorStream notes" field -- or if they are at the end, then in the "endingStream notes" field following the final clip for the file.

Comments and condition notes:

Security notes on the region level are supported by semicolon separation of the security note from any other region notes, and preceding the security note with “Security: “. Also, as condition notes can optionally be targeted to specific clips of time within a region or stream, such clips of time can be included (in square brackets) prior to the appropriate note within the spreadsheet.

For example, to provide 3 comments (one about security) about portions of a specified region, the following formatting would be expected in the spreadsheet field for region condition notes, in the row dedicated to that region:

 [12:23-12:30] crackly; Security: phone number; [13:01-14:12] background whine

Time Ranges and Speed Corrections

The script expects clipBegin and clipEnd values to be in the form hh:mm:ss, but should handle mm:ss and ss and hh:mm:ss:subsec gracefully. Thus, seconds are required, even if they are zero.

Speed corrections should be entered as decimal values, such as 2.0 for twice as fast, or .5 for half as fast. The sample rate (from the FITS) will be used with the speed correction and the number of seconds to determine the "editUnit: (in frames) that winds up in the AES file. More about this process is described in the Code4Lib article November 2015.


As this software was written for content undergoing digitization, it tries to identify the physical form by parsing text from the spreadsheet “format” field, entered in appropriate RDA cataloging form, such as: “1 sound tape reel: analog (10:56 min); 7 inches.”

Values that must exist in the format field for correct assignment include “tape”, “cassette” or “reel” (with or without “digital”); “disc” (with either “digital” or “analog”); “roll,” or “wire.” If the type of content cannot be determined, the “formatRegionType” value is substituted for this attribute.

Example FITS and AES57 Files

The following example FITS files were used with the above-linked spreadsheet and script to generate the following example AES57 files.

FITS files:

AES57 files:


Contact Jody DeRidder.