GitXplorerGitXplorer
D

JMedia-Properties

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a5e88b2485d74b378809ba121ea10f8fe686a763

Fix reading for array like string properties like Author

DDegubi committed 3 years ago
Unverified
f47d145755a487275b48112c8cec86a0a61e1340

Strip back API, add LICENSE file, add copyProperty

DDegubi committed 3 years ago
Unverified
45ddc40ca8e903e55e37157f42f2775da0334adc

Fix multithreading issue regarding COM init

DDegubi committed 3 years ago
Unverified
9ee95f12ba4a0b2bcdbe1202b842c900a3c08f84

Start working on new api additions

DDegubi committed 3 years ago
Unverified
c3034e0f776412110a7cd04678f432d296427ffb

Add director attribute

DDegubi committed 3 years ago
Unverified
8a275dc55efe60bcbde50548ca7f968ccfc34f68

Update README to 1.0.1

DDegubi committed 3 years ago

README

The README file for this repository.

JMedia-Properties

Github issues Dependencies

  • Java wrapper library around Windows Media File Metadata Properties
  • Useful for editing e.g the year or author attributes of a media file (e.g mp3/mp4 files)

What are Windows Media File Metadata Properties?

Installation

Maven dependency: (via Github Packages)

<repository>
    <id>github</id>
    <url>https://maven.pkg.github.com/Degubi/jmedia-properties</url>
</repository>

<dependency>
    <groupId>degubi</groupId>
    <artifactId>jmedia-properties</artifactId>
    <version>1.0.2</version>
</dependency>

Jar file:

Jar file downloads are available under 'Packages'

Usage

All operations are found as static utilities in a single class: MediaFileUtils
All supported media properties are found in an enum like class: MediaProperty

var file = Path.of("myFile.mp4");
var targetFile = Path.of("targetFile.mp4");

// Returns the 'author' field's value wrapped in an optional
MediaFileUtils.readProperty(file, MediaProperty.AUTHOR);

// Returns true if the file has a 'language' property
MediaFileUtils.hasProperty(file, MediaProperty.LANGUAGE);

// Returns true if the given file is a valid media file
MediaFileUtils.isMediaFile(file);

// Write 2021 into the 'year' field of the file
MediaFileUtils.writeProperty(file, MediaProperty.YEAR, 2021);

// Copies the year field from 'file' to 'targetFile'
MediaFileUtils.copyProperty(file, targetFile, MediaProperty.YEAR);

// Clears the file's 'title' property
MediaFileUtils.clearPropery(file, MediaProperty.TITLE);

Contributing

Feedback, bug reports and enhancements are always welcome.