## 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. --- ``` ┌───────────────────────────────────────────────────────────────────┐ ├───────┐ │ │input 0├─┐ │ ├───────┘ │ ┌─────┐ ┌────┐ ┌──────┐ ┌─────────┐ │ │ camera ├─►│scale├─►│crop├─►│filter├──────────────►│ overlay │ │ │ │ └─────┘ └────┘ └──────┘ │ ├─┐ │ │ │ ┌─────┐ ┌────┐ ┌────┐ ┌─────────┐ │ tmp2 │ │ │ │ bg ├─►│scale├─►│crop├───►│blur├─►│ overlay ├─►│ │ │ │ │ │ └─────┘ └────┘ └────┘ │ tmp1 │ └─────────┘ │ │ │ │ ┌─────┐ ┌────┐ │ │ │ │ │ main ╰─►│scale├─►│crop├───────────►│ │ ┌─────────┐ │ │ │ └─────┘ └────┘ └─────────┘ │ overlay │ │ │ ├───────┐ │ │◄┘ │ │input 1├───────────────────────────────────────────►│ │ │ ├───────┘ └┬────────┘ │ │ logo │ ┌────────┤ │ ╰───►│output 0│ │ └────────┤ └───────────────────────────────────────────────────────────────────┘ ``` ## Dependencies - [ImageMagick](https://imagemagick.org/) (`magick`) - [FFmpeg](https://ffmpeg.org/) Make sure they are installed before running the script. --- ## Setup ### 1. Clone the repository ```bash git clone https://github.com/HackmanClub/vertClip.git cd vertClip ``` --- ### 2. Install dependencies **Debian / Ubuntu:** ```bash sudo apt update sudo apt install ffmpeg imagemagick -y ``` **Fedora:** ```bash sudo dnf install ffmpeg ImageMagick -y ``` **Arch Linux:** ```bash sudo pacman -S ffmpeg imagemagick ``` --- ### 3. Make the script executable ```bash chmod +x vertClip.sh ``` --- ### 4. (Optional) Add to PATH ```bash 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.