Skip to main content
.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, and pillow
  • A .dwvo recording — the examples below use test.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 NPlayback rate. Defaults to the header’s fps.
--loopRestart at the end of the file.
spacePause / resume.
q / escQuit.
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 NKeep every Nth frame.
--start-frame NFirst output index, to continue numbering from an earlier sequence.
Output is one directory per camera, numbered KITTI-style:

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

In dwvo.py, DWVOReader iterates timestamp blocks, DWVOWriter writes them, and combine_dwvos() concatenates recordings that share a header.

FAQ

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.