Skip to content

fix(egohand): make the startup input checks work on release profiles - #1451

Merged
shaosu-nvidia merged 1 commit into
egopost/1.0-containerfrom
ssx/7041456_egopost_1.0-container
Nov 6, 2026
Merged

shaosu-nvidia merged 1 commit into
egopost/1.0-containerfrom
ssx/7041456_egopost_1.0-container

Conversation

@shaosu-nvidia

Copy link
Copy Markdown
Contributor

Description

The input checks from #1444 were written against main, which has only the OpenCV video reader. On this branch the release profile reads video through FFmpeg, and the release image's OpenCV has no video I/O. Two things broke:

  • check_video_decodable() called cv2.VideoCapture directly, so on release it rejected every input, valid ones included.
  • The FFmpeg backend raises VideoDecodeError, UnsupportedVideoCodecError and VideoDecoderUnavailableError. Nothing caught them, so a zero-byte, truncated or unsupported-codec file printed a traceback, and a bad codec failed only after the model loaded.

The first-frame check now reads through the active video backend, and probe_video() turns the backend errors into one line naming the file: exit 2 for an unsupported codec, exit 1 for a file that cannot be decoded. The error classes move to media/errors.py so the script can import them without loading a backend. A test fails if the script ever calls cv2.VideoCapture directly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

…ase profiles

The input checks from #1444 were written against main, which has only the
OpenCV video reader. On this branch the release profile reads video through
FFmpeg, and the release image's OpenCV has no video I/O. Two things broke:

- check_video_decodable() called cv2.VideoCapture directly, so on release it
  rejected every input, valid ones included.
- The FFmpeg backend raises VideoDecodeError, UnsupportedVideoCodecError and
  VideoDecoderUnavailableError. Nothing caught them, so a zero-byte, truncated
  or unsupported-codec file printed a traceback, and a bad codec failed only
  after the model loaded.

The first-frame check now reads through the active video backend, and
probe_video() turns the backend errors into one line naming the file: exit 2
for an unsupported codec, exit 1 for a file that cannot be decoded. The error
classes move to media/errors.py so the script can import them without loading
a backend. A test fails if the script ever calls cv2.VideoCapture directly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Shao Su <shaoxiangs@nvidia.com>
@shaosu-nvidia shaosu-nvidia self-assigned this Nov 6, 2026
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@shaosu-nvidia
shaosu-nvidia merged commit 5371986 into egopost/1.0-container Nov 6, 2026
80 of 86 checks passed
@shaosu-nvidia
shaosu-nvidia deleted the ssx/7041456_egopost_1.0-container branch November 6, 2026 22:04
shaosu-nvidia added a commit that referenced this pull request Nov 6, 2026
…ase profiles (#1451)

The input checks from #1444 were written against main, which has only the
OpenCV video reader. On this branch the release profile reads video through
FFmpeg, and the release image's OpenCV has no video I/O. Two things broke:

- check_video_decodable() called cv2.VideoCapture directly, so on release it
  rejected every input, valid ones included.
- The FFmpeg backend raises VideoDecodeError, UnsupportedVideoCodecError and
  VideoDecoderUnavailableError. Nothing caught them, so a zero-byte, truncated
  or unsupported-codec file printed a traceback, and a bad codec failed only
  after the model loaded.

The first-frame check now reads through the active video backend, and
probe_video() turns the backend errors into one line naming the file: exit 2
for an unsupported codec, exit 1 for a file that cannot be decoded. The error
classes move to media/errors.py so the script can import them without loading
a backend. A test fails if the script ever calls cv2.VideoCapture directly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Shao Su <shaoxiangs@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants