A Next.js application that allows users to create and manage time-based annotations on a video. Users can add text labels or icons that appear at specific coordinates and time intervals during video playback.
Check out the deployed project here:
Video Annotations on Vercel
- Interactive Video Player: Plays a sample video (Big Buck Bunny) to visualize annotations in real-time.
- Dynamic Annotations:
- Text: Add custom text labels.
- Icons: Choose from a predefined set of icons (🔴, 🔵,
⚠️ , ✅, etc.).
- Precise Timing:
- Set Start and End times using
MM:SSformat. - Validation ensures annotations do not exceed the video's total duration.
- Set Start and End times using
- Responsive Positioning:
- Position elements using X and Y percentages (0-100%).
- Elements are responsive and stay correctly positioned relative to the video size.
- CRUD Operations: Add, Edit, and Delete annotations dynamically.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Deployment: Vercel
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/video-annotations.git cd video-annotations -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Run the development server:
npm run dev
-
Open the app: Open http://localhost:3000 with your browser to see the result.
- Add an Entry:
- Enter X and Y coordinates (0-100%).
- Select Element Type (Text or Icon).
- Enter content or pick an icon.
- Set Time Start and Time End (e.g.,
00:05to00:10). - Click Add.
- Watch: Play the video. The annotation will appear at the specified location during the configured time window.
- Manage: Use the table below the form to Edit or Delete existing annotations.