Capture OpenCV video through MXVK and encode it with MXWrite. More...
Go to the source code of this file.
Classes | |
| class | mxwrite-opencv.CaptureWindow |
Namespaces | |
| namespace | mxwrite-opencv |
Functions | |
| mxwrite-opencv.configure_encoder (args) | |
| mxwrite-opencv.fourcc_to_string (value) | |
| mxwrite-opencv.get_file_timestamp (capture, source_fps, frame_index) | |
| mxwrite-opencv.main () | |
| mxwrite-opencv.open_camera_capture (index, width, height, fps) | |
| mxwrite-opencv.open_file_capture (filename) | |
| mxwrite-opencv.parse_arguments () | |
| mxwrite-opencv.validate_arguments (args) | |
Capture OpenCV video through MXVK and encode it with MXWrite.
Uses mxvk_ext.Capture for camera or file input, displays frames in an MXVK sprite, and writes file input as constant-frame-rate video. Camera capture retains monotonic timestamps. The example is intentionally split so MXVK owns capture/windowing and MXWrite owns encoding/muxing.
Requires a CV-enabled mxvk_ext module, mxwrite_ext, OpenCV, and NumPy. The Linux camera path requests V4L2 MJPEG; other platforms use OpenCV's default camera backend.
File input uses sequential PTS values at the input frame rate for CFR output. Camera input preserves monotonic capture timestamps. Escape or Ctrl-C stops capture; --frames limits the number of submitted frames.
Definition in file mxwrite-opencv.py.