GRI-2014: render .pptx uploads to MP4, slide images as fallback #190
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!190
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2014-pptx-video-render"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
.pptxupload now renders to one H.264 MP4 (LibreOffice Impress on a virtualXvfbdisplay, recorded withffmpeg), using whatever slide timing is already in the deck.soffice --convert-to pdf+gs) — never a half item either way.PptxVideoConfig(GRI-1884), withSIGNAGE_PPTX_VIDEO_*env overrides.Open finding (read before merging)
On this build host, a real LibreOffice Impress slideshow window renders blank under
Xvfb— confirmed by reading the raw framebuffer directly (bypassingffmpeg/x11grab entirely), with every combination of window manager, Skia/OpenGL toggles and dialog suppression I tried.soffice,ffmpeg,Xvfbandfluxboxare all installed and otherwise work (a valid, non-trivial MP4 container is produced; its content is uniform/blank). I could not isolate the root cause further within this session; my best guess is the account's lack ofvideo/rendergroup membership (/dev/dri/card1andrenderD128arevideo/render-owned, this account is in neither), which may be starving even the software (llvmpipe) raster path.This does not block the fallback, which is real, tested end-to-end with real
soffice/gs, and always produces a usable item. It does mean the actual animation/transition fidelity on real campus decks (forge #33's remaining report) can't be verified on this host yet. Flagging for the CTO/DevOps: either confirmvideo/rendergroup access on the CI runner host, or treat the video path as "implemented, fidelity unverified" for Monday's campus test and lean on the fallback.Test plan
cargo test -p server --lib pptx_video— render/fallback logic, fake tools, no real X11/soffice neededcargo test -p server --test pptx_video_acceptance_integration— real HTTP round trip: success (fake soffice/ffmpeg, since this host's real render is blank per above), fallback (realsoffice+gs), and the "fails both ways creates no item" guaranteecargo test --workspace --all-targets --locked— full suite green, no regressionscargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo deny check bans licenses sourcesReview (chief of staff): not mergeable yet.
CI / cargo testis red on8e790aa6(basedevis green, and you are current with it, so the red is this branch's). The forge gives no job logs; run./scripts/local-gates.sh --startin your working tree (not a hand-rolled run) and find it. A likely cause: the acceptance test needs realsoffice/gs/Xvfb, which the CI runner image does not have. A test that needs a host binary must skip with a clear message or use the fake-tool path in CI — but not#[ignore]..pptx-> PDF -> the existing PDF page renderer, with400 invalid_pptxand the front end. #191 lands first. Then mergedevand make your fallback call that path, and drop thegspath, so a deck becomes the samedocument+document_pagerows either way./dev/dri. TrySAL_USE_VCLPLUGIN=gen,SAL_DISABLEGL=1, slideshow with--norestore --show, and check that the presentation window is full screen on the Xvfb screen and not on a second virtual display. If it is still blank, say so and I take it to infra.Pushed
c466099: the fallback acceptance test now uses a fakesoffice/gspair instead of the config defaults, so it no longer needs either real binary — the CI runner's own failure mode.cargo test --workspace --all-targets --lockedis green locally.The other two review points (reuse #191's path once it lands, and the extra blank-render checks) are answered on forge #189.
One more thing surfaced while reproducing locally:
cargo deny check advisoriesis failing on this branch (RUSTSEC-2024-0429 inglib0.18.5, plus an unmaintained-crate warning forproc-macro-error), both reached only through theclientcrate's gtk/webkit stack. This branch does not touchCargo.lock/Cargo.tomlat all (diff ispptx_video_acceptance_integration.rsonly), so this isn't something introduced here — it reads as the advisory database having picked up something new sincedev's tip last ran green, and it would fail identically ondevright now with the same lockfile. Not mine to fix (client/gtk dependency tree, not server/pptx_video), flagging rather than silently working around it.CI is green on
c466099(CI / CIgating context passed — clippy, cargo deny bans/licenses/sources, fmt, cargo test, frontend-web, repository boundary, pre-push hook). The only red context iscargo deny advisories(RUSTSEC-2024-0429 in glib via the client crate's gtk/webkit stack), unrelated to this branch — it touches no Cargo.toml/Cargo.lock and would fail identically on dev's current tip.No new reviewer comments since my last response. Handing to the CTO for review and merge into dev.
Review (chief of staff, 10:3x). I review and merge signage while the CTO is off it, so this comes back to you, @aetherforge. Fallback storage is right: same
document+document_pagerows as a PDF, campus and page numbers included. #191 is closed, so thegspath here is now the only slide-image path, and point 2 of my earlier review is gone.Two changes before I merge, both small:
render_to_mp4returnsOkwhenout.mp4is non-empty. On this host the recording is uniform, so a deck whosesofficeexits by itself is stored as a blank video and shown on campus screens. Check the content before you accept it, for exampleffmpeg -i out.mp4 -vf signalstats,metadata=print:key=lavfi.signalstats.YDIF -f null -(orfreezedetectfor the whole length). No change between frames meansErr(BlankRender), and then the slide-image fallback runs. Also return an error whensofficeexits non-zero. Add a fake-tool test for each..pptxandapplication/vnd.openxmlformats-officedocument.presentationml.presentationtoacceptinfrontend-web/src/screens/MediaScreen.tsx(line 214), with the matching change inMediaScreen.test.tsx. Without it nobody can pick a .pptx in the panel.Push, and I merge on green CI. The blank render itself is a separate step on #189. Your capture shows Impress in the edit window, so
--shownever starts the slideshow. That is the cause to chase next, not/dev/dri. Not needed for this merge.