This repository has been archived since May 2021

Logo

Rexedia

Metadata editing (including cover art) for bulk files using regular expressions (regex) and back references.
DocumentationIssues

Java CI CodeQL Deploy version license

Contents:

Setup

Compiled binaries can be found in releases. releases

Features

🎬 Wide Media Support

Rexedia supports all file extensions supported by FFMPEG.

rexedia -i "file.mp4" -c "(.+)" "$1.png" -o "(.+)" "$1.avi"

⭐ Features

Complicated tasks simplified:

  • Apply cover art and metadata.
  • Customize output with regular expressions and back references.
  • Support for preset files instead of command-line flags.
  • Logging to track changes.
rexedia -i video.mp4 -p preset.yml
# preset.yml
metadata:
  - meta: 'title'
    regex: '(.+)'
    format: '$1'

✔ Safe Video Formatting

Rexedia preserves the integrity of the video file.

  • Verify file integrity using the -v flag.
  • Backup files will always be saved on format failure.
  • Use the -b flag to keep backup files even on successful formats.
rexedia -i "file.mp4" -c "(.+)" "$1.png" -b -v 3

Arguments

Regular expression will test against the file name without the extension.

At least one input required.

A cover, metadata, or output; or preset must be specified. If a preset is specified then the cover, metadata, and output flags will be ignored.

FlagTypeDescription
-i -input[file]The file or directory path to format. Can be used multiple times.
-w -walk[boolean]If true, subdirectories will also be formatted (only for directory input).
-b -backup[boolean]If true, input files will be backed up.
-l -logging[boolean]If true, log files will be generated.
-d -debug[boolean]If true, debug logs will be generated.
-v -verify[int]File validation level. 0 = off, 1 = frames within range (default), 2 = frames equal to or exceeding within range, 3 = exact frame count.
-vd -verifyDiscrepancy[int]Frame difference range (only for verify 1 or 2).
-pc -preserveCover[boolean]If true, files with existing cover art will not get erased unless a new one is specified.
-pm -preserveMeta[boolean]If true, files will preserve any existing metadata in the final output.
-p -preset[file]The presets file path. Overrides cover, metadata, and output flags. Can only be used once.
-c -cover[regex] [string]The regular expression and back reference to use for the cover art. Can only be used once.
-m -metadata[string] [regex] [string]The metadata tag name, regular expression, and back reference string to use for metadata. Can be used multiple times.
-o -output[regex] [string]The regular expression and back reference string to use for output file. Uses the extension from the final string or the extension of the input file if none is specified. Can only be used once.

Example Usage

Assign video a cover art image with the same name

┬ video.mp4
└ video.png
rexedia -i video.mp4 -c "(.+)" "$1.png"

Assign video a cover art image with the same name and save to new file

┬ video.mp4 → video.avi
└ video.png
rexedia -i video.mp4 -c "(.+)" "$1.png" -o "(.+)" "$1.avi"

Assign video metadata based on the name

─ [S01 E02] video.mp4 → ┌ season_number = 1
                        ├ episode_sort = 2
                        └ show = video
rexedia -i video.mp4 -m "season_number" "\[S0*(\d*) E0*\d*\]" "$1" -m "episode_sort" "\[S0*\d* E0*(\d*)\]" "$1" -m "show" "\[S0*\d* E0*\d*\] (.+)" "$1"

Presets

cover:  # cover art
  regex: '(.+)'  # the regex capture string
  format: '$1'  # the final cover art name (regex backreferences supported)
metadata:  # list of metadata tags
  - meta: 'name'  # the metadata tag name
    regex: '(.+)'  # the regex capture string
    format: '$1'  # the final metadata value (regex backreferences supported)
output:  # output file
  regex: '(.+)'  # the regex capture string
  format: '$1'  # the final output name (regex backreferences supported)

Example Usage

Assign video metadata based on the name from preset

┬ [S01 E02] video.mp4 → ┌ season_number = 1
└ preset.yml            ├ episode_sort = 2
                        └ show = video
# preset.yml
metadata:
  - meta: 'season_number'
    regex: '\[S0*(\d*) E0*\d*\\]'
    format: '$1'
  - meta: 'episode_sort'
    regex: '\[S0*\d* E0*(\d*)\]'
    format: '$1'
  - meta: 'show'
    regex: '\[S0*\d* E0*\d*\] (.+)'
    format: '$1'
rexedia -i video.mp4 -p preset.yml

Contributing

Development

Role
Developer & Maintainer
Started
July 2020
Completed
December 2020
Last Updated
May 2021
Description

A CLI that applies metadata and cover art to bulk media files.

Status
Archived

Built with
  • Java
  • Apache Maven
Built using
  • IntelliJ
  • GitHub
  • GitHub Actions
Built for
  • Windows