A Python application for simultaneous audio and video recording with timestamp synchronization.
- Simultaneous audio and video recording
- Timestamp synchronization between audio and video streams
- Configurable recording duration
- Support for multi-channel audio input
- Automatic file organization with timestamped folders
- Python 3.8+
- OpenCV
- NumPy
- SoundDevice
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Basic usage:
from src.recorder import AudioVideoRecorder
# Create a recorder instance
recorder = AudioVideoRecorder(
mic_device_name="UMA16V2", # Your audio device name
video_device_index=0, # Video device index (usually 0 for default camera)
duration=2700 # Duration in seconds (45 minutes)
)
# Start recording
recorder.start_recording()
The recorder creates two directories for each recording session:
data/audio_stream_[timestamp]/
: Contains audio chunks in NumPy formatdata/video_stream_[timestamp]/
: Contains the video recording in MP4 format
- Make sure your audio device is properly connected and recognized by the system
- The video device index might need to be adjusted based on your system configuration
- The default recording duration is 45 minutes (2700 seconds)