diff --git a/src/lerobot/datasets/video_utils.py b/src/lerobot/datasets/video_utils.py index 5064d61f7..bb37bb225 100644 --- a/src/lerobot/datasets/video_utils.py +++ b/src/lerobot/datasets/video_utils.py @@ -37,11 +37,12 @@ import torchvision from datasets.features.features import register_feature from PIL import Image +from lerobot.utils.import_utils import get_safe_default_video_backend + from .pyav_utils import ( check_video_encoder_config_pyav, detect_available_encoders_pyav, ) -from lerobot.utils.import_utils import get_safe_default_video_backend logger = logging.getLogger(__name__) diff --git a/tests/datasets/test_video_encoding.py b/tests/datasets/test_video_encoding.py index 968b3c5a3..7332ab357 100644 --- a/tests/datasets/test_video_encoding.py +++ b/tests/datasets/test_video_encoding.py @@ -478,7 +478,9 @@ class TestConcatenateVideoFiles: def test_two_clips_frame_count(self, tmp_path): """Output frame count equals the sum of the two input frame counts.""" out = tmp_path / "out.mp4" - concatenate_video_files([TEST_ARTIFACTS_DIR / "clip_6frames.mp4", TEST_ARTIFACTS_DIR / "clip_4frames.mp4"], out) + concatenate_video_files( + [TEST_ARTIFACTS_DIR / "clip_6frames.mp4", TEST_ARTIFACTS_DIR / "clip_4frames.mp4"], out + ) with av.open(str(out)) as container: total = sum(1 for _ in container.decode(video=0)) @@ -497,7 +499,9 @@ class TestConcatenateVideoFiles: def test_geometry_preserved(self, tmp_path): """Output resolution, fps, codec and pixel format must match the inputs.""" out = tmp_path / "out.mp4" - concatenate_video_files([TEST_ARTIFACTS_DIR / "clip_4frames.mp4", TEST_ARTIFACTS_DIR / "clip_4frames.mp4"], out) + concatenate_video_files( + [TEST_ARTIFACTS_DIR / "clip_4frames.mp4", TEST_ARTIFACTS_DIR / "clip_4frames.mp4"], out + ) info = get_video_info(out) assert info["video.height"] == 64