Python code and shell scripts to help make video editing faster and easier...
Before using this code please read the project Disclaimer
If you find these tools useful then consider watching my other content and subscribing to my channel.
- Audio + Face Recognition Jumpcut
- Audio Jumpcut
- Audio + Template Matching Jumpcut
- Batch Burn Subtitles From SRT
- Batch Change Video Resolution With Blur
- Batch Convert Video Format
- Batch Generate Speech From Text
- Batch Merge Image And Audio
- Batch Merge Video And Audio
- Batch Translate YouTube Playlist
- Batch Translate YouTube Playlist With TTS
- Batch Translate YouTube Video
- Batch Translate YouTube Video With TTS
- Burn Subtitles From SRT
- Change Video Aspect Ratio
- Change Video Resolution With Black Borders
- Change Video Resolution With Blur
- Change Volume Amount
- Compress Audio File
- Convert Video Format
- Create Animated GIF
- Create Mobile Crossclip
- Create Pencil Sketch Video
- Create Vintage Video
- Crop Video
- Cut Video Start To Duration
- Cut Video Start To End Time
- Download You Tube Video
- Extract Audio From Video
- Extract Images From Video
- Face Recognition Jumpcut
- Face Swap (untested)
- Fix YouTube Subtitles
- Flip Video Horizontally
- Flip Video Vertically
- Generate Game Highlights
- Generate Speech From Text
- Generate Video Subtitles
- Get YouTube Video List
- LBRY Download YouTube Playlist
- LBRY Migrate YouTube Playlist
- LBRY Upload Video Folder
- Match Template Jumpcut
- Merge Audio Files
- Merge Image And Audio
- Merge Multiple Videos
- Merge Video And Audio
- Mirror Video Horizontally
- Mirror Video Vertically
- Normalize Audio
- Plot Sound Frames
- Plot Video Frames
- Remove Audio From Video
- Remove Video Background
- Resize Video By Height
- Resize Video By Width
- Reverse Video
- Rotate Video Clockwise
- Rotate Video Counterclockwise
- TikTok Text To Speech (from txt file)
- Translate YouTube Description
- Translate YouTube Transcript
- Zoompan Cut Video
- MacOS
- Linus
- Windows 8+ with Cygwin or Bash for Windows
- Windows 10/11 with WSL (Windows Subsystem for Linux)
To install WSL see the link below: https://docs.microsoft.com/en-us/windows/wsl/install
List of terminal emulated: https://www.jetbrains.com/help/pycharm/terminal-emulator.html#configure-the-terminal-emulator
However, PowerShell (powershell) & Command Prompt (cmd.exe) do not support the scripts I this project.
-
Python 3+ - Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
-
Googletrans - a free and unlimited python library that implemented Google Translate API
-
Imutils - A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, displaying Matplotlib images, sorting contours, detecting edges, and much easier with OpenCV and both Python 2.7 and Python 3.
-
Matplotlib - a comprehensive library for creating static, animated, and interactive visualizations in Python.
-
Numpy - the fundamental package for array computing with Python.
-
OpenCV - OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.
-
playsound - a pure Python, cross-platform, single function module with no dependencies for playing sounds.
-
pydub - a library for manipulating audio with a simple and easy high level interface.
-
pyttsx3 - a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.
-
Requests - a simple, yet elegant, HTTP library.
-
SpeechRecognition - Library for performing speech recognition, with support for several engines and APIs, online and offline.
To test for setup errors, simple type the following command and talk into your microphone to see if it translates your voice to text:
python -m speech_recognition
-
YouTube Transcript/Subtitle API - a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles, supports translating subtitles, and it does not require a headless browser, like other selenium based solutions do!
-
Spleeter
-
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Python
brew install python
-
PyCharm CE (Community Edition) - Free
PyCharm can be downloaded here: https://www.jetbrains.com/pycharm/download
-
Setup Project in pyCharm
When setting up the new project, be sure to create a new virtual environment with the Homebrew Python installation as the base interpreter, and check both "Inherit global site-packages, and "Make available to all projects."
-
Install Video-Tools by performing the following steps:
A. Select the pyCharm project directory
B. Issue the following command from the shell inside the project directory in Step A:
git clone https://github.com/bearcatjamboree/Video-Tools.git
C. Type the following command to install pre-requisite python modules:
pip install -r requirements.txt
D. To setup Spleeter on Non-M1 systems type the following command from the shell:
pip install spleeter
On Mac M1 system follow these steps:
NOTE: the Run->Edit Configurations menu can now be used to create references to the shell scripts to make them easily accessible through the pyCharm client.
-
Cascade Trainer GUI (Version 3.3.1 or better):
If you want to train your own Haar Cascade Classifiers then this GUI can help make training and testing much easier: https://drive.google.com/drive/folders/1kZDzGx_RKu3qH_QONSxksR7gfZReevMg
Install the GUI with Wineskin if on Mac/Linux. Wineskin can be downloaded and installed through HomeBrew using the following command:
brew install --no-quarantine gcenx/wine/unofficial-wineskin
For M1 installations, to use the RemoveVocals.sh or RemoveBackgroundMusic.sh you must enter:
conda activate spleeter
Note, this is only if you called the separate environment "spleeter."
If you attempt to use PyTTSx3 (text-to-speech) while the spleeter environment is active then you may have issues translating text-to-speech with macOS NSS. This was observed to be an issue with macOS on M1 though occurrences was somewhat random.
If you found these tools helpful then please consider subscribing to my YouTube channels: