A modern web application to adjust SRT subtitle timings. Shift entire files or specific portions with an intuitive, privacy-focused interface, works on windows, linux and mac.
- ๐ Full Shift - Adjust all subtitle timings at once
- ๐ฏ Partial Shift - Shift only subtitles within a specific time range
- ๐๏ธ Live Preview - Compare original vs shifted timestamps before downloading
- ๐ Dark/Light Mode - Beautiful UI with theme persistence
- ๐ Privacy First - Files processed in-memory, never stored on server
- ๐ฑ Responsive - Works on desktop, tablet, and mobile
- Node.js 18.0 or higher
- npm (comes with Node.js)
# Clone the repository
git clone https://github.com/DevWael/subtitle-shifter.git
# Navigate to the project
cd subtitle-shifter
# Install dependencies
npm install
# Start the server
npm startOpen http://localhost:3000 in your browser.
# Start server with auto-reload
npm run dev:server
# In another terminal, watch for CSS changes
npm run css:watchThe easiest way to run the app - no Node.js required!
# Clone the repository
git clone https://github.com/DevWael/subtitle-shifter.git
cd subtitle-shifter
# Run with Docker Compose
docker compose up -d
# Or build and run manually
docker build -t subtitle-shifter .
docker run -p 3000:3000 subtitle-shifterOpen http://localhost:3000 in your browser.
To stop: docker compose down
- Upload - Drag and drop an
.srtfile or click to browse - Choose Mode
- Full Shift: Adjust all subtitles
- Partial Shift: Set a time range (e.g., 00:10:00 to 00:20:00)
- Set Offset - Enter milliseconds (positive = delay, negative = earlier)
- Preview - Review the changes with side-by-side comparison
- Download - Get your shifted subtitle file
| Problem | Solution |
|---|---|
| Subtitles appear 2 seconds early | Set offset to +2000 |
| Subtitles appear 500ms late | Set offset to -500 |
| Only half the movie is out of sync | Use Partial Shift with time range |
- Backend: Node.js, Express.js 4.x
- Frontend: Vanilla JavaScript (ES6+)
- Styling: Tailwind CSS 3.x
- SRT Parsing: subtitle npm package
- File Handling: Multer (memory storage)
subtitle-shifter/
โโโ server.js # Express entry point
โโโ src/
โ โโโ routes/
โ โ โโโ api.js # REST API endpoints
โ โโโ utils/
โ โโโ srt-shifter.js # SRT parsing & shifting logic
โโโ public/
โ โโโ index.html # Main page
โ โโโ css/
โ โ โโโ input.css # Tailwind source
โ โ โโโ styles.css # Compiled CSS
โ โโโ js/
โ โโโ app.js # Frontend logic
โโโ test-files/
โโโ sample.srt # Sample file for testing
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/upload |
Upload and parse SRT file |
POST |
/api/shift |
Shift subtitles and get preview |
POST |
/api/download |
Generate shifted SRT file |
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.
- subtitle - Excellent SRT parsing library
- Tailwind CSS - Utility-first CSS framework
- Express.js - Fast, unopinionated web framework
Made with โค๏ธ by Ahmad Wael