Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Murray committed Oct 17, 2024
2 parents d7fc949 + 614aa65 commit deab78c
Show file tree
Hide file tree
Showing 12 changed files with 588 additions and 464 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
src/tests/.DS_Store
*.mxf
embarc-logfile.log
/node_modules/
package-lock.json
package.json
src/main/resources/version.properties
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file


## 1.3.1 2024-08-28
Accessibility Tasks:
- emb-w-01: make splash screen text accessible to screen readers
- emb-w-01: make splash screen text accessible to screen readers
- emb-m-01: make splash screen text accessible to screen readers (same as emb-w-01)
- emb-w-04: make tables navigable & sortable with screen reader
- emb-m-03: make tables navigable & sortable with screen reader (same as emb-w-04)


## 1.3.0 2024-02-27
Feature Additions:
- Add DPX CSV metadata export and sequence analysis
Expand Down
73 changes: 53 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,85 @@
# embARC (Metadata Embedded for Archival Content)

### About embARC
embARC is a free, open source application that enables users to audit and correct embedded metadata of a subset of MXF files, as well as both individual DPX files or an entire DPX sequence, while not impacting the image data. MXF, short for Material Exchange Format, is an object-based file format that wraps video, audio, and other bitstreams ("essences"), optimized for content interchange or archiving by creators and/or distributors, and intended for implementation in devices ranging from cameras and video recorders to computer systems. DPX, short for Digital Picture Exchange, is a pixel-based (raster) file format intended for very high quality moving image content with attributes defined in a binary file header.
embARC is a free, open source application that enables users to audit and correct embedded metadata of a subset of MXF files, as well as both individual DPX files or an entire DPX sequence, while not impacting the image data. MXF, short for Material Exchange Format, is an object-based file format that wraps video, audio, and other bitstreams ("essences"), optimized for content interchange or archiving by creators and/or distributors, and intended for implementation in devices ranging from cameras and video recorders to computer systems. DPX, short for Digital Picture Exchange, is a pixel-based (raster) file format intended for very high quality moving image content with attributes defined in a binary file header.

embARC, short for “metadata embedded for archival content,” is in active development by the Federal Agencies Digital Guidelines Initiative (FADGI) to support two major guideline projects:

