The Mediags project consists of three products:

Mediags (Yeah, same name as the project.)
UberFLAC (Oops, forgot the umlaut.)
UberLAME (Oxymoron?)

What these products offered here have in common is their deep knowledge of file formats, with a focus on media files. All this knowledge is stored in a single library that is common to all executables. This ensures that functionality remains consistent regardless of the front end.

Mediags

Description

Mediags is a console program that scans directories for media files and verifies the integrity of those files. Detailed content reports may optionally be produced. At this time the following types are supported:

ape, asf/wmv/wma, avi/divx, cue, flac, flv, gif, ico, jpg/jpeg, log (EAC), m3u, m3u8, m4a, md5, mkv/mka, mov/qt, mp3, mp4, mpg/mpeg/vob, ogg, png, sha1, sha256, wav

Mediags will verify any internal CRC against the file contents and report mismatches caused by bit rot, truncation, tampering, etc. Types that store CRCs include FLAC, JPEG, MP3 (LAME only), OGG and PNG. Mediags makes no assumption of content based on extension. Every file's contents are analyzed for its actual type. An error total will be displayed at the end along with total file counts. Zero errors and zero warnings are good.

For first time use, the following line is recommended:

mediags /g:quiet .

The /g:quiet switch will produce a less detailed report with only the most serious issues being reported. Later reports may be produced with greater granularity. See usage below.

Usage

mediags [/R] [/f:<wildcard>] [/g:<granularity>] [/h:<hashes>] [/v:<validations>] [/w:<escalators>] [/e:<escalators>] [/out:<mirror>] [/p:<counter>] [/x:<exclusion>] [/k] <fileOrDirectory>

Where <granularity> from Detail, Long, Verbose, Advisory, Terse, Quiet, Summary

Where <hashes> is list taken from:
None, Intrinsic, FileMD5, FileSHA1, FileSHA256, MetaSHA1, MediaSHA1, PcmCRC32, PcmMD5, WebCheck

Where <validations> is list taken from None, Exists, MD5, SHA1, SHA256

Where <escalators> is list taken from HasId3v1, HasId3v24, HasApe, Substandard, Overstandard, ProveErr, ProveWarn

Where <fileOrDirectory> is a file or directory name without wildcards.

If a directory name contains <exclusion>, it will not be traversed.

Use /p:0 to suppress the progress counter.

Use /k to wait for a keypress before exiting.

Use /R to prompt for confirmation to repair fixable issues with the file. Each and every repair must be confirmed before attempted. The following issues may be repaired:

1. Phantom MP3 ID3v1 tag.
2. EAC-induced bug that sometimes creates an MP3 with a bad ID3v2 tag size.
3. End-of-file watermarks on AVI, MP4 and MKV files. This is bogus data that can be removed without harm.
4. Incorrect file extensions.

Example session

N:\Vid>mediags /R /g:detail /h:filemd5 .

N:\Vid\
MST3K - 0309 - 20010930 - The Amazing Colossal Man.mpg

File MD5  = A9963B6C7E061FF2C1BF6E68B3428E16
File size = 728020992

RIFF size = 728019000
JUNK size = 1992
Codec = MP42
Streams = 2
Resolution = 480x360

Diagnostics:
  Warning: True file format is .avi

Rename to extension of .avi? y
Repair successful!

Mediags can be used as an EAC log checker that performs a subset of the comprehensive checks performed by UberFLAC. Validation of the EAC log hash may included as seen here:

T:\FLAC>mediags /g:verbose /h:webcheck /f:*.log .
T:\FLAC\Ministry - 1995 - Filth Pig\
Ministry - 1995 - Filth Pig.FLAC.CHECKED.log
  AccurateRip verification confidence 24 (v2).
  CUETools DB verification confidence 12.
  EAC log self-hash verification successful.
T:\FLAC\Peter Gabriel - 1982 - Security\
Peter Gabriel - 1982 - Security.log
  AccurateRip verification confidence 61 (v2).
  CUETools DB verification confidence 56.
- Warning: EAC log self-hash not present.
T:\FLAC\Radiation City - 2012 - Cool Nightmare\
Radiation City - 2012 - Cool Nightmare.FLAC.CHECKED.log
  AccurateRip verification confidence 2 (v2).
  CUETools DB verification confidence 2.
  Test/copy CRC-32s match for all tracks.
  EAC log self-hash verification successful.

---- ---- ---- ---- ----
3 total files diagnosed
3 log (EAC) files
1 file with warnings
0 files with errors


UberFLAC

Description

The purpose of the UberFLAC project is to enable the long term archival of audio compact disc contents to secondary media. Such an archive is intended to function as an exact historical record while also a living media library that may be accessed from popular media players.

UberFLAC requires that extraction of CD contents must be performed by the Exact Audio Copy program (EAC) with the CUETools plugin and proper configuration. The extraction results must be contained within a single directory and that directory must not contain any results from another extraction.

Once the disc content is extracted, UberFLAC takes over. By deep analysis of the EAC log file and corresponding audio files, UberFLAC guarantees that the extracted audio is exact and complete. Verification by UberFLAC should be repeated periodically to ensure that quality has not degraded due to media failure or user error.

Directories may be "signed" by UberFLAC as correct by renaming the log file to include a signature and generating an MD5 hash file. If a signature is provided and there are errors, a diagnostics text file will be placed in the offending directory and the directory will be given an error prefix.

For a guide to installing EAC along with tagging requirements, see the UberFLAC Guide.

Usage

uberflac [/autoname[:<NamingStrategy>]] [/g:<granularity>] [/k] [/md5] [/out:<file>] [/p:<counter>] [/prove[:web]] [/rg] [/sig:<signature>] [/ubertags] <directory>

