Skip to content

Commit 0a478f0

Browse files
committed
Fix MP4 recording with FFmpeg-enabled OpenCV
1 parent a5e70a1 commit 0a478f0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎requirements.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ msgpack==1.1.2
88
numpy>=2.0,<2.8
99
onnx==1.20.1
1010
onnxruntime-gpu==1.25.1
11+
opencv-python-headless==4.14.0.94
1112
pandas==3.0.1
1213
pytorch-lightning==2.6.1
1314
timm==1.0.26

‎run.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,15 @@
189189
parser.error("--nurec-omap-file requires --nurec-scene.")
190190
apply_nurec_spg_kit_args(args_cli)
191191

192+
if args_cli.video:
193+
# Load the FFmpeg-enabled wheel before Kit prepends its bundled OpenCV to sys.path.
194+
import cv2
195+
196+
if not cv2.videoio_registry.hasBackend(cv2.CAP_FFMPEG):
197+
parser.error(
198+
"--video requires FFmpeg-enabled OpenCV. Install requirements.txt and recreate "
199+
f"the Docker container after rebuilding the image. Loaded OpenCV: {cv2.__file__}")
200+
192201
# launch omniverse app
193202
app_launcher = AppLauncher(args_cli, enable_cameras=True)
194203
simulation_app = app_launcher.app

0 commit comments

Comments
 (0)