Stop a high-quality render from reusing draft-quality sections

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, python
Domain
backend

Research direction

Read easyedit/render.py around section_html() and the section freshness check, then trace how easyedit/__main__.py writes edit.js. Reproduce with the two commands in the issue and inspect whether section reuse is keyed to the listed render inputs. Done when the second command rerenders every section; run python -m unittest discover as the issue suggests.

Written by the indexing model from the issue text.

Description

bug help wanted

render() reuses a section file when section-{a}-{b}.mp4 exists and is newer than edit.js and template/film.js. The file name and that freshness check ignore everything else that affects the pixels.

How to reproduce:

  1. python -m easyedit "Heat" --draft. This forces fps = 30 (__main__.py:48-49) and renders with --quality draft.
  2. python -m easyedit "Heat" --fps 30. The build key at __main__.py:109-112 includes fps but not quality, so it matches and edit.js is not rewritten. Every section then has the same name and is still "fresh", so all of them are reused.

The second run prints render: reuse section ... and outputs the draft-quality video under the normal file name. The same staleness happens after editing template/index.html, or after the fonts change, because neither is part of fresh_after.

Task: key sections on what they depend on: quality, fps, a hash of template/index.html and film.js, and the edit.js content. Put that in the section file name or in a sidecar stamp, not only in mtimes.

Where: easyedit/render.py:76-84, section_html() at lines 51-55, easyedit/__main__.py:109-129.

Done when: the two-step reproduction above renders every section again on the second run.


Getting started: Python 3.10+, Node 22+, FFmpeg on PATH. npm install, pip install -r requirements.txt, then python -m easyedit.doctor. Run python -m unittest discover before opening a PR. Passing --llm none skips the model entirely, which is the fastest way to test. Comment here to claim it. Questions → Discord.

Dominant language
Python
Stars
168
Forks
24
Avg merge
2d 10h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blixvip/easyedit

All issues in blixvip/easyedit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.