Skip to content

Fix Windows console crashes, portrait rotation detection, and timeline_view seek edge case; add CRF/preset overrides - #112

Open
sameer99z wants to merge 1 commit into
browser-use:mainfrom
sameer99z:main
Open

Fix Windows console crashes, portrait rotation detection, and timeline_view seek edge case; add CRF/preset overrides#112
sameer99z wants to merge 1 commit into
browser-use:mainfrom
sameer99z:main

Conversation

@sameer99z

@sameer99z sameer99z commented Jul 20, 2026

Copy link
Copy Markdown
  • ASCII-only print output in transcribe_batch.py, render.py, grade.py, pack_transcripts.py to avoid crashes on the default Windows cp1252 console
  • render.py: read rotation side-data and swap w/h when detecting portrait sources, fixing WhatsApp/phone clips with +/-90deg rotation metadata being misclassified as landscape and cropped to the wrong canvas
  • render.py: add --crf/--preset CLI overrides for higher-quality renders
  • timeline_view.py: pull the final sample frame back ~0.05s so it doesn't land past the container's last frame timestamp and fail the ffmpeg seek
  • add uv.lock

Summary by cubic

Fixes Windows console crashes and incorrect portrait handling for phone clips, and makes timeline seek more reliable. Adds --crf/--preset overrides for quality control and includes uv.lock.

  • Bug Fixes

    • Force ASCII-only CLI output in helpers to avoid cp1252 console crashes on Windows.
    • Read rotation side-data and treat +/-90° sources as portrait to prevent wrong canvas cropping.
    • Scale-to-cover plus center-crop to exact 9:16 or 16:9 to keep segments concat-safe.
    • Pull the final timeline sample back ~0.05s to avoid end-of-container ffmpeg seek misses.
  • New Features

    • render.py: add --crf and --preset flags to override the default quality ladder.
    • Add uv.lock.

Written for commit 9611e36. Summary will update on new commits.

Review in cubic

…e_view seek edge case; add CRF/preset overrides

- ASCII-only print output in transcribe_batch.py, render.py, grade.py,
  pack_transcripts.py to avoid crashes on the default Windows cp1252 console
- render.py: read rotation side-data and swap w/h when detecting portrait
  sources, fixing WhatsApp/phone clips with +/-90deg rotation metadata being
  misclassified as landscape and cropped to the wrong canvas
- render.py: add --crf/--preset CLI overrides for higher-quality renders
- timeline_view.py: pull the final sample frame back ~0.05s so it doesn't
  land past the container's last frame timestamp and fail the ffmpeg seek
- add uv.lock

@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.

1 issue found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="helpers/render.py">

<violation number="1" location="helpers/render.py:663">
P2: `--crf` and `--preset` are ignored for renders that composite overlays or subtitles: `build_final_composite` re-encodes with hard-coded `fast`/`18`. Thread both overrides into that final pass so CLI quality settings apply to the delivered file.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread helpers/render.py
segment_paths = extract_all_segments(
edl, edit_dir, preview=args.preview, draft=args.draft
edl, edit_dir, preview=args.preview, draft=args.draft,
crf_override=args.crf, preset_override=args.preset,

@cubic-dev-ai cubic-dev-ai Bot Jul 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: --crf and --preset are ignored for renders that composite overlays or subtitles: build_final_composite re-encodes with hard-coded fast/18. Thread both overrides into that final pass so CLI quality settings apply to the delivered file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At helpers/render.py, line 663:

<comment>`--crf` and `--preset` are ignored for renders that composite overlays or subtitles: `build_final_composite` re-encodes with hard-coded `fast`/`18`. Thread both overrides into that final pass so CLI quality settings apply to the delivered file.</comment>

<file context>
@@ -613,10 +659,11 @@ def main() -> None:
     segment_paths = extract_all_segments(
-        edl, edit_dir, preview=args.preview, draft=args.draft
+        edl, edit_dir, preview=args.preview, draft=args.draft,
+        crf_override=args.crf, preset_override=args.preset,
     )
 
</file context>
Fix with 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.

2 participants