Skip to content

Local dataset viewer not compatible with libtorchcodec #3199

@simbotbro

Description

@simbotbro

Ticket Type

🐛 Bug Report

Environment & System Info

  • LeRobot Version: 0.5.1 (autoinstall)
  • OS: Ubuntu 24.04 LTS
  • Python: 3.12 (Miniconda)
  • PyTorch Version: 2.10.0+cu128
  • GPU: NVIDIA GeForce RTX 5070 Laptop (Driver 580.126.09)

Description

Simply uploading a lerobot-record dataset using default methods causes the dataset to be unviewable by the dataset visualizer.

  1. The visualizer UI fails with: "Something went wrong. Failed to fetch dataset info: 401" (or Error 404).
  2. The CLI utility lerobot-dataset-viz crashes with a RuntimeError regarding libtorchcodec.

It appears to be a library mismatch between the environment's FFmpeg/PyTorch version and what torchcodec expects.

Context & Reproduction

The crash occurs immediately after "Logging to Rerun" when the dataloader begins fetching frames.

Command:

lerobot-dataset-viz --repo-id thesimbotbro/eval_PickAndPlace_30Hz_Seth3 --episode-index 0

Relevant Logs & Stack Trace

INFO 2026-03-21 23:10:12 aset_viz.py:115 Starting Rerun
[2026-03-22T03:10:12Z INFO  re_grpc_server] Listening for gRPC connections on 0.0.0.0:9876.
...
Traceback (most recent call last):
  File ".../lerobot/datasets/video_utils.py", line 152, in decode_video_frames
    return decode_video_frames_torchcodec(video_path, timestamps, tolerance_s)
  ...
  File ".../torchcodec/_core/ops.py", line 69, in load_torchcodec_shared_libraries
    raise RuntimeError(
RuntimeError: Could not load libtorchcodec. Likely causes:
          1. FFmpeg is not properly installed in your environment. We support versions 4, 5, 6 and 7.
          2. The PyTorch version (2.10.0+cu128) is not compatible with this version of TorchCodec.
          3. Another runtime dependency.

[start of libtorchcodec loading traceback]
FFmpeg version 7: Could not load this library: .../libtorchcodec_core7.so
FFmpeg version 6: Could not load this library: .../libtorchcodec_core6.so
FFmpeg version 5: Could not load this library: .../libtorchcodec_core5.so
FFmpeg version 4: Could not load this library: .../libtorchcodec_core4.so
[end of libtorchcodec loading traceback]

Checklist

  • I have searched existing tickets to ensure this isn't a duplicate.
  • I am using the latest version of the main branch.
  • I have verified this is not an environment-specific problem.

Additional Info / Workarounds

It seems that torchcodec is unable to find the shared objects for FFmpeg versions 4-7 in the current environment path, or there is a version mismatch with PyTorch 2.10.0+cu128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working correctlydatasetIssues regarding data inputs, processing, or datasetsdependenciesConcerns about external packages, libraries, or versioningdocumentationImprovements or fixes to the project’s docsvisualizationIssues about visual output, graphs, or data visualization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions