- Implemented a standalone video editor for editing generated shorts. - Integrated OpenCV for basic video playback and MoviePy for advanced editing features. - Added functionalities including video trimming, speed control, volume adjustment, fade effects, and text overlays. - Created a modern GUI using Tkinter with responsive design and a professional color scheme. - Included detailed README documentation outlining features, usage, and installation requirements.
3.1 KiB
3.1 KiB
Professional Video Editor
A standalone video editor with timeline controls and real-time preview, designed specifically for editing generated shorts.
Features
✅ Working Features (OpenCV Backend)
- 🎬 Video Playback: Load and play video files with timeline controls
- 📺 Real-time Preview: Professional video player with frame-by-frame seeking
- ⏯️ Timeline Controls: Play, Pause, Stop buttons with synchronized video playback
- 🕒 Time Display: Current time and total duration with precise seeking
- 📊 Interactive Timeline: Click and drag to seek to specific time positions
- 🎯 Frame-accurate Seeking: Navigate to exact frames using the timeline
🔧 Advanced Features (Requires MoviePy)
- ✂️ Video Trimming: Cut videos to specific time ranges
- ⚡ Speed Control: Adjust playback speed (0.25x to 3.0x)
- 🔊 Volume Adjustment: Control audio levels (0x to 2.0x)
- 🌅 Fade Effects: Add professional fade in/out transitions
- 📝 Text Overlays: Add custom text with positioning
- 💾 Video Export: Save edited videos in MP4 format
Usage
From Main Application
- Run
python Main.py - Click "✏️ Edit Generated Shorts" button
- Select a video from your shorts folder or browse for any video file
Standalone Mode
- Run
python video_editor.py - The editor will open directly
Installation Requirements
Basic Functionality (OpenCV)
pip install opencv-python pillow
Full Functionality (MoviePy)
pip install moviepy opencv-python pillow
How to Use
- Load Video: Click "📁 Select Video" to choose a video file
- Navigate: Use timeline controls (Play/Pause/Stop) or click on timeline to seek
- Edit (if MoviePy available):
- Adjust trim start/end times and click "✂️ Apply Trim"
- Change speed with slider and click "⚡ Apply Speed"
- Adjust volume and click "🔊 Apply Volume"
- Add text overlay and click "📝 Add Text"
- Apply fade effects with "🌅 Add Fade In/Out"
- Export: Click "💾 Export Video" to save your changes
Timeline Controls
- ▶️ Play: Start video playback and timeline animation
- ⏸️ Pause: Pause both video and timeline
- ⏹️ Stop: Stop and return to beginning
- Timeline Click: Seek to specific time position
- Time Display: Shows current time / total duration
Notes
- The editor automatically detects available libraries and adjusts functionality
- Without MoviePy, you get a professional video player with timeline controls
- With MoviePy, you get full editing capabilities
- All timeline controls are synchronized with actual video playback
- The interface is responsive and works with different window sizes
File Support
Supports common video formats: MP4, AVI, MOV, MKV, WMV, FLV, WEBM
Architecture
The editor is built with:
- Tkinter: Modern GUI with professional styling
- OpenCV: Video loading and frame display (always available)
- MoviePy: Advanced video editing features (optional)
- PIL: Image processing and display
- Threading: Non-blocking video playback and timeline updates