Custom Media Manager
This example demonstrates how to deactivate the built-in media manager and access the camera and microphone directly using OpenCV and sounddevice.
Why? The daemon normally owns the camera and audio hardware. If you need raw access (e.g. custom OpenCV pipelines, sounddevice recording, or a third-party vision library), you must first tell the daemon to release the hardware. See Media Architecture - Disabling Media for details.
How it works:
- Connects with
media_backend="no_media"— this automatically tells the daemon to release camera and audio hardware - Uses OpenCV to capture a frame directly from the camera
- Uses sounddevice to record audio from the microphone
- On exit, the daemon automatically re-acquires the hardware
💡 Tip: Robot control (head, antennas, body) keeps working normally while media is released. Only camera and audio are affected.
Requirements:
pip install opencv-python sounddevice soundfile
Usage:
python custom_media_manager.py
See the full example at: custom_media_manager.py