A Thread-Safe, Zero-Lag Camera and Audio Multiplexer with Built-In Recording and Watchdog
Project description
DeltaStream (and DeltaScream)
A high-performance media "delta" that forks raw audio/video buffers into multiple concurrent streams.
When building AI tools (like Neural Inference engines or Computer Vision apps), they often "hog" the hardware. You lose the ability to screen record or tap into the audio because your inference engine places an exclusive lock on your OS drivers.
DeltaStream acts as a buffered middleware. Instead of your apps reaching for the hardware, they reach for the Delta.
- The Main Branch (Inference): A high-priority, low-latency path for your neural logic.
- The Side Branch (Recording): A background "Tributary" that encodes the frames and audio to a file natively.
- The Scream Listener: A watchdog thread that monitors the buffer health. If the inference engine causes a bottleneck, it triggers the "Scream" state.
Installation
pip install DeltaStream
Quick Start
from DeltaStream import DeltaStream
# Initialize the Hub (Dual-Stream Default: Mic + System WASAPI)
hub = DeltaStream(video_src=0, mux_audio=True)
# To get the latest video frame for your inference engine:
success, frame = hub.read_video()
# To get the latest sequential audio frames (to avoid stuttering):
# Maintain your own local index
my_audio_index = 0
audio_chunks = hub.read_audio(my_audio_index)
my_audio_index += len(audio_chunks)
# To start the built-in background recorder (Tributary):
hub.start_recording("my_session.mp4", "my_session_audio.wav")
hub.stop_recording()
# Shutdown
hub.stop()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deltascream-0.1.1.tar.gz.
File metadata
- Download URL: deltascream-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e5d0e4467c0e76909c93c5a08554183f2ee4a7167f994fb331de19e0341b427
|
|
| MD5 |
0dfef5541ff864ea1196c9778d95b515
|
|
| BLAKE2b-256 |
dc112444bfed57e7f0ff2496a2b53ac5e4f91a962ae6a07a424426d6b7ea6a15
|
File details
Details for the file deltascream-0.1.1-py3-none-any.whl.
File metadata
- Download URL: deltascream-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85efacfa23345cbb2848d865b88a6a08dcd09200584790c1ecee480d90a53e75
|
|
| MD5 |
cc80446ad8e4a2b91d1374eec9584fa1
|
|
| BLAKE2b-256 |
1d68fec032ca81cd9070e2082d53ba5141284f060a659af2e6be6b986b1f2ca0
|