Skip to content

feat(wallpaper): ship original looping movie for Hidamari - #1207

Merged
castrojo merged 3 commits into
projectbluefin:mainfrom
mendezr:feat/hidamari-wallpaper-video
Sep 27, 2026
Merged

castrojo merged 3 commits into
projectbluefin:mainfrom
mendezr:feat/hidamari-wallpaper-video

Conversation

@mendezr

@mendezr mendezr commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

bluefin-common PR

What does this change?

Ships the Bluefin looping movie for the Hidamari video-wallpaper engine (io.github.jeffshee.Hidamari), tracked by #1158:

  • system_files/bluefin/usr/share/backgrounds/bluefin/bluefin-hidamari.webm — 1920x1080, 12 s, 24 fps VP9 (yuv420p, no audio) seamless loop, 360 KiB.
  • scripts/render-hidamari-movie.py — the deterministic generator that produced it. Needs numpy + an ffmpeg with libvpx-vp9 (honors FFMPEG=; a static build works). --preview-frame T renders a single PNG for quick review. Every temporal term (waves, rays, bubbles, breathing) is an integer number of cycles per loop, so frame(t=1) == frame(t=0) and the loop wraps invisibly.
  • tests/test_render_hidamari_movie.py (25 tests) — pins the loop-wrap invariant, render determinism, palette properties, the < 4 MiB size budget, and ffmpeg CLI wiring; registered in just test and the Unit Tests workflow.
  • docs/skills/hidamari-wallpaper.md — skill doc with the regeneration recipe and invariants, plus regenerated index.json/index.md and a docs/SKILL.md task-table row.

Why an original render?

The issue suggested sourcing Wallpaper Engine workshop item 3770275543 ("Bluefin 5th Anniversary Wallpaper"), but that item carries no redistribution license, so it cannot be vendored into the OCI layer (also flagged in a prior comment on the issue). The shipped animation is fully original — layered deep-ocean gradient waves with rising glow specks in the Bluefin blue/teal palette — keeping the asset reproducible from source under our control.

Why check the video into git?

A render-time fetch would add a network dependency to the build for a 360 KiB asset that changes rarely; checked-in binaries are already part of this repo's pattern (vendored artwork, JXL wallpapers). The generator is checked in alongside it so the asset is auditable and rebuildable, and the skill doc records the exact recipe.

Out of scope here

