-
-
Notifications
You must be signed in to change notification settings - Fork 1
Examples Metadata
Worked preset rules, plus a set of bulk rename recipes at the end. Each rule is written the way the preset editor presents it: scope, IF conditions, THEN operations.
Read Metadata Presets first. Field and token names are catalogued in Metadata Reference.
Remember two things throughout:
- Rules run in order and each sees the previous rules' output. Where order matters below, it is called out.
- Always analyze and read the Simulation detail before applying.
Give every file a container title matching its name.
Description: Container title from filename
Apply to: Container
IF: (no conditions, always true)
THEN: Set container_title = [file_stem]
[file_stem] is the filename without its extension. To strip the extension explicitly instead:
Set container_title = {[file_name]:TrimEnd(4)}
Expect: Bleach - 001 - S01E01.mkv → container title Bleach - 001 - S01E01. Execution stays PropEdit, headers only, seconds per file.
Turn bare or missing titles into something informative.
Description: Lossless audio title
Apply to: Audio
IF: audio_quality Equals lossless
THEN: Set audio_title =
[audio_language] - [audio_format] [audio_channels_label] [audio_bitdepth]bit/[audio_sampling_rate_khz]kHz
Expect: a Japanese FLAC 2.0 16-bit 48 kHz track becomes ja - FLAC 2.0 16bit/48kHz.
audio_quality is derived from the format and compression mode, and reports lossless or lossy when it can be determined. A condition on it matches every format the detector recognises, without listing each codec by name.
Matroska's default flag is meant to be unique, and players behave unpredictably when several tracks claim it. Mark the largest lossless track per language as default and clear the flag on the others.
Description: Default largest lossless audio per language
Apply to: Audio
IF: audio_quality Equals lossless
Track comparison: audio_stream_size Largest in group, group = Same language
THEN: Set exclusive flag audio_default = true, group = Same language
Expect: for each language, one default audio track and no others. This is what Set exclusive flag exists for. A plain Set field would set the flag without clearing it anywhere else, leaving you with two defaults.
Add audio_language Equals ita to the IF if you only want to fix one language.
Description: Forced signs subtitles
Apply to: Subtitles
IF: subtitle_title Contains Signs
THEN: Set subtitle_forced = true
Expect: any subtitle whose title mentions "Signs" is flagged forced, so players show it automatically alongside the original audio.
This depends on the titles already being meaningful. If they are not, recipe 5 sets them first. Put that rule above this one so this rule sees the titles it created.
Two Italian PGS tracks and no useful titles. The full subtitle track is always substantially larger than a signs-and-songs track, so size tells you which is which.
Rule 1, the larger one:
Description: Italian PGS full subtitle
Apply to: Subtitles
IF: subtitle_language Equals ita
subtitle_format Equals PGS
subtitle_stream_size Greater than 1, unit = MB
Track comparison: subtitle_stream_size Largest in group,
group = Same language and format
THEN: Set subtitle_title = ita - Full
Rule 2, the smaller one:
Description: Italian PGS signs subtitle
Apply to: Subtitles
IF: subtitle_language Equals ita
subtitle_format Equals PGS
Track comparison: subtitle_stream_size Smallest in group,
group = Same language and format
THEN: Set subtitle_title = ita - Signs
Expect: the two tracks get distinct, meaningful titles without you knowing any absolute sizes.
The Greater than 1 MB guard on rule 1 matters: with only one Italian PGS track, that track is simultaneously the largest and the smallest in its group, so both rules would fire. The size floor stops a lone signs track being labelled Full. Note the Unit field, 1 with unit MB rather than a raw byte count.
Two Italian audio tracks, one lossless and one a smaller lossy compatibility track you do not want.
Description: Remove smaller Italian lossy duplicate
Apply to: Audio
IF: audio_language Equals ita
audio_quality Equals lossy
Track comparison: audio_stream_size Smallest in group, group = Same language
THEN: Remove track
Expect, and this is the important part, the Execution column changes to MkvMerge. Removing a track cannot be done with mkvpropedit, so the whole file is remuxed: minutes per file instead of seconds, and free disk space required.
Put removal rules last in the preset so earlier rules are not carefully setting metadata on a track that is about to disappear.
Analyze and check the Simulation detail before applying this one. Removed tracks are marked with the rule that removed them, so you can confirm it is taking the track you meant.
Rules are cumulative, which lets you normalise in two passes. Existing titles are inconsistent junk and you want a uniform scheme.
Rule 1:
Description: Clear messy audio titles
Apply to: Audio
IF: audio_title Not empty
THEN: Clear field audio_title
Rule 2:
Description: Rebuild audio titles
Apply to: Audio
IF: audio_format Not empty
THEN: Set audio_title =
{[audio_language]:ToUpper()} - {[audio_format]:NormalizeSpaces()} [audio_channels_label]
Expect: ITA - DTS 5.1, consistently, whatever was there before.
Rule 2 conditions on audio_format rather than audio_title because rule 1 has already emptied the titles, so a title-based condition would never match. See rule order.
Prefix a title while preserving what it originally said, even if an earlier rule has already changed it.
Description: Prefix original audio title
Apply to: Audio
IF: audio_language Equals ita
THEN: Set audio_title = ITA - [original.audio_title]
[original.audio_title] reads the value from before any rule ran. Plain [audio_title] would read the current pipeline value, which may already have been rewritten upstream.
Description: Tag encoder
Apply to: Container
IF: (no conditions)
THEN: Set tag ENCODER on File = RemuxForge
Expect: a container-level ENCODER tag on every file.
ENCODER is an advanced tag, so turn on the Advanced fields toggle in the rule to see it in the dropdown. It is also container-only. It cannot be written on an individual track.
Description: Clear managed subtitle tags
Apply to: Subtitles
IF: subtitle_language Equals ita
THEN: Clear managed tags on Current track
[X] Confirm tag clearing
The confirmation toggle is mandatory. Without it, validation refuses to save with ClearTags requires explicit confirmation. Clearing tags removes data that cannot be recovered from the file, so the confirmation is required.
Statistics tags (bitrate, duration, frame count per track) go stale after any remux. Two operations handle them:
Description: Refresh track statistics
Apply to: Audio
IF: (no conditions)
THEN: Add/update statistics
Description: Strip track statistics
Apply to: Audio
IF: (no conditions)
THEN: Delete statistics
Expect: refreshing recalculates the tags from the file's real content; deleting removes them. Refresh after remuxing elsewhere; delete if you prefer clean files or want to shrink the header.
Files with und tracks confuse players and media servers.
Description: Undefined audio is Japanese
Apply to: Audio
IF: OR alternatives:
audio_language Equals und
audio_language Is empty
THEN: Set audio_language = jpn
Expect: untagged tracks become jpn.
Apply this only where the language is known, for example a folder of Japanese-audio releases. RemuxForge cannot detect a spoken language, so the rule writes whatever value it is given.
The OR alternatives group is needed because und and an outright empty value are two different states and either can occur.
Set the IETF field too if your player uses it:
THEN: Set audio_language = jpn
Set audio_language_ietf = ja
Set the title ita - Full when either the existing title already says so, or the track is large enough that it must be the full one.
Description: Normalize Italian full subtitle title
Apply to: Subtitles
IF: subtitle_language Equals ita
OR alternatives:
subtitle_title Contains Full
subtitle_stream_size Greater than 5, unit = MB
THEN: Set subtitle_title = ita - Full
Expect: one rule covers both the already-labelled and the unlabelled case. The outer list is an AND, so the language condition still has to hold.
MediaInfo often reports track languages as two-letter codes, but the Matroska LANGUAGE tag must be ISO 639-2.
Description: Language tag from track language
Apply to: Audio
IF: audio_language Not empty
THEN: Set tag LANGUAGE on Current track =
{[audio_language]:ToLower():Replace("en","eng"):Replace("it","ita"):Replace("ja","jpn")}
Expect: it → ita, ja → jpn.
Extend the chain with the languages present in the library. If the values are already three-letter codes, use {[audio_language]:ToLower()} on its own.
These use Bulk Rename (F11 in Metadata mode after a scan), not preset rules. Methods stack, and each operates on what the previous one produced.
[SubGroup] Bleach - 366 [1080p][x265].mkv → Bleach - 366.mkv
| # | Method | Settings |
|---|---|---|
| 1 | Remove | Mode By pattern, Pattern \[[^\]]*\], Use regex on |
| 2 | Trim | Chars -_, Location Both, Scope Name only
|
Step 1 deletes every bracketed group; step 2 cleans up the separators left behind at the ends.
Bleach.S12E08.1080p.BluRay.mkv → Bleach S12E08 1080p BluRay.mkv
| # | Method | Settings |
|---|---|---|
| 1 | Replace | Search \.(?=.*\.), Replace , Use regex on |
The lookahead is the trick: Replace works on the whole filename including the extension, so a naive . → would also eat the dot before mkv. \.(?=.*\.) only matches dots that have another dot after them, leaving the extension separator alone.
Four files that should be episodes 214–217.
| # | Method | Settings |
|---|---|---|
| 1 | New Name | Pattern Bleach.S12E<Inc:214:1:3>.<Ext>
|
<Inc:start:step:pad>, starting at 214, step 1, padded to 3 digits. Numbering follows the scanned list order, so check the preview before renaming; if the order is wrong, the numbers will be too.
BLEACH.S12E08.MKV → Bleach.S12e08.mkv
| # | Method | Settings |
|---|---|---|
| 1 | New Case | Mode Title Case, Scope Name only
|
| 2 | New Case | Mode lowercase, Scope Extension only
|
Title Case lowercases the value first, then capitalises each word, so all-caps names are normalised rather than left unchanged.
366.mkv → Bleach - 366.mkv
| # | Method | Settings |
|---|---|---|
| 1 | Add | Text Bleach - , Position 0
|
Add works on the name only, so the extension is untouched.
Remux mode compares episode IDs as strings, so S12E8 and S12E08 do not pair. Normalise one side:
| # | Method | Settings |
|---|---|---|
| 1 | Replace | Search E(\d)(?!\d), Replace E0$1, Use regex on |
E followed by exactly one digit becomes E0<digit>. See Remux Mode.
Bleach - 366 - WEBRip.mkv → Bleach - 366.mkv
| # | Method | Settings |
|---|---|---|
| 1 | Remove | Mode By pattern, Pattern - WEBRip, Use regex off |
For a fixed number of characters instead, use Mode By position with From end on.
- Metadata Presets: the editor and the rule model
- Metadata Reference: every field, token, operator and function
- Metadata Mode: analysing and applying
- Bulk Rename: every rename method in detail