Skip to content

Read CRI USM game videos (.usm) (#485) - #508

Merged
KnifeLemon merged 3 commits into
KnifeLemon:mainfrom
cre8ive-marketing:feature/485-usm
Oct 24, 2026
Merged

KnifeLemon merged 3 commits into
KnifeLemon:mainfrom
cre8ive-marketing:feature/485-usm

Conversation

@cre8ive-marketing

Copy link
Copy Markdown
Collaborator

Fixes #485.

@KnifeLemon, could you review this for merging into main? If you had already started on it, feel free to close this one.

What it does

.usm (CRI Middleware's video container, used for many games' cutscenes) becomes a read-only video source, like WTV, RM or CAVS:

  • FormatRegistry: usm, category Video, Writable: false.
  • It shows up on the video donut and goes to MP4 and every other video and audio target through FFmpeg, which Filee bundles (9.0.2 has the usm demuxer: ffmpeg -demuxers lists usm CRI USM).
  • It's never a target, so there's no USM writer.
  • Encrypted USM files (common in recent games) can't be read, and fail with FFmpeg's error. docs/ENGINES.md says so.

Settings

v43 (CurrentSchemaVersion = 43): existing libraries learn .usm on the video donut with LearnExtensions, as .dst (v38) and .ps1 (v39) did, and custom claims stay put. Your #505 (FITS) may also need a settings step, so the two numbers may need sorting out depending on which merges first.

Tests

  • UsmFormatTests (Core):
    • .USM is detected as a read-only video and picks the video donut.
    • A version 42 library learns usm once.
  • MediaTests: usm → mp4 is one FFmpeg step, and nothing routes to USM.
  • dotnet format --verify-no-changes is clean.
  • Full dotnet test: Core 543, Platform 79, CLI 27, Setup 149, Engines 1711 and App 986 pass, none fail.

Not checked: a real .usm conversion. I don't have a sample file, and FFmpeg has no USM muxer to make one. If the reporter can share an unencrypted clip, an end-to-end test could be added.

USM is CRI Middleware's container for game cutscenes. The bundled FFmpeg
(9.0.2) has its usm demuxer, so .usm is a read-only video source like
the other read-only containers: on the video donut, to MP4 and every
other video and audio target. Encrypted USM files fail with FFmpeg's
error.

Settings v43: existing libraries learn .usm on the video donut, custom
claims stay put.
@cre8ive-marketing cre8ive-marketing mentioned this pull request Oct 23, 2026
1 task done
KnifeLemon#505 (FITS) took settings schema 43, so the USM step is v44
(CurrentSchemaVersion = 44), after the FITS one; its test upgrades a
version 43 library.
@cre8ive-marketing

Copy link
Copy Markdown
Collaborator Author

Merged main. #505 (FITS) took settings schema 43, so the USM step is now v44 (CurrentSchemaVersion = 44), right after FITS, and its test upgrades a version 43 library. Core (549) and the media / FITS / route engine tests (222) pass. The earlier Linux CI failure was the new route test running where FFmpeg isn't installed; it now skips there like the other media tests (8fd7da9).

@KnifeLemon
KnifeLemon merged commit c7227a0 into KnifeLemon:main Oct 24, 2026
8 checks passed
KnifeLemon added a commit to flexeykinDev/Filee that referenced this pull request Oct 24, 2026
The USM video format (KnifeLemon#508) takes schema 44 and goes into main first, so
the clip tool's migration moves to 45.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon added a commit to flexeykinDev/Filee that referenced this pull request Oct 24, 2026
USM (KnifeLemon#508) is schema 44 on main; Cut a clip stays at 45, after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format request: .usm

2 participants