Urgent.News

What's breaking now, across thousands of outlets.

Tech

From 10,000 frames to 30 moments: Building a visual story compressor

Two hours at 2fps is around 14,000 frames. Most of them are noise: the cursor blinks, the system clock ticks, nothing in the code moved. The first step isn't clever. It's just getting rid of those. ProgressCut is a local macOS app that turns a coding session into a short visual story. No talking, no editing. You hit stop and it hands you a GIF. Here's how the algorithm actually works. Source…

ProgressCut converts a coding session into a short visual story, producing a GIF after the user stops the recording. The algorithm goes through five stages, removing different types of redundant frames.

The first stage employs dHash, which eliminates identical frames. By resizing the frames to 9×8 pixels and converting them to greyscale, it calculates a hash for each pixel and checks for differences by XORing the hashes. Frames with a Hamming distance of ≤ 8 are considered duplicates and removed. Approximately 89% of frames are discarded in this stage, reducing the frame count from 10,847 to 1,203.

The second stage uses SSIM to filter out boring frames. Although dHash removes visually identical frames, many remaining frames appear slightly different due to minor changes in the cursor or status bar. SSIM scores the visual similarity between consecutive frames based on luminance, contrast, and spatial structure. Frames with a score close to 1, indicating no change, are discarded. This stage further reduces the frame count to 284.

The third stage segments the frames into regions, computes SSIM for each region, and averages the scores. By dividing the frame into 16 regions, SSIM can better capture minor changes in specific areas without penalizing overall visual changes. After this stage, the frame count drops to 48.

Finally, the last stage selects the most significant moments from the remaining frames, resulting in a 30-second visual story. This final stage ensures the compressed visualization highlights the most noteworthy events in the coding session.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Adding Concurrency with `cancel-in-progress` to GitHub Actions CI to Cut Build Minutes

Adding Concurrency with cancel-in-progress to GitHub Actions CI to Cut Build Minutes TL;DR: I added a concurrency block with cancel-in-progress: true to the ci-e2e.yml workflow, preventing overlapping…

  • GitHub Actions workflows updated with concurrency block
  • cancel-in-progress: true ensures canceled previous runs
  • Build minutes cut by ~30% on active pull requests

OverTheWire Bandit Level 2 Writeup — Read a Filename With Spaces

The password file is named spaces in this filename . The shell splits unquoted arguments on whitespace, so the filename has to be quoted or escaped to be treated as one argument.

  • File named "spaces in this filename" has spaces in its name
  • Shell splits filename into separate arguments without quoting
  • Quote or escape spaces to read file contents successfully

More from Friday 2 October →