Skip to content

Added knowledge bases and explainers for containers and metadata tags - #12

Merged
CodyCBakerPhD merged 7 commits into
mainfrom
claude/metadata-tags-copyright-0ty2em
Aug 10, 2026
Merged

CodyCBakerPhD merged 7 commits into
mainfrom
claude/metadata-tags-copyright-0ty2em

Conversation

@CodyCBakerPhD

Copy link
Copy Markdown
Member

Added comprehensive knowledge bases that turn cryptic container and metadata tag names into readable, educational explainers shown in the Inspect tab.

Key changes:

  • Created metadataTagKb.ts with a knowledge base covering 70+ metadata tags across MP4/QuickTime, ID3v2, Vorbis/Matroska, and RIFF formats, plus mediabunny's normalized field names. Includes case-insensitive fallback matching for container formats that vary capitalization.
  • Created containerKb.ts documenting 10 container formats (MP4, QuickTime, Matroska, WebM, Ogg, MP3, WAVE, FLAC, ADTS, MPEG-TS) with their extensions, supported codecs, and playback compatibility notes.
  • Added infoIcon() DOM helper that renders an ⓘ button with a popover explainer. Popovers auto-position to stay on-screen, close on Escape or outside click, and support keyboard focus and touch interaction.
  • Enhanced gridItem() to optionally display an info button next to field labels, with support for raw (case-sensitive) tag name styling.
  • Updated Inspect tab to use the new knowledge bases, replacing the generic "Format" label with "Container" and adding explainers to bitrate fields.
  • Renamed "Encode Test" tab to "Compare Quality" throughout the codebase for clarity.
  • Added appUrl.ts module for managing shareable state in the query string (tab and src parameters), with URL validation and history management.
  • Added comprehensive unit tests for DOM utilities, metadata tag lookup, container descriptions, and URL parameter handling.
  • Updated styling to support themed links, info popovers, and raw tag name display.

The knowledge bases are author-authored and trusted; they explain why ©too is the encoding tool (not a typo), what the container-vs-codec distinction means, and which codecs each format can carry.

https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN

Inspect's "Format" is now "Container", with an ⓘ explainer covering the
container-vs-codec distinction and, per container, which codecs it can
carry. The bitrate fields explain themselves too, including why the
Overview's is "overall" (whole file, every track plus container overhead).

Metadata tags get a knowledge base of MP4/QuickTime atoms, ID3v2 frames,
Vorbis comments and RIFF INFO chunks, so a tag shows a readable label with
its raw name and meaning behind an ⓘ. That answers what ©too is (the
encoding tool; the leading © is byte 0xA9, QuickTime's text-atom marker),
and recognizable encoder signatures such as Lavf60.16.100 are decoded too.

Also: every tab now has a URL (?tab=…), restored on load and navigable with
back/forward, and a video loaded from a remote URL is recorded as ?src=…
and re-opened automatically, so a link carries both the file and the tab.
The CLI card opens with a plain-language description of re-encoding,
transcoding and remuxing, the GOP explainer moved under its heading to
match the Atom Map tab, "Encode Test" is now "Compare Quality", and links
use the theme accent instead of the browser default blue, which was
unreadable in dark mode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
@chromatic-com

chromatic-com Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: encoding-helper-storybook: 2 changes accepted as baselines
🟢 UI Review: encoding-helper-storybook: Approved by Cody Baker
Storybook icon Storybook Publish: encoding-helper-storybook: 5 stories published

@chromatic-com

chromatic-com Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: encoding-helper-playwright: 1 change accepted as baseline
🟢 UI Review: encoding-helper-playwright: Approved by Cody Baker
Storybook icon Test suite publish: encoding-helper-playwright: 2 tests published

@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://brain-bbqs.github.io/encoding-helper/pr-preview/pr-12/

Built to branch gh-pages at 2026-08-10 18:57 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@CodyCBakerPhD CodyCBakerPhD self-assigned this Aug 10, 2026
@CodyCBakerPhD
CodyCBakerPhD marked this pull request as ready for review August 10, 2026 05:20
Fixes the lint failure on the first commit (an unnecessary `??` on a
regex capture; the version groups now always participate in the match).

The Inspect tab's first card is "Video Container Overview", with the
container explainer as a description under the heading instead of an ⓘ
popover, and the field itself relabelled "Type". The GOP explainer breaks
its I/P/B-frame definitions into bullets and links the sleap-io note to
the sio reencode CLI reference. "CLI Command Builder" is now "FFmpeg
Command Builder", links to ffmpeg's install page, and says why running
ffmpeg natively beats the in-browser engines for real work.

The in-browser engines move out of that tab into their own "Re-encode
In-Browser" tab, to the right of Compare Quality. Both already encoded the
whole video and saved it wherever you chose; the new tab states that up
front. Their descriptions were also being inserted as text rather than
markup, so "&mdash;" was showing literally.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
@codecov-commenter

codecov-commenter commented Aug 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.90323% with 154 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ui/reencodeTab.ts 0.00% 83 Missing ⚠️
src/ui/inspectTab.ts 0.00% 25 Missing ⚠️
src/ui/tabs.ts 0.00% 14 Missing ⚠️
src/ui/reportTab.ts 0.00% 9 Missing ⚠️
src/ui/fileLoading.ts 0.00% 6 Missing ⚠️
src/lib/metadataTagKb.ts 84.84% 2 Missing and 3 partials ⚠️
src/ui/seekTab.ts 0.00% 5 Missing ⚠️
src/lib/dom.ts 95.34% 1 Missing and 1 partial ⚠️
src/ui/encodeTab.ts 0.00% 2 Missing ⚠️
src/lib/appUrl.ts 95.45% 1 Missing ⚠️
... and 2 more
Files with missing lines Coverage Δ
src/lib/codecKb.ts 46.51% <ø> (ø)
src/lib/containerKb.ts 100.00% <100.00%> (ø)
src/lib/state.ts 0.00% <ø> (ø)
src/ui/cliControls.ts 0.00% <ø> (ø)
src/ui/elements.ts 0.00% <ø> (ø)
src/lib/appUrl.ts 95.45% <95.45%> (ø)
src/ui/compareTab.ts 0.00% <0.00%> (ø)
src/ui/formControls.ts 0.00% <0.00%> (ø)
src/lib/dom.ts 66.66% <95.34%> (+66.66%) ⬆️
src/ui/encodeTab.ts 0.00% <0.00%> (ø)
... and 7 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

claude added 4 commits August 10, 2026 18:50
Names it a "video container" on first mention, says "compression method"
rather than "compression", and splits the codec clause into its own
sentence.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
Adds (.mov) and (.mkv) after the MOV and Matroska mentions, and drops the
inline `ffmpeg -c copy` aside.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
The Video Container Overview card now carries only the general
container-vs-codec explanation. What this particular file's container is,
which codecs it can carry, and where it plays moved into a card titled
"This File's Container: <name>", so it reads as file-specific and its
heading changes when another file is loaded.

Also drops the "lossless" framing from the rewrap sentence, which invited
confusion with lossless compression, drops the legality framing for which
codecs a container takes, and switches the remaining "re-encode" spellings
to "reencode" to match the rest of the copy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
The codec explainers were the worst of it ("H.264 / AVC (2003) — Advanced
Video Coding. The most widely supported video codec in existence — nearly
every browser..."), but they ran through the container, chroma, faststart
and report text too, plus a few control labels. Rewrote each into a colon,
comma, semicolon or parenthetical.

Empty table cells now use the same "–" the metadata grid already used for
a missing value, instead of an em-dash.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
@CodyCBakerPhD
CodyCBakerPhD merged commit 447fc41 into main Aug 10, 2026
16 checks passed
@CodyCBakerPhD
CodyCBakerPhD deleted the claude/metadata-tags-copyright-0ty2em branch August 10, 2026 19:07
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.

3 participants