Utility for making good looking vertical clips. Output is 1080p mp4 file.
Find a file
2026-03-23 01:54:19 +02:00
LICENSE Initial commit 2026-02-22 22:09:01 +02:00
README.md Added diagram explanation 2026-03-23 01:54:19 +02:00
vertClip.sh Add vertClip.sh 2026-02-22 22:40:20 +02:00

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

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.