ShortGenerator/VIDEO_EDITOR_README.md
klop51 809e768cae Add Professional Video Editor with timeline controls and real-time preview
- 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.
2025-08-10 21:05:36 +02:00

86 lines
3.1 KiB
Markdown

# 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
1. Run `python Main.py`
2. Click "✏️ Edit Generated Shorts" button
3. Select a video from your shorts folder or browse for any video file
### Standalone Mode
1. Run `python video_editor.py`
2. The editor will open directly
## Installation Requirements
### Basic Functionality (OpenCV)
```bash
pip install opencv-python pillow
```
### Full Functionality (MoviePy)
```bash
pip install moviepy opencv-python pillow
```
## How to Use
1. **Load Video**: Click "📁 Select Video" to choose a video file
2. **Navigate**: Use timeline controls (Play/Pause/Stop) or click on timeline to seek
3. **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"
4. **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