Repository navigation
fix(ffmpeg): detach FFmpeg children from the caller's standard input - #784
Conversation
FFmpeg reads interactive commands from standard input: 'q' stops it with exit status 0 and other bytes are discarded. Frame extraction, contact sheets, frame statistics, synthetic episodes and the LeRobot transcode inherited the caller's standard input, so a shell read loop or a typed key could truncate their output or lose the loop's input. Give them /dev/null or -nostdin, like the other FFmpeg call sites.
|
👋 Hi @JaynouOliver — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Before starting an issue, check its sidebar for an assignee or a linked pull request. Either one means somebody is already on it; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
[Medium impact] The PR appears safe to merge.
|
kstonekuan
left a comment
There was a problem hiding this comment.
Thanks for fixing this! Validated with Ruff, ty, and the full test suite: 2,608 passed, 47 skipped.
Summary
Frame extraction, contact sheets, frame statistics,
hflow.testingsynthesis and the LeRobot transcode no longer read the caller's standard input.Why
FFmpeg polls standard input:
qstops it with exit status 0, other bytes are discarded. Six invocations inherited it, sowhile read repo; do hflow import lerobot --repo "$repo" ...; done < repos.txtlost loop input, and aqgaveframe count mismatch: 266 parquet vs 107 video access units;Episode.frames()returned a short sample without an error. They now getstdin=subprocess.DEVNULL, or-nostdinfor the contact sheet, like the other call sites.Validation
uv run pytest tests/test_ffmpeg_standard_input.py -q: 4 failed before, 4 passed after. Related suites: 278 passed, 3 skipped. Linux, Python 3.13, FFmpeg 6.1.1 only; the full suite was not re-run on the final patch.Checklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.