Repository navigation
fix(lerobot): preserve AUD start codes when transcoding video (#743) - #744
Open
shobhitagnihotri69 wants to merge 1 commit into
Open
shobhitagnihotri69 wants to merge 1 commit into
shobhitagnihotri69 wants to merge 1 commit into
Conversation
Contributor
[Medium impact] The PR appears safe to merge, with the previous finding fully addressed and no new issues found.
|
shobhitagnihotri69
force-pushed
the
fix/743-lerobot-transcode-aud-split
branch
from
October 28, 2026 05:28
a8ce67d to
6c7f8db
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #743. In
hflow.importers.lerobot._transcode_mp4_to_h264, replace custom_split_h264_by_audwith canonicalhflow.video.split_annex_b_stream.Why
_split_h264_by_audusedoffset = boundary_index + 5which stripped the start code (00 00 00 01) and NAL type byte (09) from each access unit, leaving the primary picture type byte dangling at the front of each frame. This produced non-conforming Annex B payloads that failedsplit_annex_b_streamvalidation withValueError: no access-unit delimiter (AUD, NAL type 9) found.Using the existing, spec-compliant
hflow.video.split_annex_b_streamkeeps the full AUD intact and produces valid, decodable H.264 access units matching the canonical video convention.Validation
test_transcode_mp4_to_h264_preserves_aud_and_annex_b_structureintests/test_lerobot_converter.py.uv run pytest tests/test_lerobot_converter.py tests/test_lerobot_workflow.py tests/test_lerobot_export.py(110 passed).uv run ruff check(All checks passed).uv run ruff format --check(323 files already formatted).uv run ty check(All checks passed).Checklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.Need help on this PR? Tag
@codesmith-botwith what you need.