The Hidamari flatpak itself lands via the video-wallpaper.Brewfile ChairLift bundle (#1159), and the Damask work is #1160/#1161 — this PR ships only the movie asset, its generator, and its tests.

Testing done

  • python3 -m pytest tests/test_render_hidamari_movie.py — 25 passed
  • just check, pre-commit run --all-files — all green
  • ffprobe: duration exactly 12.000 s, 1920x1080 VP9; ffmpeg -v error -i ... -f null - decodes clean
  • Wrap-seam check on decoded frames: first-vs-last mean abs diff 0.45/255 (film grain only)

Refs #1158 (not closing: copying the movie into ~/Videos/Hidamari so the Flatpak can reach it is still open)

— hive: backend=pi model=openrouter/z-ai/glm-5.3-flash

🐝 Hive Agent: contributor | SHA: 8f87ce1

@castrojo
castrojo force-pushed the feat/hidamari-wallpaper-video branch from 8f87ce1 to 0a16485 Compare September 25, 2026 03:00
@castrojo

Copy link
Copy Markdown
Contributor

Rebased onto current main (resolving tremor-runtime Homebrew validation failure), fixed end-of-file newline in scripts/render-hidamari-movie.py to pass pre-commit / Validate PR, and added numpy to test dependencies in .github/workflows/unit-tests.yml to satisfy tests/test_render_hidamari_movie.py.

@castrojo
castrojo enabled auto-merge September 25, 2026 03:02
castrojo
castrojo previously approved these changes Sep 25, 2026
@Danathar

Copy link
Copy Markdown
Contributor

The movie itself checks out. On 0a16485:

Check Result
ffprobe VP9, 1920x1080, 24 fps, 288 frames, 12.000 s, no audio, 360,063 bytes
ffmpeg -v error -i ... -f null - decodes clean
Shipped frames 0 and 144 vs the script's --preview-frame 0 and 0.5 PSNR 44.1 dB and 43.6 dB. A mismatched pair scores 30.3 dB, so the file really does come from this script
pytest tests/test_render_hidamari_movie.py locally 25 passed. CI skips the two that need ffmpeg and Pillow

The problem: Hidamari can't open the file where it gets installed. The Flathub build of Hidamari only has --filesystem=xdg-videos/Hidamari:create, and its "Local Video" list only reads ~/Videos/Hidamari (VIDEO_WALLPAPER_DIR in hidamari/commons.py). Flatpak also never shares /usr paths with apps (it prints Path "/usr" is reserved by Flatpak). So Hidamari can't see /usr/share/backgrounds/bluefin/bluefin-hidamari.webm, and nothing in this PR or in #1185, #1186 or #1187 copies it into ~/Videos/Hidamari. Someone who installs Hidamari from the new ChairLift bundle won't find the Bluefin movie.

You could close the gap with a small step that copies it into ~/Videos/Hidamari (for example a user-setup hook), or with a line in the docs telling people to copy it. If that belongs in a follow-up, I'd rather this PR didn't close #1158 yet.

Some small fixes while you're in there:

  • The script's default is crf=34, but the shipped file was made at crf 24, which is what hidamari-wallpaper.md says. Running the script with no arguments gives a 110,106-byte file. --crf 24 gives 360,075 bytes, almost exactly the shipped 360,063. So the documented "regenerate" command doesn't reproduce the asset. Changing the Config.crf default (and the docstring) to 24 would fix it.
  • hidamari-wallpaper.md says the same script version "always produces a byte-identical render". That only holds with the same ffmpeg and libvpx: my crf 24 render (ffmpeg 8.1.2) is not identical to the shipped file (made with Lavf 61.1.100), and is 12 bytes bigger. Maybe "the same script and ffmpeg version".
  • It also says the tests pin "VP9, 288 frames". They only check the first four bytes of the file (the EBML magic) and its size.
  • The "bundle-file conventions" pointer goes to docs/skills/bazaar.md. Those conventions live in docs/skills/brew-lifecycle/.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generator and tests are well built (loop invariant, determinism, size budget). However, the Hidamari Flatpak only has --filesystem=xdg-videos/Hidamari:create, so /usr/share/backgrounds/bluefin/bluefin-hidamari.webm isn't visible to it, and nothing points Hidamari at the file. As shipped, the asset is unused. It needs a first-run copy/symlink into ~/Videos/Hidamari, a Flatpak override, or to wait until the wiring from #1185 lands. There's also a textual conflict with #1249 in unit-tests.yml, and this adds numpy to the unit-test CI deps.

@castrojo

Copy link
Copy Markdown
Contributor

Status update on Hidamari video wallpaper:
Review findings from @hanthor and @Danathar:

  1. Sandboxing / Accessibility: Hidamari flatpak has --filesystem=xdg-videos/Hidamari:create and reads from ~/Videos/Hidamari. Because Flatpak does not allow sharing /usr paths, Hidamari cannot read /usr/share/backgrounds/bluefin/bluefin-hidamari.webm directly without a copy/symlink or first-run hook into ~/Videos/Hidamari.
  2. Generator default: scripts/render-hidamari-movie.py defaults to crf=34 in the script args, but the shipped file and doc specify crf=24 (~360KB). The Config default should be aligned to 24 so re-running the script regenerates the asset byte-for-byte.
  3. Doc updates: reference to bundle conventions belongs in docs/skills/brew-lifecycle/ rather than bazaar.md.

Awaiting author updates for file visibility and generator default.

@castrojo

Copy link
Copy Markdown
Contributor

@Danathar @hanthor Pushed commit c4f2b06 aligning the scripts/render-hidamari-movie.py Config.crf default to 24 (matching the 360KB shipped file), qualifying the ffmpeg/libvpx version dependency in hidamari-wallpaper.md, and fixing the bundle doc pointer to docs/skills/brew-lifecycle/.

@castrojo
castrojo force-pushed the feat/hidamari-wallpaper-video branch from c4f2b06 to dae994e Compare September 26, 2026 20:21
@castrojo
castrojo dismissed their stale review September 26, 2026 20:46

Dismissing prior approval: The branch was rebased to dae994e and updated with default crf 24 and corrected doc claims; an independent re-review is needed at current head.

mendezr and others added 3 commits September 26, 2026 17:08
Adds the Bluefin video-wallpaper movie for Hidamari
(io.github.jeffshee.Hidamari), tracked by projectbluefin#1158:

- `system_files/bluefin/usr/share/backgrounds/bluefin/bluefin-hidamari.webm`
  — 1920x1080, 12 s, 24 fps VP9 loop, 360 KiB, no audio.
- `scripts/render-hidamari-movie.py` — the deterministic generator that
  produced it (numpy + an ffmpeg with libvpx-vp9; FFMPEG env var
  supported). Every temporal term is an integer number of cycles per
  loop, so the wrap is seamless by construction.
- `tests/test_render_hidamari_movie.py` — pins the loop-wrap invariant,
  determinism, palette shape, size budget (< 4 MiB), and ffmpeg wiring;
  registered in `just test` and the unit-tests workflow.
- Skill doc `docs/skills/hidamari-wallpaper.md` + regenerated skill
  index and docs/SKILL.md task-table row.

The issue's suggested source (Wallpaper Engine workshop item 3770275543)
carries no redistribution license, so it cannot be vendored into the OCI
layer. The animation is fully original (layered deep-ocean gradient waves
with rising glow specks in the Bluefin palette), keeping the asset
reproducible from source. If a licensed render is donated later, the
skill doc records how to swap it.

Closes projectbluefin#1158

Hive-Run: projectbluefin#1158
Hive-Plan: Make a movie for Hidamari (issue projectbluefin#1158 summary)
Hive-Spec: hidamari-wallpaper#seamless-loop
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@castrojo
castrojo force-pushed the feat/hidamari-wallpaper-video branch from dae994e to 0ede1e3 Compare September 26, 2026 21:08

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at head 0ede1e3: clean rebase over main resolving skill index conflicts; render script default tuned to crf 24; all test suites pass (test 1m38s, validate 5m20s, both multi-arch image builds pass).

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at head 0ede1e3: clean rebase over main resolving skill index conflicts; render script default tuned to crf 24; all CI checks pass (test 1m38s, validate 5m20s, both multi-arch image builds pass: aarch64 2m12s, x86_64 7m13s).

@Danathar

Copy link
Copy Markdown
Contributor

Re-checked at 0ede1e3. The webm and the test file are byte-identical to 0a16485, so my earlier checks on the movie still hold.

  • crf default: fixed. Config.crf = 24 and the usage docstring say 24 now.
  • "byte-identical render" wording: fixed. Now "same script and ffmpeg/libvpx version".
  • "VP9, 288 frames" test claim: fixed. Now "EBML magic and size budget".
  • Bundle-conventions pointer: fixed. Points at docs/skills/brew-lifecycle/.
  • Hidamari can't reach the file: not fixed. Nothing in the diff copies or links /usr/share/backgrounds/bluefin/bluefin-hidamari.webm into ~/Videos/Hidamari, no doc line tells people to, and the PR still carries Closes #1158. As shipped the movie is unreachable from the Flatpak, so I'm holding my approval on this one point: either add the copy step (a user-setup hook would do) or drop the Closes so Make a movie for Hidamari #1158 stays open for the wiring.

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status at head 0ede1e3. Danathar's last open point (Hidamari can't reach the movie) offered two fixes: add a copy step, or drop Closes #1158. I took the second one. The PR body now says Refs #1158, and GitHub no longer lists #1158 as a closing issue, so #1158 stays open for the ~/Videos/Hidamari wiring. The other four points (crf default, byte-identical wording, test claim, bundle-conventions pointer) were already confirmed fixed at 0ede1e3.

Approval status: common main needs 2 approvals. castrojo pushed dd60a41 and 0ede1e3 to this branch, so castrojo's approvals are not independent and don't count. That leaves 0 independent approvals, and this PR needs 2 from reviewers who are not castrojo or the author. @Danathar, please re-review now that the Closes is gone.

@castrojo
castrojo requested a review from Danathar September 27, 2026 00:28

@Danathar Danathar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked at 0ede1e3, the same head as my last pass. The one point I held on is resolved: the body now says Refs #1158, GitHub lists no closing issues, and #1158 is still open for the ~/Videos/Hidamari wiring.

Checked: the doc and workflow diff read at 0ede1e3; a local merge with current main (a9ec454) is clean; generate_skill_index.py --check is up to date (45 skills); pytest tests/test_render_hidamari_movie.py tests/test_skill_docs.py gives 39 passed, with ffmpeg and Pillow present. CI on 0ede1e3: test, both validate jobs, both image builds, Compose PR test image and Trivy pass; E2E and the manifest job were skipped.

@castrojo
castrojo added this pull request to the merge queue Sep 27, 2026
Merged via the queue into projectbluefin:main with commit d2eb9dd Sep 27, 2026
10 checks passed
castrojo pushed a commit to kylerankin/common that referenced this pull request Oct 1, 2026
## What does this change?

Adds a README-linked Hidamari setup guide explaining how to copy the
shipped Bluefin movie into the user's XDG Videos/Hidamari folder and
select it in Local Video. The command respects localized paths and asks
before replacing an existing file. Updates the maintainer skill with the
same sandbox constraint.

## Why?

PR projectbluefin#1207 shipped the movie but deliberately left projectbluefin#1158 open because
Hidamari cannot discover the system copy. Its review explicitly offered
documented copy instructions as a resolution. This supplies that manual
setup path, including troubleshooting and removal instructions.

Closes projectbluefin#1158.

## Validation

- `just check` passed.
- `pre-commit run --all-files` passed, including the new guide.
- Executed the documented copy snippet with the repository movie as its
source and a temporary localized Videos path containing spaces; verified
byte-for-byte copying and that declining replacement preserves existing
contents.
- Checked the Flathub manifest's `xdg-videos/Hidamari:create`
permission.
- Hidamari GUI playback was not tested in this environment. This is
documentation only; no automatic first-run behavior is added.

## Checklist

- [x] Conventional Commits title
- [x] Local lint and pre-commit checks pass
- [x] Relevant skill updated and internal links validated
- [ ] CI results pending after PR creation

— hive: backend=codex model=gpt-6-astra effort=medium

---
🐝 **Hive Agent**: `contributor` | **SHA:** `6364878`

Signed-off-by: arteeh <arteeh@users.noreply.github.com>
Co-authored-by: arteeh <arteeh@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dtg01100 pushed a commit to dtg01100/common that referenced this pull request Oct 3, 2026
## What does this change?

Adds a README-linked Hidamari setup guide explaining how to copy the
shipped Bluefin movie into the user's XDG Videos/Hidamari folder and
select it in Local Video. The command respects localized paths and asks
before replacing an existing file. Updates the maintainer skill with the
same sandbox constraint.

## Why?

PR projectbluefin#1207 shipped the movie but deliberately left projectbluefin#1158 open because
Hidamari cannot discover the system copy. Its review explicitly offered
documented copy instructions as a resolution. This supplies that manual
setup path, including troubleshooting and removal instructions.

Closes projectbluefin#1158.

## Validation

- `just check` passed.
- `pre-commit run --all-files` passed, including the new guide.
- Executed the documented copy snippet with the repository movie as its
source and a temporary localized Videos path containing spaces; verified
byte-for-byte copying and that declining replacement preserves existing
contents.
- Checked the Flathub manifest's `xdg-videos/Hidamari:create`
permission.
- Hidamari GUI playback was not tested in this environment. This is
documentation only; no automatic first-run behavior is added.

## Checklist

- [x] Conventional Commits title
- [x] Local lint and pre-commit checks pass
- [x] Relevant skill updated and internal links validated
- [ ] CI results pending after PR creation

— hive: backend=codex model=gpt-6-astra effort=medium

---
🐝 **Hive Agent**: `contributor` | **SHA:** `6364878`

Signed-off-by: arteeh <arteeh@users.noreply.github.com>
Co-authored-by: arteeh <arteeh@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

4 participants