Skip to content

Remove broken YouTube capture, add proxy server plan#7

Merged
farkasmark merged 23 commits intomainfrom
auto-audio-transcode
Feb 24, 2026
Merged

Remove broken YouTube capture, add proxy server plan#7
farkasmark merged 23 commits intomainfrom
auto-audio-transcode

Conversation

@farkasmark
Copy link
Copy Markdown
Contributor

Summary

  • Remove broken YouTube paste-to-capture workflow that never worked due to CORS/tainted canvas limitations
  • Add implementation plan for local keel-based proxy server to docs/roadmap.md
  • C audit fixes: replace malloc with calloc for overflow-safe allocations
  • Clean up artifacts from git

Changes

  • Removed YouTube paste → popup → getDisplayMedia capture code from glif-app.js
  • Updated docs/roadmap.md with local proxy server implementation plan
  • Fixed medium issues M1, M2: calloc instead of malloc in src/main.c and src/image.c
  • Added tool binaries to .gitignore
  • Removed generated artifacts (hk421.glif, mk421.glif, package.json) from root

farkasmark and others added 23 commits February 22, 2026 11:35
--keep-audio now takes a file path and embeds the original audio
(Opus/OGG/AAC) in the ORIG section of .glif files. The WASM player
exports the data, both embedded and web players decode it via
decodeAudioData, and an HQ toggle (Q key) switches between crushed
and original audio. glif-transcode auto-extracts Opus from the input
by default (--no-keep-audio to opt out).
- README: add --keep-audio docs, Web Suite section, Tools section,
  trim Architecture, document compare overlay embed flag
- docs/roadmap.md: condense Completed to checklist, prune Planned
  to 3 items, add Non-goals section
- Makefile: add tools/glif_verify and tools/glif_transcode targets
- .gitignore: ignore generated demo artifacts (*.mp4, *.glif, demo HTML)
- tools/glif_transcode.c: add missing #include <limits.h>
- Replace CSS overlay compare with WebGL shader split in main app
  (draggable divider, content-relative split, video texture upload)
- Add app_set_compare, app_upload_video_frame, app_get_content_rect exports
- Fix shader to discard video outside content bounds (no edge bleed)
- Add grid data export (SVG/PPM/PNG), font embed, encoder WASM target
- Add glif-embed --video flag for comparison in embedded players
- Add compare.html, transcode.html, glif-encoder.js, compare-worker.js
- Add fetch-ffmpeg.sh, encode.c WASM encoder entry point
- Harden C modules: bounds checks, overflow guards, const correctness
Port bottom media bar from HTML/CSS to Clay layout + Nuklear widgets.
Replace text button labels with nk_button_symbol (play/pause/export/
fullscreen/audio). Restrict compare drag handler to content rect so
toolbar and media bar clicks don't move the split divider. Remove
conflicting bottom:0 from compareDivider CSS.
Move compare divider, compare labels, drop overlay, and compare drag
handling entirely to the C side. index.html is now a bare structural
shell with no overlay elements or custom CSS properties. glif-app.js
retains only browser-API bridges (file picker, video, camera, export).
Compute content rect from current frame's layout bounds before the
drag handler runs, instead of relying on the previous frame's stale
values. After a resize the viewport dimensions change immediately
but the old content rect caused split_pos to be computed against
shifted coordinates.
Add paste detection for YouTube URLs using getDisplayMedia() to bypass
CORS restrictions. Includes download overlay UI, content lifecycle
management (Escape to clear), and CaptureController focus handling.

Harden C code from audit: integer overflow checks in glif.c, output.c,
ui.c; pre-allocated render buffers; extract shared quickselect.h;
remove const cast-away in image_load_buffer; add bounds guards in
temporal.c and ui.c; add error checks in bench.c.
Vendor jart/pledge (ISC) for Linux seccomp-bpf + Landlock polyfill.
Each tool unveils only its required paths then pledges minimal syscall
promises after arg parsing, before processing untrusted input.
On macOS/WASM the sandbox code is ifdef'd out entirely.
@farkasmark farkasmark merged commit 465ef07 into main Feb 24, 2026
4 checks passed
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.

1 participant