A simple lite web screen recording application with real-time preview, time limits, and microphone control. Built with React (frontend) and FastAPI (backend).
- 🎥 Screen Recording - Capture your entire screen, specific window, or browser tab
- 📱 Real-time Preview - Floating preview window (like smartphone camera apps) showing exactly what you're recording
- ⏱️ Time Limits - Preset durations: 10s, 30s, 1min, 2min, 5min, or Unlimited
- 🎤 Microphone Control - Toggle microphone on/off before recording
- 💾 Save & Download - Save recordings as WebM files or download locally
- 🎨 Modern UI - Beautiful gradient design with smooth animations
- 📊 Progress Tracking - Visual timer and progress bar during recording
- 🔄 Auto-stop - Recording stops automatically when time limit is reached
- Node.js (v14 or higher)
- npm (v6 or higher)
- Python (v3.8 or higher)
- pip (Python package manager)
git clone https://github.com/yourusername/screen-recorder.git
cd screen-recorder# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the server
python main.pyThe backend will run on http://localhost:8000
# Open a new terminal and navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start the development server
npm startThe frontend will run on http://localhost:3000
screen-recorder/
├── backend/
│ ├── main.py # FastAPI server
│ ├── requirements.txt # Python dependencies
│ └── recordings/ # Saved recordings folder (auto-created)
│
├── frontend/
│ ├── public/
│ │ └── index.html # HTML template
│ ├── src/
│ │ ├── App.js # Main React component
│ │ ├── App.css # Styling
│ │ ├── index.js # React entry point
│ │ └── index.css # Global styles
│ └── package.json # Node dependencies
│
└── README.md
- Permission Request: When you click "Start Recording", the browser asks for permission to capture your screen/audio
- Screen Capture: The app uses
navigator.mediaDevices.getDisplayMedia()to capture screen content - Audio Capture: Optional microphone capture using
getUserMedia() - Stream Combination: Screen video and microphone audio are combined into a single MediaStream
- Recording: The MediaRecorder API records the stream in WebM format
- Real-time Preview: The same stream is displayed in a floating preview window
- Time Management: If a time limit is set, a timer tracks duration and auto-stops recording
- Save: Recorded chunks are combined into a Blob and sent to the backend or downloaded locally
- State Management: Uses React hooks (useState, useRef, useEffect)
- MediaRecorder API: Handles recording functionality
- Stream Management: Manages screen and audio streams
- Floating Preview: Minimizable picture-in-picture style preview
- POST /save-recording: Receives video blobs and saves to disk
- GET /download/{filename}: Serves recorded files
- GET /recordings: Lists all saved recordings
- CORS Enabled: Allows frontend to communicate with backend
Click on any time limit button:
- 10s - 10 seconds
- 30s - 30 seconds
- 1 min - 60 seconds
- 2 min - 120 seconds
- 5 min - 300 seconds
- Ilimitado - Unlimited (manual stop)
- Toggle the microphone button to enable/disable audio recording
- Green = Microphone ON
- Red = Microphone OFF
- Click "Iniciar Grabación" (Start Recording)
- Select the screen/window/tab you want to record
- Click "Share" or "Allow"
- Floating Preview Window: Shows exactly what's being recorded
- Timer Display: Shows remaining time (if limit set)
- Progress Bar: Visual indicator of recording progress
- Recording Indicator: Red blinking dot shows recording is active
- Minimize Preview: Click "−" to minimize preview to a small circle
- Auto-stop: Recording stops automatically when time limit is reached
- Manual stop: Click "Detener Grabación" (Stop Recording)
- Or close the screen sharing popup
- After stopping, a preview of your recording appears
- Click "Guardar Grabación" (Save Recording) to save to backend
- Or click "Descargar WebM" to download locally
| Method | Endpoint | Description |
|---|---|---|
| POST | /save-recording |
Save video recording |
| GET | /download/{filename} |
Download specific recording |
| GET | /recordings |
List all recordings |
cd frontend
npm install gh-pages --save-devAdd to package.json:
{
"homepage": "https://yourusername.github.io/screen-recorder",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
}Deploy:
npm run deploy- Push backend to GitHub repository
- Sign up at railway.app
- Click "New Project" → "Deploy from GitHub repo"
- Select your backend repository
- Railway auto-detects FastAPI and deploys
- Ensure you're using HTTPS or localhost
- Check browser permissions for screen capture
- Try using Chrome, Edge, or Firefox (Safari has limitations)
- Check browser console for errors
- Ensure camera/microphone permissions are granted
- Try refreshing the page
- Verify backend server is running on port 8000
- Check network tab for CORS errors
- Ensure
recordingsfolder has write permissions
- Check if microphone permission is granted
- Try toggling the microphone button off and on
- Check system audio settings
- React 18 - UI Framework
- MediaRecorder API - Recording functionality
- getDisplayMedia - Screen capture
- CSS3 - Animations and styling
- FastAPI - Web framework
- Uvicorn - ASGI server
- aiofiles - Async file operations
| Browser | Screen Capture | Audio Recording | Preview |
|---|---|---|---|
| Chrome | ✅ | ✅ | ✅ |
| Edge | ✅ | ✅ | ✅ |
| Firefox | ✅ | ✅ | ✅ |
| Safari | ✅ |
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
- MediaRecorder API documentation
- FastAPI framework
- React community
# Start Backend
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python main.py
# Start Frontend (in another terminal)
cd frontend
npm install
npm start
# Open browser at http://localhost:3000grabacion.1.webm
Made with ❤️ using React and FastAPI