Skip to content

fix(render): avoid shared concat list file#100

Open
NgoQuocViet2001 wants to merge 1 commit into
browser-use:mainfrom
NgoQuocViet2001:fix/unique-concat-list
Open

fix(render): avoid shared concat list file#100
NgoQuocViet2001 wants to merge 1 commit into
browser-use:mainfrom
NgoQuocViet2001:fix/unique-concat-list

Conversation

@NgoQuocViet2001

@NgoQuocViet2001 NgoQuocViet2001 commented Jul 2, 2026

Copy link
Copy Markdown

Summary

  • Write the ffmpeg concat demuxer list to a per-call temp file in edit_dir instead of the fixed _concat.txt path.
  • Clean the temp concat list in a finally block so failed ffmpeg runs do not leave stale list files behind.
  • Add a stdlib unittest covering unique concat-list names and cleanup.

Why

Issue #64 calls out that concurrent renders in the same edit directory can clobber the shared _concat.txt file. Keeping the temp file inside edit_dir preserves the concat demuxer's filesystem behavior while avoiding cross-render overwrites.

Test plan

  • python -m unittest tests.test_render_concat
  • python -m unittest discover -s tests
  • python -m py_compile helpers/render.py tests/test_render_concat.py

Summary by cubic

Write the ffmpeg concat list to a unique temp file per render in edit_dir and delete it after the run. This avoids _concat.txt collisions during concurrent renders and prevents stale files.

  • Bug Fixes
    • Use tempfile.NamedTemporaryFile to create _concat_*.txt in edit_dir.
    • Remove the temp list in a finally block, even if ffmpeg fails.
    • Add tests/test_render_concat.py to verify unique names and cleanup.

Written for commit 0f2a674. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

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