Where <directory> is a relative or absolute directory name without wildcards.

Use /sig:<signature> to sign the .log file and create a .md5 file. If no /sig is specified, no changes will be made to the file system.

use /autoname to rename files based on tag values. See Naming Strategies.

Use /g:verbose to get more feedback.

Use /md5 to also perform internal MD5 verifications of FLACs. For the paranoid.

Use /out:results.txt to mirror console output to results.txt.

Use /p:0 to suppress the progress counter.

Use /rg to add ReplayGain on first signing.

Use /k to wait for a keypress before exiting.

Use /prove to escalate the severity of rip integrity issues.

Use /prove:web to escalate rip issues and verify EAC log hash. Requires web connection.

Use /ubertags to escalate substandard tagging issues.

Example console session

N:\Rips> uberflac /strict /g:verbose /sig:CHECKED .

.\Ministry - 1995 - Filth Pig\
Ministry - 1995 - Filth Pig.log
  AccurateRip verification confidence 24 (v2).
  CueTools DB verification confidence 12.
  CRC-32, CRC-16 & tag checks of 10 FLACs successful.
Ministry - 1995 - Filth Pig.m3u
  Playlist created.
Ministry - 1995 - Filth Pig.FLAC.CHECKED.md5
  Digest created.

+ EAC log is signed and uber!

.\Peter Gabriel - 1982 - Security\
Peter Gabriel - 1982 - Security.log
  AccurateRip verification confidence 61 (v2).
  CueTools DB verification confidence 56.
  CRC-32, CRC-16 & tag checks of 8 FLACs successful.
Peter Gabriel - 1982 - Security.m3u
  Playlist created.
Peter Gabriel - 1982 - Security.FLAC.CHECKED.md5
  Digest created.

+ EAC log is signed and uber!

---- ---- ---- ---- ----
24 total files checked
18 flac files
 2 log (EAC) files (2 signed)
 2 m3u files (2 created)
 2 md5 files (2 created)
 0 files with warnings or errors


UberFLAC is also available with a Windows graphical front end. The GUI front end works on only one directory at a time. See UberFLAC over WPF.

UberLAME

Description

UberLAME is an MP3 rip validator which leverages the existing Mediags/UberFLAC codebase. Like UberFLAC, UberLAME has no installer - it is a standalone portable application typically invoked from the command line. To use the program, copy the file uberlame.exe to any directory in the PATH environment variable and then invoke from the command line. To see usage details, invoke with the /help switch.

Let's enforce a sample rip contained within the current directory for the first time. Here is the rip contents before enforcement:

D:\V2>dir /B "Whitney Houston - The Star Spangled Banner"
01 - The Star Spangled Banner.mp3
02 - America da Beautiful.mp3
folder.jpg
The Star Spangled Banner.V2.log


Now let's validate this rip. The first parameter specifies a user ID. The second parameter gives the parent directory - here the current directory:

D:\V2>uberlame /sig:CHECKED .

D:\V2\Whitney Houston - The Star Spangled Banner\
The Star Spangled Banner.V2.log
  CRC-16 checks of 2 MP3s successful.
The Star Spangled Banner.V2.LAME.CHECKED.sha1x
  Digest created.

+ EAC rip is signed and uber!

--- --- --- --- --- --- ---
4 total files checked
1 log (EAC) file
2 mp3 files
1 sha1x file (1 created)
0 files with warnings or errors


All subdirectories of the current directory were validated that contained a file with an extension of either .log or .mp3. In this simple example there was only one subdirectory to validate. Now let's look at the directory contents after validation:

D:\V2>dir /B "Whitney Houston - The Star Spangled Banner"
01 - The Star Spangled Banner.mp3
02 - America da Beautiful.mp3
folder.jpg
The Star Spangled Banner.V2.LAME.CHECKED.sha1x
The Star Spangled Banner.V2.log


The only change is UberLAME has created a file with the extension of .sha1x. The new .sha1x file stores a hash of the EAC log file along with hashes of the audio portions of the MP3s. Subsequent validations require that these hashes are unchanged for success. This file cannot be directly modified without invalidating it.

The log and MP3 files may be renamed if the rip is reenforced afterwards. Metadata such as tags may be altered and does not require revalidation. In this next example, track 2 was renamed and a .m3u playlist added. This example also includes the /g:verbose switch to provide additional detail:

D:\V2>uberlame /sig:CHECKED /g:verbose .
UberLAME v3.6.0

D:\V2\

  No EAC rip found.

D:\V2\Whitney Houston - The Star Spangled Banner\
01 - The Star Spangled Banner.mp3
02 - America the Beautiful.mp3
The Star Spangled Banner.V2.log
  AccurateRip verification confidence 5 (v2).
  CUETools DB verification confidence 8.
  Test/copy CRC-32s match for all tracks.
  CRC-16 checks of 2 MP3s successful.
Tracks.m3u
  Existence checks of 2 files successful.
The Star Spangled Banner.V2.LAME.CHECKED.sha1x
  Track renamed to '02 - America the Beautiful.mp3'.
  SHA-1 checks of log, 2 MP3 audios successful.

+ EAC rip is uber!

--- --- --- --- --- --- ---
5 total files checked
1 log (EAC) file
1 m3u file
2 mp3 files
1 sha1x file
0 files with warnings or errors


This example shows the additional detail provided with the /g:verbose switch including the listing of track names and EAC rip details. The output also shows that the .sha1x file was updated with the new file name and that the contents of the new playlist was validated. If the /sig switch had not been provided, the file renaming would have otherwise caused this validation to fail.

Installation

See the Downloads tab for installation instructions.

Last edited Mar 16 at 8:54 AM by Nongorilla, version 30