embARC, short for “metadata embedded for archival content,” is in active development by the Federal Agencies Digital Guidelines Initiative (FADGI) to support two major guideline projects:
- [Guidelines for Embedded Metadata within DPX File Headers for Digitized Motion Picture Film.](http://www.digitizationguidelines.gov/guidelines/digitize-DPXembedding.html)
- [SMPTE RDD 48: MXF Archive and Preservation Format](http://www.digitizationguidelines.gov/guidelines/MXF_app_spec.html)
- Including [RDD 48 Amendment 1: Mapping FFV1 to MXF](https://www.digitizationguidelines.gov/guidelines/rdd48-amd1-2022.pdf)
- Including [RDD 48 Amendment 1: Mapping FFV1 to MXF](https://www.digitizationguidelines.gov/guidelines/rdd48-amd1-2022.pdf)

## Supported File Formats

### DPX (Digital Picture eXchange) support in embARC:

#### DPX
Digital Picture eXchange
- Import DPX files to support FADGI’s Guidelines for Embedded Metadata within DPX File Headers for Digitized Motion Picture Film as well as required SMPTE 268 metadata rules.
- Audit and correct internal metadata of both individual files or an entire DPX sequence while not impacting the image data.

#### MXF
Material eXchange Format
### MXF (Material eXchange Format) support in embARC:

- Import and inspect MXF files.
- Audit and correct internal metadata of one or more MXF files at a time.
- Download embedded text based and binary based data.

### Building and Running from Source Code
## Project Setup

#### Project Setup
Import the source code into eclipse or the IDE of your choice. Import [MAJ](https://github.com/PortalMedia/embARC-maj) and [DROID](https://github.com/digital-preservation/droid) projects and include alongside embARC. Include `droid-core`, `droid-core-interfaces`, and `maj` as projects in the build path.

#### Testing
### Testing

There are separate tests for each supported file type (DPX & MXF) included in the src/tests folder. Tests include reading, writing, and file format detection.

#### Running
### Running

Set up a run configuration with embARC as the target project and `com.portalmedia.embarc.gui.Main` as the main class. Include Java 1.8 or equivalent in project execution environment.

#### Building
Use gradle tasks to build embARC. See `launch4j/createExe` and `macappbundle/createApp` to build for Windows and MacOS, resepectively.
### Building GUI for Distribution

### About embARC CLI
embARC CLI is a free, open source application that enables users to audit embedded metadata of DPX and MXF files.
1. Update GUI `version` in build.gradle
2. Write a summary of changes in Changelog.md
3. Run gradle clean
4. To create embARC for MacOS, run gradle task macAppBundle/createDMG. When complete find embARC-x.x.x.dmg in the build/distributions folder.
5. To create embARC for Windows, run gradle task launch4j/createExe. When complete find embARC-x.x.x.exe in the build/launch4j folder.
6. To package embARC for Windows as an installer: use [Inno Setup](https://jrsoftware.org/isdl.php#stable) on a Windows machine. Place a copy of the embARC_exe_installer.iss file included at the root of this repo alongside your recently created embARC-x.x.x.exe. Open the .iss file in Inno Setup and edit the "MyAppVersion" property and any other properties therein as needed. Run the script. When complete, find embARC-x.x.x.exe packaged as an installer in the Output folder.

## embARC CLI

embARC CLI is a free, open source application that enables users to audit embedded metadata of DPX and MXF files from the command line.

embARC, short for “metadata embedded for archival content,” is in active development by the Federal Agencies Digital Guidelines Initiative (FADGI) to support two major guideline projects:

Guidelines for Embedded Metadata within DPX File Headers for Digitized Motion Picture Film.
SMPTE RDD 48: MXF Archive and Preservation Format

#### DPX Usage
### DPX Usage

`java -jar [path/to/embARC-CLI.jar] [input] [output] [options]`

[input] = path to target DPX file or DPX sequence folder [output] = -csv <filepath/newfile.csv> CSV formatted output -json <filepath/newfile.json> JSON formatted output [options] = -print -conformanceInputJSON Input validation json file -conformanceOutputCSV Output validation csv file
- [input]: path to target DPX file or DPX sequence folder
- [output]:
- `-csv <filepath/newfile.csv>` CSV formatted output
- `-json <filepath/newfile.json>` JSON formatted output
- [options]
- `-print` Print file metadata to console
- `-conformanceInputJSON` Input validation json file
- `-conformanceOutputCSV` Output validation csv file
- `-applyChangesFromJSON` Apply metadata changes from JSON file

### MXF Usage

#### MXF Usage
`java -jar [path/to/embARC-CLI.jar] [input] [options]`

[input] = path to target MXF file [options] = -print Print file metadata to console -downloadTDStream Write text data stream to local directory -downloadBDStream Write binary data stream to local directory -streamOutputPath Specify data stream output directory
- [input]: path to target MXF file
- [options]:
- `-print` Print file metadata to console
- `-downloadTDStream` Write text data stream to local directory
- `-downloadBDStream` Write binary data stream to local directory
- `-streamOutputPath` Specify data stream output directory

### Building CLI for Distrubtion

1. Update CLI `version` in build.gradle
2. Write a summary of changes in Changelog-CLI.md
3. Switch to CLI settings (`version` and `mainClassName`) in build.gradle
4. Run gradle clean
5. Run gradle task shadow/shadowJar. When complete find embARC-CLI-x.x.x.jar in the build/libs folder.
188 changes: 101 additions & 87 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,112 +1,126 @@

buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'edu.sc.seis.gradle:launch4j:2.4.4'
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2'
classpath 'de.jensd:fontawesomefx-commons:9.1.2'
classpath "edu.sc.seis:macAppBundle:2.3.0"
}
plugins {
id 'java'
id 'eclipse'
id 'application'
id 'distribution'
id 'com.github.johnrengelman.shadow' version '4.0.2'
id 'edu.sc.seis.launch4j' version '2.4.4'
id 'edu.sc.seis.macAppBundle' version '2.3.0'
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
apply plugin: 'distribution'
apply plugin: 'launch4j'
apply plugin: "edu.sc.seis.macAppBundle"
applicationName = 'embARC'

// GUI
version = '1.3.0'
mainClassName = "com.portalmedia.embarc.gui.Main"
// GUI Settings
version = '1.3.2'
mainClassName = 'com.portalmedia.embarc.gui.Main'

// CLI
//version = '0.4.0'
//mainClassName = "com.portalmedia.embarc.cli.Main"
// CLI Settings
// Uncomment the following lines for CLI version
// version = '0.4.0'
// mainClassName = 'com.portalmedia.embarc.cli.Main'

repositories {
mavenCentral()
mavenLocal()
mavenCentral()
mavenLocal()
}

sourceSets.main {
java {
srcDirs = ['src/main']
}
resources {
srcDirs = ['src/main', 'src/resources']
}
sourceSets {
main {
java {
srcDirs = ['src/main']
}
resources {
srcDirs = ['src/main', 'src/resources']
}
}
test {
java {
srcDirs = ['src/tests']
}
resources {
srcDir 'tests/resources'
}
}
}

sourceSets.test {
java {
srcDirs = ['src/tests']
}
resources {
srcDir 'tests/resources'
}
dependencies {
implementation 'commons-cli:commons-cli:1.4'
implementation 'commons-collections:commons-collections:3.2.2'
implementation 'commons-io:commons-io:2.8.0'
implementation 'commons-lang:commons-lang:2.6'
implementation 'de.jensd:fontawesomefx-emojione:2.2.7-2'
- implementation 'de.jensd:fontawesomefx-fontawesome:4.7.0-5'
- implementation 'de.jensd:fontawesomefx-icons525:3.0.0-4'
- implementation 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
- implementation 'de.jensd:fontawesomefx-materialicons:2.2.0-5'
- implementation 'de.jensd:fontawesomefx-octicons:4.3.0-5'
- implementation 'de.jensd:fontawesomefx-weathericons:2.0.10-5'
implementation 'javax.activation:activation:1.1'
implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
implementation 'net.byteseek:byteseek:2.0.3'
implementation 'net.sf.supercsv:super-csv:2.3.1'
implementation 'net.sf.trove4j:trove4j:3.0.3'
implementation 'org.apache.tika:tika-core:1.4'
implementation 'org.controlsfx:controlsfx:8.40.14'
implementation 'org.dizitart:nitrite:3.1.0'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438'
implementation 'org.json:json:20201115'
implementation files('../maj/target/classes')
implementation files('../droid/droid-core/target/classes')
implementation files('../droid/droid-core-interfaces/target/classes')
implementation fileTree(dir: '../javafx-sdk-18.0.2/lib', include: '*.jar')
//implementation fileTree(dir: '../fontawesome', include: ['*.jar'])
implementation gradleApi()

implementation 'junit:junit:4.12'
}

jar {
manifest {
attributes(
'Main-Class': 'com.portalmedia.embarc.cli.Main'
)
}
}

shadowJar {
archiveName = "embARC-${version}.jar"
baseName = 'embARC'
archiveName = "embARC-${version}.jar"
baseName = 'embARC'
}

launch4j {
mainClassName = "com.portalmedia.embarc.gui.Main"
outfile = 'embARC.exe'
copyConfigurable = project.tasks.shadowJar.outputs.files
jar = "lib/${project.tasks.shadowJar.archiveName}"
icon = "${projectDir}/icons/embarc_gRr_icon.ico"
maxHeapSize = 6000
jvmOptions=['-XX:+UseG1GC','-Xms64m']
maxHeapPercent = 10
version = "${version}"
mainClassName = 'com.portalmedia.embarc.gui.Main'
outfile = 'embARC.exe'
copyConfigurable = tasks.shadowJar.outputs.files
jar = "lib/${project.tasks.shadowJar.archiveName}"
icon = "${projectDir}/icons/embarc_gRr_icon.ico"
maxHeapSize = 6000
jvmOptions = ['-XX:+UseG1GC', '-Xms64m']
maxHeapPercent = 10
}

macAppBundle {
mainClassName = "com.portalmedia.embarc.gui.Main"
icon = "${projectDir}/icons/embarc.icns"
bundleJRE = true
backgroundImage = "${projectDir}/icons/embARC.png"
jreHome = "/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home"
jarTask = "shadowJar"
appName = "embARC"
version = "${version}"
mainClassName = 'com.portalmedia.embarc.gui.Main'
icon = "${projectDir}/icons/embarc.icns"
backgroundImage = "${projectDir}/icons/embARC.png"
arguments = ['-XX:+UseG1GC', '-Xms64m']
bundleJRE = true
jreHome = '/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home'
jarTask = 'shadowJar'
}

dependencies {
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile group: 'org.apache.tika', name: 'tika-core', version: '1.4'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'
compile group: 'commons-io', name: 'commons-io', version: '2.8.0'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'net.byteseek', name: 'byteseek', version: '2.0.3'
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.3.1'
compile group: 'org.json', name: 'json', version: '20201115'
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'
compile group: 'javax.activation', name: 'activation', version: '1.1'
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version:'2.4.0-b180830.0438'
compile group: 'junit', name: 'junit', version: '4.12'
compile 'org.dizitart:nitrite:3.1.0'
compile 'de.jensd:fontawesomefx-emojione:2.2.7-2'
compile 'de.jensd:fontawesomefx-fontawesome:4.7.0-5'
compile 'de.jensd:fontawesomefx-icons525:3.0.0-4'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
compile 'de.jensd:fontawesomefx-materialicons:2.2.0-5'
compile 'de.jensd:fontawesomefx-octicons:4.3.0-5'
compile 'de.jensd:fontawesomefx-weathericons:2.0.10-5'
compile 'org.controlsfx:controlsfx:8.40.14'
compile gradleApi()
compile files("../maj/target/classes")
compile files("../droid/droid-core/target/classes")
compile files("../droid/droid-core-interfaces/target/classes")
compile files("../javafx-sdk-18.0.2/lib")
task writeVersionProperties {
doLast {
def file = file("${projectDir}/src/main/resources/version.properties")
file.text = "version=${version}\n"
}
}

processResources.dependsOn writeVersionProperties

test {
systemProperties 'property': 'value'
systemProperties = ['property': 'value']
}
7 changes: 3 additions & 4 deletions embARC_exe_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "embARC"
#define MyAppVersion "0.1"
#define MyAppVersion "1.3.0"
#define MyAppPublisher "AVP & PortalMedia"
#define MyAppURL "http://www.weareavp.com/ & http://www.portalmedia.com/"
#define MyAppExeName "embARC.exe"
Expand All @@ -21,7 +21,7 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
OutputBaseFilename={#MyAppName}-{#MyAppVersion}
Compression=lzma
SolidCompression=yes

Expand All @@ -32,7 +32,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\temp\embARC-prebuild\embARC.exe"; DestDir: "C:\temp\output\{app}"; Flags: ignoreversion
Source: "embARC.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand All @@ -41,4 +41,3 @@ Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

3 changes: 2 additions & 1 deletion src/main/com/portalmedia/embarc/gui/AboutModal.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
</Pane>
<Pane prefHeight="50.0">
<Label
text="Version: 1.3.0"
fx:id="versionLabel"
text=""
/>
<Hyperlink
fx:id="fadgiLink"
Expand Down
Loading

0 comments on commit deab78c

Please sign in to comment.