A Python application that creates a video simulation of code being typed in a Visual Studio Code-like interface, complete with a Windows XP-style background.
- Simulates typing code in a VSCode-like interface
- Windows XP-style desktop background
- Realistic window chrome with title bar and control buttons
- Line numbers
- Customizable typing speed
- Outputs to AVI video format
- Python 3.9+
- OpenCV (4.8.0)
- NumPy (1.24.0)
- Pygame (2.5.0)
- Create a virtual environment and activate it:
python -m venv env
source env/bin/activate # On Windows use: env\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Place your Python source file in the project directory
- Run the script:
python capture.py
-
Follow the prompts:
- Enter the source file name (including .py extension)
- Enter the output file name (without extension)
- Enter the recording duration in seconds
-
Wait for the process to complete. The output will be saved as an AVI video file.
You can test the application with the included example file:
python capture.py
Then enter:
- Source file:
test.py
- Output file:
demo
- Duration:
10
This will create a video showing the typing of a simple "Hello World" program.
.
├── capture.py # Main script for video recording
├── vscode_mockup.py # VSCode interface simulator
├── test.py # Example Python file
├── media/ # Assets directory
│ ├── CascadiaCode.ttf # VSCode font
│ └── windows-xp-wallpaper.jpeg # Background image
├── requirements.txt # Project dependencies
└── README.md # Documentation
You can modify the following parameters in the code:
- Window size: Change
width
andheight
in VSCodeMockup class (default: 1280x720) - Typing speed: Modify
delay
parameter in simulate_typing method (default: 0.1s) - Font size: Adjust font size in VSCodeMockup class (default: 14px)
- Window margins and dimensions in the VSCodeMockup class
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Visual Studio Code for inspiration
- Microsoft Windows XP for the nostalgic background
- Cascadia Code font by Microsoft