Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Video Trimmer with AI Features

A modern, full-stack video trimming application with AI-powered transcription and summarization capabilities. Built with React, Node.js, FFmpeg, and Groq AI.

Video Trimmer Banner AI Powered License

✨ Features

Core Video Processing

  • 🎬 Video Upload & Preview - Drag-and-drop interface with real-time preview
  • βœ‚οΈ Precision Trimming - Interactive dual-slider for frame-accurate trimming
  • ⚑ Fast Processing - FFmpeg with input-seeking optimization for instant trim
  • πŸ“₯ Direct Download - One-click download of trimmed videos

AI-Powered Features

  • 🎀 Multi-Language Transcription - Convert speech to text using Groq's Whisper Large V3 (supports all languages)
  • ✨ AI Summarization - Generate concise summaries with Groq qwen3.6-27b (bullet points or paragraph format)
  • πŸ’Ύ Smart Caching - Automatic transcription/summary caching to save API quota
  • πŸ”„ Real-time Processing - Live progress indicators for all AI operations

UI/UX

  • 🎨 Premium Glassmorphism Design - Modern, polished interface with smooth animations
  • πŸ“± Fully Responsive - Works seamlessly on desktop, tablet, and mobile
  • πŸŒ™ Collapsible Panels - Clean, organized layout with expandable sections
  • πŸ“‹ Copy to Clipboard - Easy sharing of transcriptions

πŸ› οΈ Tech Stack

Frontend

  • React - UI framework
  • Vite - Build tool and dev server
  • Framer Motion - Smooth animations
  • Tailwind CSS - Utility-first styling
  • Nouislider - Custom range slider
  • Axios - HTTP client

Backend

  • Node.js - Runtime environment
  • Express - Web framework
  • FFmpeg - Video/audio processing
  • Multer - File upload handling
  • Groq SDK - AI API integration

AI Services

  • Groq Whisper Large V3 - Speech-to-text transcription
  • Groq Qwen3.6-27b - Text summarization

πŸ“‹ Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • FFmpeg (bundled via ffmpeg-static)
  • Groq API Key (Get one free here)

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/YOUR_USERNAME/Video-Trimmer-with-AI-Features.git
cd video-trimmer

2. Install Dependencies

Backend:

cd server
npm install

Frontend:

cd ../client
npm install

3. Configure Environment Variables

Create server/.env file:

GROQ_API_KEY=your_groq_api_key_here
PORT=3000
NODE_ENV=development

4. Run the Application

Start Backend (Terminal 1):

cd server
npm run dev

Server runs on http://localhost:3000

Start Frontend (Terminal 2):

cd client
npm run dev

Frontend runs on http://localhost:5173

πŸ“– Usage

Basic Video Trimming

  1. Click Upload Video or drag and drop a video file
  2. Use the dual-slider to select trim range
  3. Click Trim Video to process
  4. Download your trimmed video

AI Transcription

  1. Upload a video
  2. Expand the Transcription panel
  3. Click Start Transcription
  4. Wait 10-30 seconds (depending on video length)
  5. View and copy the full transcription

AI Summary

  1. After transcribing (or auto-transcribe if not done)
  2. Choose format: Bullet Points or Paragraph
  3. Click Generate Summary
  4. View AI-generated summary in chosen format

🎯 API Limits (Groq Free Tier)

Feature Daily Limit Per Minute
Transcription 2,000 requests 30 requests
Summarization 14,400 requests 30 requests
Audio Size 25MB max -
Video Size 50MB recommended -

πŸ“ Project Structure

video-trimmer/
β”œβ”€β”€ client/                 # Frontend React app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ VideoUploader.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ VideoPlayer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ TrimControls.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ TranscriptionPanel.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SummaryPanel.jsx
β”‚   β”‚   β”‚   └── AIFeatures.jsx
β”‚   β”‚   β”œβ”€β”€ services/       # API clients
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js
β”‚   β”‚   β”‚   └── aiApi.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── index.css
β”‚   └── package.json
β”œβ”€β”€ server/                 # Backend Node.js app
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ video.routes.js # Video processing endpoints
β”‚   β”‚   └── ai.routes.js    # AI feature endpoints
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ ffmpegHelper.js        # Video/audio processing
β”‚   β”‚   β”œβ”€β”€ audioExtractor.js      # Audio extraction
β”‚   β”‚   β”œβ”€β”€ groqService.js         # Groq AI integration
β”‚   β”‚   └── transcriptionCache.js  # In-memory caching
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── upload.middleware.js
β”‚   β”œβ”€β”€ uploads/            # Temporary file storage
β”‚   β”œβ”€β”€ server.js
β”‚   └── package.json
└── README.md

πŸ”§ Key Implementation Details

FFmpeg Optimization

  • Input Seeking (-ss before -i) for instant seeking
  • Stream Copy (-c copy) for lossless, fast trimming
  • Web Optimization (-movflags +faststart) for streaming

AI Integration

  • Whisper Large V3 - Multi-language support (141 languages)
  • qwen/qwen3.6-27b - Advanced summarization with custom prompts
  • Smart Caching - Reduces API calls and improves response time
  • Automatic Cleanup - Audio files deleted immediately after transcription

State Management

  • Shared State - Transcription shared between panels to avoid duplicate calls
  • Loading States - Real-time feedback for all async operations
  • Error Handling - Comprehensive error messages with retry options

πŸ› Troubleshooting

"GROQ_API_KEY is missing"

  • Ensure .env file exists in server/ directory
  • Verify API key is correct (starts with gsk_)
  • Restart the server after adding the key

"Video too large" Error

  • Compress video before upload (use HandBrake, etc.)
  • Trim the video first to reduce file size
  • Recommended: Keep videos under 50MB

Download Hangs Forever

  • This is usually a Windows file lock issue
  • The code includes retry logic (waits up to 5 seconds)
  • If it persists, check antivirus settings

πŸš€ Future Enhancements

  • Multiple video format support (WebM, AVI, MKV)
  • Batch processing for multiple videos
  • Cloud storage integration (AWS S3, Google Drive)
  • Custom AI prompts for summaries
  • Video compression before trimming
  • Timestamp-based chapter detection
  • Speaker diarization (identify multiple speakers)

πŸ“„ License

MIT License - feel free to use this project for your portfolio!

πŸ™ Acknowledgments

πŸ‘€ Author

Your Name


⭐ If you found this project helpful, please give it a star!

About

A modern, full-stack video trimming application with AI-powered transcription and summarization capabilities. Built with React, Node.js, FFmpeg, and Groq AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages