Datasets:
re-encode 16 corrupted videos in `lerobot/droid_1.0.1`
Browse files## Problem
16 video files in this dataset contain **invalid AV1 packets**. They are
partially readable but decoding eventually fails mid-stream on an invalid packet.
Because LeRobot v3.0 packs many episodes back-to-back into each `.mp4`, a single
bad packet makes the surrounding frames undecodable and **crashes dataset
iteration / training** when a sampled frame range touches the bad region. This is
not a local-cache issue: the files were re-downloaded from the Hub at revision
`bd92a2c4d6c85f9e16bd7c1f9729f5496d8be672` and reproduced byte-for-byte, and every
decoder stack tested fails on the same packets.
Affected files (`decoded/total` = frames TorchCodec 0.11.1 read before failing):
| video path | decoded/total |
|---|---:|
| `videos/observation.images.exterior_1_left/chunk-000/file-175.mp4` | 8192/90962 |
| `videos/observation.images.exterior_1_left/chunk-000/file-237.mp4` | 62976/95236 |
| `videos/observation.images.exterior_2_left/chunk-000/file-049.mp4` | 67584/89928 |
| `videos/observation.images.wrist_left/chunk-000/file-001.mp4` | 78336/155693 |
| `videos/observation.images.wrist_left/chunk-000/file-003.mp4` | 41984/152115 |
| `videos/observation.images.wrist_left/chunk-000/file-033.mp4` | 4096/147049 |
| `videos/observation.images.wrist_left/chunk-000/file-054.mp4` | 45056/152496 |
| `videos/observation.images.wrist_left/chunk-000/file-094.mp4` | 50688/148504 |
| `videos/observation.images.wrist_left/chunk-000/file-100.mp4` | 73216/160411 |
| `videos/observation.images.wrist_left/chunk-000/file-106.mp4` | 76288/152955 |
| `videos/observation.images.wrist_left/chunk-000/file-114.mp4` | 103936/150721 |
| `videos/observation.images.wrist_left/chunk-000/file-122.mp4` | 73728/152591 |
| `videos/observation.images.wrist_left/chunk-000/file-126.mp4` | 66048/155866 |
| `videos/observation.images.wrist_left/chunk-000/file-148.mp4` | 41472/148508 |
| `videos/observation.images.wrist_left/chunk-000/file-161.mp4` | 57344/152727 |
| `videos/observation.images.wrist_left/chunk-000/file-175.mp4` | 83456/155622 |
## Reproduction
All decoder stacks fail (PyAV 17.0.1/FFmpeg 8, PyAV 15.1.0/FFmpeg 7,
TorchCodec 0.10.0, TorchCodec 0.11.1; the FFmpeg 7.0.2 CLI exits 0 but logs an
invalid-packet error per file).
```python
import av
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="lerobot/droid_1.0.1", repo_type="dataset",
revision="bd92a2c4d6c85f9e16bd7c1f9729f5496d8be672",
filename="videos/observation.images.wrist_left/chunk-000/file-033.mp4",
)
with av.open(path) as container:
for _ in container.decode(container.streams.video[0]): # fails partway through
pass
# av.error.InvalidDataError: [Errno 1094995529] Invalid data found when processing input: 'avcodec_send_packet()'
```
TorchCodec shows `Could not push packet to decoder: Invalid data found when processing input`.
## Fix
Replacement frames come from the original RLDS DROID 1.0.1
(`gs://gresearch/robotics/droid/1.0.1`), where the three camera observations are
stored as 180x320 JPEG — exactly this dataset's video resolution — so frames are
decoded and re-encoded with no resizing.
1. **Locate the episodes.** In v3.0 each video file holds a contiguous block of
episodes packed back-to-back (within a file, video order == increasing
`episode_index`, frames are seamless, and `sum(episode length) == video frame
count`). The whole file is rebuilt (all its episodes) so no latent bad packet
survives.
2. **Index the correct RLDS episode.** The LeRobot `episode_index` does **not**
match the RLDS canonical (shard) order, so episodes are content-joined on the
lossless `action.joint_position` (each LeRobot frame equals exactly one RLDS
step's `action_dict/joint_position`, as a subsequence). Each match is verified
by exact action diff, episode length, and pixel PSNR vs the readable head of
the original video. All matched episodes have an identity step mapping.
3. **Re-encode.** RLDS JPEG frames are decoded to RGB and re-encoded as
**libsvtav1, yuv420p, fps 15, g=2, crf=30** (the LeRobot v3.0 RGB-camera
defaults). Each episode's exact frame count and order is preserved, so the
`meta/episodes` parquet `from/to` timestamps stay valid (no metadata changes).
Re-encode PSNR (36.3-41.0 dB) is on par with the originals.
## Verification
Running the §Reproduction decode loop as a full decode over every frame now
passes on all 16 updated files (no `InvalidDataError`, exact frame counts), and
`LeRobotDataset` iterating all 9023 frames of the 16 previously-failing episodes
raises no exception.
- videos/observation.images.exterior_1_left/chunk-000/file-175.mp4 +2 -2
- videos/observation.images.exterior_1_left/chunk-000/file-237.mp4 +2 -2
- videos/observation.images.exterior_2_left/chunk-000/file-049.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-001.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-003.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-033.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-054.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-094.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-100.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-106.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-114.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-122.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-126.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-148.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-161.mp4 +2 -2
- videos/observation.images.wrist_left/chunk-000/file-175.mp4 +2 -2
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5de4ff57a2e870e815a49b1ca55c7131d7781d77c198f1f188418f106bc2a5a9
|
| 3 |
+
size 497541072
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5f05b92df51dfca1ec5b354e7716fc8c5bd16c4faa0563dfcfe99d0f23cd913
|
| 3 |
+
size 516881396
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6888364cdbf84a0a9c01d055925bbe27e0487085109ee54a5a9ec3774009eee
|
| 3 |
+
size 500173202
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b556ba1b6186c3d810538ba4a651df421a3b566abfb48931a2139968ce9c6ff
|
| 3 |
+
size 544261119
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47ec60063403353dcbc660291dcd238ea0f78eaeffcd87b83f04d356fc7b3cc4
|
| 3 |
+
size 515450480
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca81f7221477b443a1c339386d2a343d4c3c0cd3d980a287886bb628380dd64e
|
| 3 |
+
size 499609015
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8952c0499728528278ebbedc40dcf0b5973f33ec5e2e8ef7a2fb11c46b0f41bd
|
| 3 |
+
size 537768302
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da6f8c14b1176fb8ff360c82e97a75e854b727314c0d0400460bc09b388a3bd1
|
| 3 |
+
size 497644024
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0698375e357b26ce41865be7b4d2c9c99ea3ae6f6b93595cb8b9afb29cf5971
|
| 3 |
+
size 539546368
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11bf74e7c04a6869fdeaa73c5d92c0f3fddaff3734e742142dc67df06309d8cd
|
| 3 |
+
size 520774584
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f772b31bc4324375fc93b79119f882a51a18da569d37142f560849fea5d5e3aa
|
| 3 |
+
size 524820490
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:448655ba7dfde3bb6ba5a7fb65c649fa4b7f0440de48bae67e6bcb27600de082
|
| 3 |
+
size 524716113
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a4829cc1608d7024d662cf6afe2db1f5f32f5a960890254f83e46b6b0c6bfbc
|
| 3 |
+
size 540522132
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d4c96cc54c1afcad8e75687de8c3189b63d30759a34aba3f0b99bdc00528bc8
|
| 3 |
+
size 517503965
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87f57f5329c0a4dc45915a63ec02b2bfe08eab00e6600884dd22d37c882385d0
|
| 3 |
+
size 525777029
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adf15e26e037ad6f6df1ecceb0955711604e5c5d12baa5414774dacc0434dfce
|
| 3 |
+
size 532580200
|