TimeShot is a Windows desktop application designed for synchronized multi-camera video capture with real-time LabStreamingLayer (LSL) integration. It allows users to record video from multiple USB cameras while simultaneously sending frame-accurate markers over LSL for synchronization in experimental setups (e.g., EEG, eye-tracking, behavioral experiments).
- Multi-camera support: Detects and manages multiple connected webcams.
- Customizable: Each camera has its own filename, stream name, and preview.
- Real-time previews: Each video stream is shown in a live preview window.
- Synchronized recording: Start recording from all selected cameras simultaneously.
- LSL integration: Sends frame indices as markers over LSL for each recorded frame.
- Visual frame indexing: Each recorded frame is annotated with its frame number.
- User-friendly GUI: Built with MaterialSkin for a modern look and feel.
- .NET 8
- C# WinForms
- OpenCvSharp (for camera and video handling)
- LSL-CSharp (for marker streaming)
- Windows 10 or higher
- .NET 8 SDK
- Visual Studio 2022 or later (with Windows Forms workload)
-
Clone the repository:
git clone https://github.com/yourusername/timeshot.git cd timeshot -
Open
TimeShot.slnin Visual Studio. -
Restore NuGet packages. Required:
OpenCvSharp4OpenCvSharp4.runtime.winLSL-CSharpMaterialSkin.2
-
Build and run the solution.
-
Launch the application.
-
The application will auto-detect available USB cameras (up to 10).
-
For each detected camera:
- Customize the stream name (used in LSL).
- Choose an output filename for the video.
- Toggle whether to include this camera.
-
Click Create Streams:
- This initializes the preview windows and sets up streams.
-
Click Start Recording:
- Recording begins for all selected cameras.
- Each frame is saved to a local
.mp4file and a marker with the current frame index is sent over LSL.
-
Click Stop Recording:
- You'll be asked to confirm before stopping.
- All streams and previews are gracefully closed.
-
Click Exit TimeShot to quit if no recording is active.
Suppose you are recording behavioral data using two webcams and an EEG cap. You can:
- Set camera 0 as
"EyeStream", and camera 1 as"BodyCam". - Record both streams simultaneously.
- Use LSL markers sent by TimeShot to align video data precisely with EEG timestamps during post-processing.
- LSL is only used when recording; no unnecessary traffic during previews.
Pull requests and issues are welcome!
- Enable audio recording from selected microphones.
- OpenCV community for the excellent C# wrapper.
- SCCN for LabStreamingLayer.
- MaterialSkin developers for the modern UI framework.
Mark Span
GitHub: @MarkSpan