cursor-recorder
Records mouse movement to a file and opens it in After Effects. Use with OBS Studio as an external Python script or if you prefer a more manual approach, using the standalone Python script. Then use the After Effects script to import the generated cursor movement data. This is an open-source project you can check out on GitHub.
How to use
With OBS (manually)
more examples on GitHub
SMOOTH FOLLOW (that's from the demo)
CURSOR IN CENTER
Development
Python packages
The script requires:
You can install them using a single button click in the script's settings when using the OBS script.
Otherwise, install them yourself using this command if you're planning on using the standalone version:
License
Mozilla Public License Version 2.0
Records mouse movement to a file and opens it in After Effects. Use with OBS Studio as an external Python script or if you prefer a more manual approach, using the standalone Python script. Then use the After Effects script to import the generated cursor movement data. This is an open-source project you can check out on GitHub.
How to use
With OBS (manually)
- Import the
cursor_recorder_for_obs.py
in OBS. (You need to do this just once).- 2. Go to
Tools -> Scripts
. - Make sure you have a Python interpreter set in your settings (
Scripts -> Python Settings
). - Click the icon (Add Scripts) and select the
cursor_recorder_for_obs.py
. - Make sure the script is enabled. (It is by default).
- Click
Install Python modules
if you don't havepyautogui
and/orkeyboard
packages installed.
- 2. Go to
- You're ready to start recording. The *.txt will be saved in the same place as your video with the same name.
- Stop the recording.
- Import the
cursor_recorder_for_afterfx.jsx
in After Effects. (You need to do this just once).- Open After Effects.
- Go to
File -> Scripts -> Import from file
. - Choose the
cursor_recorder_for_afterfx.jsx
. - If the
cursor_recorder_for_afterfx.jsx
doesn't appear inFile -> Scripts
restart After Effects.
- Run the
cursor_recorder_for_afterfx.jsx
script.- Make sure you have a composition open.
- Click
File -> Scripts -> cursor_recorder_for_afterfx.jsx
. - Choose the file with the cursor movement data.
- Your animated null is created.
- Do whatever you want with it from here. Check out the Examples section below!
more examples on GitHub
SMOOTH FOLLOW (that's from the demo)
JavaScript:
thisLayerScale = transform.scale;
cursorX = thisComp.layer("cursor-recorder-movement").transform.position[0];
cursorY = thisComp.layer("cursor-recorder-movement").transform.position[1];
xvalue = linear(thisLayerScale[0], 100, 200, cursorX + 960, 1920);
yvalue = linear(thisLayerScale[0], 100, 200, cursorY + 540, 1080);
[xvalue - cursorX, yvalue - cursorY];
JavaScript:
// Expression set on video's anchor point
thisComp.layer("cursor-recorder-movement").transform.position;
Development
Python packages
The script requires:
pyautogui
and keyboard
. You can install them using a single button click in the script's settings when using the OBS script.
Otherwise, install them yourself using this command if you're planning on using the standalone version:
Bash:
$ pip install -r requirements.txt
License
Mozilla Public License Version 2.0