Skip to content

markspan/TimeShot

Repository files navigation

TimeShot

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).

Features

  • 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.

Technologies Used

Installation

Prerequisites

  • Windows 10 or higher
  • .NET 8 SDK
  • Visual Studio 2022 or later (with Windows Forms workload)

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/timeshot.git
    cd timeshot
  2. Open TimeShot.sln in Visual Studio.

  3. Restore NuGet packages. Required:

    • OpenCvSharp4
    • OpenCvSharp4.runtime.win
    • LSL-CSharp
    • MaterialSkin.2
  4. Build and run the solution.

Usage

  1. Launch the application.

  2. The application will auto-detect available USB cameras (up to 10).

  3. For each detected camera:

    • Customize the stream name (used in LSL).
    • Choose an output filename for the video.
    • Toggle whether to include this camera.
  4. Click Create Streams:

    • This initializes the preview windows and sets up streams.
  5. Click Start Recording:

    • Recording begins for all selected cameras.
    • Each frame is saved to a local .mp4 file and a marker with the current frame index is sent over LSL.
  6. Click Stop Recording:

    • You'll be asked to confirm before stopping.
    • All streams and previews are gracefully closed.
  7. Click Exit TimeShot to quit if no recording is active.

Example Use Case

Suppose you are recording behavioral data using two webcams and an EEG cap. You can:

  1. Set camera 0 as "EyeStream", and camera 1 as "BodyCam".
  2. Record both streams simultaneously.
  3. Use LSL markers sent by TimeShot to align video data precisely with EEG timestamps during post-processing.

Development

Key Concepts

  • LSL is only used when recording; no unnecessary traffic during previews.

Contributing

Pull requests and issues are welcome!

Suggestions

  • Enable audio recording from selected microphones.

License

GPL-2.0-only

Acknowledgments

  • OpenCV community for the excellent C# wrapper.
  • SCCN for LabStreamingLayer.
  • MaterialSkin developers for the modern UI framework.

Author

Mark Span
GitHub: @MarkSpan

About

videorecorder with Labstreaminglayer integration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages