.dwvo is DWE’s multi-camera recording container, produced when you record in Discovery. The payload is MJPEG, so every frame in the file is already a complete JPEG — playback is a single cv2.imdecode, and export is a byte copy with no re-encoding or quality loss.
Recording DWVO in Discovery
New to DWVO? Start here to stream and record
.dwvo files.Prerequisites
- Python (version 3.x)
opencv-python,numpy, andpillow- A
.dwvorecording — the examples below usetest.dwvo
Setup
Clone the OpenCV Guides repository and open the folder for this guide, then create a virtual environment and install the dependencies:Playback
main.py decodes every camera and shows them side by side in one OpenCV window.
| Argument / key | |
|---|---|
--fps N | Playback rate. Defaults to the header’s fps. |
--loop | Restart at the end of the file. |
space | Pause / resume. |
q / esc | Quit. |
Playback is anchored to a fixed schedule: if decoding falls a full frame behind, that frame is dropped rather than shown late, so the video stays at wall-clock speed.
Export to JPEGs
Because DWVO already stores MJPEG,export.py copies each frame straight to disk — no decode, no quality loss.
| Argument | |
|---|---|
--step N | Keep every Nth frame. |
--start-frame N | First output index, to continue numbering from an earlier sequence. |
Lossless PNG (KITTI dataset)
dwvo_to_kitti.py produces the same layout but decodes through Pillow so it can emit lossless PNG. Use it when a downstream tool won’t accept JPEG; otherwise export.py is faster.
Reading DWVO programmatically
Indwvo.py, DWVOReader iterates timestamp blocks, DWVOWriter writes them, and combine_dwvos() concatenates recordings that share a header.
FAQ
Why is the video slower than what I recorded?
Why is the video slower than what I recorded?
In Discovery, some cameras require setting the FPS manually. If it was set to 30 FPS while the video was streamed at 60 FPS, the
.dwvo file records 30 FPS in its metadata and tells applications to read at 30 FPS. Override it at playback with --fps.Further information
For additional details, examples in other languages, and the full source of the scripts above, see the OpenCV Guides repository.OpenCV Guides Repository
DWVO reader, playback, export, and KITTI conversion source.