diff --git a/docs/source/streaming_video_encoding.mdx b/docs/source/streaming_video_encoding.mdx index ec5feefd7..4b65382f9 100644 --- a/docs/source/streaming_video_encoding.mdx +++ b/docs/source/streaming_video_encoding.mdx @@ -19,7 +19,7 @@ This makes `save_episode()` near-instant (the video is already encoded by the ti | `streaming_encoding` | `--dataset.streaming_encoding` | `bool` | `True` | Enable real-time encoding during capture | | `vcodec` | `--dataset.camera_encoder_config.vcodec` | `str` | `"libsvtav1"` | Video codec. `"auto"` detects best HW encoder | | `encoder_threads` | `--dataset.encoder_threads` | `int \| None` | `None` (auto) | Threads per encoder instance. `None` will leave the vcoded decide | -| `encoder_queue_maxsize` | `--dataset.encoder_queue_maxsize` | `int` | `30` | Max buffered frames per camera (~2s at 30fps). Consumes RAM | +| `encoder_queue_maxsize` | `--dataset.encoder_queue_maxsize` | `int` | `30` | Max buffered frames per camera (~1s at 30fps). Consumes RAM | ## 3. Performance Considerations diff --git a/src/lerobot/configs/video.py b/src/lerobot/configs/video.py index 292225ec4..95ff68e23 100644 --- a/src/lerobot/configs/video.py +++ b/src/lerobot/configs/video.py @@ -73,7 +73,7 @@ class VideoEncoderConfig: vcodec: str = "libsvtav1" # TODO(CarolinePascal): rename to codec ? pix_fmt: str = "yuv420p" g: int | None = 2 - crf: int | None = 30 + crf: int | float | None = 30 preset: int | str | None = None fast_decode: int = 0 # TODO(CarolinePascal): add torchcodec support + find a way to unify the diff --git a/src/lerobot/scripts/lerobot_edit_dataset.py b/src/lerobot/scripts/lerobot_edit_dataset.py index adf3abf6b..152c514e9 100644 --- a/src/lerobot/scripts/lerobot_edit_dataset.py +++ b/src/lerobot/scripts/lerobot_edit_dataset.py @@ -209,10 +209,9 @@ from pathlib import Path import draccus from lerobot.configs import parser +from lerobot.configs.video import VideoEncoderConfig, camera_encoder_defaults from lerobot.datasets import ( LeRobotDataset, - VideoEncoderConfig, - camera_encoder_defaults, convert_image_to_video_dataset, delete_episodes, merge_datasets, diff --git a/tests/datasets/test_video_encoding.py b/tests/datasets/test_video_encoding.py index f5508bad2..da4e3b2ec 100644 --- a/tests/datasets/test_video_encoding.py +++ b/tests/datasets/test_video_encoding.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Unit tests for ``lerobot.datasets.video_utils`` encoding functions and ``VideoEncoderConfig`` config class.""" +"""Unit tests for ``lerobot.datasets.video_utils`` encoding functions and ``lerobot.configs.video.VideoEncoderConfig`` config class.""" import json from pathlib import Path