A lightweight application for downloading YouTube videos and creating clips from specific segments.
- User-friendly GUI: Simple interface for downloading and clipping videos
- Command-line Interface: For automation and scripting
- Multiple Clip Support: Create multiple clips from a single video
- Clip Concatenation: Option to join multiple clips into a single video
- Playback Speed Control: Adjust the speed of your clips
- Flexible Time Format: Input times in seconds or MM:SS format
- Configurable Output Directory: Choose where to save your clips
- Python 3.6 or higher
- Required Python packages:
- moviepy
- pytube
- tkinter (usually comes with Python)
- Clone this repository or download the source code
- Install the required packages:
pip install moviepy pytube
Run the application without any arguments to launch the GUI:
python vidclipper.py
- Enter a YouTube URL
- Set your desired output directory
- Add clip segments by entering start and end times
- Adjust playback speed if needed
- Choose whether to concatenate clips
- Click "Download & Process" to start
For command-line usage, provide arguments:
python vidclipper.py [YouTube URL] [start1] [end1] [start2] [end2] ... [options]
Download a video and create a clip from 30 seconds to 1 minute:
python vidclipper.py https://www.youtube.com/watch?v=dQw4w9WgXcQ 30 60
Create multiple clips and concatenate them:
python vidclipper.py https://www.youtube.com/watch?v=dQw4w9WgXcQ 30 60 90 120 --conc
Use time format (MM:SS-MM:SS):
python vidclipper.py https://www.youtube.com/watch?v=dQw4w9WgXcQ --timecode-format "0:30-1:00, 1:30-2:00"
Change playback speed:
python vidclipper.py https://www.youtube.com/watch?v=dQw4w9WgXcQ 30 60 --speed 1.5
Specify output directory:
python vidclipper.py https://www.youtube.com/watch?v=dQw4w9WgXcQ 30 60 --output-dir /path/to/output
--speed
: Change playback speed (default: 1.0)--conc
: Concatenate all clips into a single video--output-dir
: Specify the output directory--timecode-format
: Use time format "MM:SS-MM:SS, MM:SS-MM:SS" instead of raw seconds
- Download Errors: Make sure you have a stable internet connection and the video is available
- Processing Errors: Ensure you have sufficient disk space and the correct permissions
- Invalid Time Format: Check that your time inputs are in the correct format
This project is open source and available under the MIT License.
Contributions are welcome! Feel free to submit a pull request or open an issue.