Utility for making good looking vertical clips. Output is 1080p mp4 file.
|
|
||
|---|---|---|
| LICENSE | ||
| README.md | ||
| vertClip.sh | ||
Description
Utility for making good-looking vertical video clips.
Configure camera coordinates and other important values inside the script.
The output is a 1080p vertical MP4 file.
Dependencies
- ImageMagick (
magick) - FFmpeg
Make sure they are installed before running the script.
Setup
1. Clone the repository
git clone https://github.com/HackmanClub/vertClip.git
cd vertClip
2. Install dependencies
Debian / Ubuntu:
sudo apt update
sudo apt install ffmpeg imagemagick -y
Fedora:
sudo dnf install ffmpeg ImageMagick -y
Arch Linux:
sudo pacman -S ffmpeg imagemagick
3. Make the script executable
chmod +x vertClip.sh
4. (Optional) Add to PATH
sudo mv vertClip.sh /usr/local/bin/vertClip
Usage
Usage: vertClip [OPTIONS]
Options:
-v FILE Video file
-l FILE Logo file
-c NUM Blur camera video border thickness
-k Show Kill Feed (eg. Counter-Strike, EFT:Arena)
-h Show this help
Examples:
vertClip -c 10 -l logo.png -v input.mp4
Camera
I personally use a circular camera that has blured border. This is achieved by filtering my 16:9 camera to become a circle. The script uses my setup, and calculates mudle of 16:9 camera.
ccb=30 # Camera border (in case of blurry camera frame)
cch=360 # Height of video
ccw=640 # Width of video
ccd=$(((ccw-cch)/2)) # Difference between W and H divided by two
ccy=$((600+ccb)) # Y value of top left corner
ccx=$((1920+ccd+ccb)) # X value of top left corner
ccr=$((cch-ccb-ccb)) # Diameter of camera
ccn=2560 # Normalization value (what are values above expecting)
For cch, ccw, ccy and ccx use the values from size and position of the Camera "Edit Transform" from within OBS.