Giter Site home page Giter Site logo

ducktrack's Introduction

DuckTrack

This is the repository for the DuckAI DuckTrack app which records all keyboard and mouse input as well as the screen for use in a multimodal computer interaction dataset.

Installation & Setup

Download Application

Download the pre-built application for your system here.

Make sure you have OBS downloaded with the following configuration:

  1. Have a screen capture source recording your whole main screen.
  2. Enable desktop audio and mute microphone.
  3. Make sure the default websocket is enabled.

More detailed instructions for OBS setup and installation located here.

If you are on MacOS, make sure to enable to the following Privacy & Security permissions before running the app:

  1. Accessibility (for playing back actions)
  2. Input Monitoring (for reading keyboard inputs)

Make sure to accept all other security permission dialogues to ensure that the app works properly.

Build from source

Have Python >=3.11.

Clone this repo and cd into it:

$ git clone https://github.com/TheDuckAI/DuckTrack
$ cd DuckTrack

Install the dependencies for this project:

$ pip install -r requirements.txt

Build the application:

$ python3 build.py

The built application should be located in the generated dist directory. After this, follow the remaining relevant setup instructions.

Running the App

You can run the app like any other desktop app on your computer. If you decided to not download the app or build it from source, just run python main.py and it should work the same. You will be interacting with the app through an app tray icon or a small window.

Recording

From the app tray or GUI, you can start and stop a recording as well as pause and resume a recording. Pausing and resuming is important for when you want to hide sensitive information like credit card of login credentials. You can optionally name your recording and give it a description upon stopping a recording. You can also view your recordings by pressing the "Show Recordings" option.

Playback

You can playback a recording, i.e. simulate the series of events from the recording, by pressing "Play Latest Recording", which plays the latest created recording, or by pressing "Play Custom Recording", which lets you choose a recording to play. You can easily replay the most recently played recording by pressing "Replay Recording".

To stop the app mid-playback, just press shift+esc on your keyboard.

Misc

To quit the app, you just press the "Quit" option.

Recording Format

Recordings are stored in Documents/DuckTrack_Recordings. Each recording is a directory containing:

  1. events.jsonl file - sequence of all computer actions that happened. A sample event may look like this:
{"time_stamp": 1234567.89, "action": "move", "x": 69.0, "y": 420.0}
  1. metadata.json - stores metadata about the computer that made the recording
  2. README.md - stores the description for the recording
  3. MP4 file - the screen recording from OBS of the recording.

Here is a sample recording for further reference.

Technical Overview

TDB

Known Bugs

  • After doing lots of playbacks on macOS, a segfault will occur.
  • Mouse movement is not captured when the current application is using raw input, i.e. video games.
  • OBS may not open in the background properly on some Linux machines.

Things To Do

  • Add logging
  • Testing
  • CI (with builds and testing)
  • Add way to hide/show window from the app tray (and it saves that as a preference?)
  • Make saving preferences a thing generally, like with natural scrolling too

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.