xxwhirlpool
·
2026-03-18
snsclip
1#!/usr/bin/env bash
2#
3# yt-dlp wrapper for quickly making clips
4# to share on social media
5#
6# usage:
7# snsclip YT_LINK "desired title of output file"
8
9URL="$1"
10FILE_OUT_NAME="$2"
11
12if [[ $# -eq 0 || $# -ne 2 ]]; then
13 echo "Usage: snsclip [URL] [FILENAME]"
14 exit 1
15fi
16
17# best audio + best video under 1080p (excl. AI upscale) && incl. file extension in output
18yt-dlp -f "ba+bv*[height<=1080p][format_id!*=-sr]" -o "$FILE_OUT_NAME.%(ext)s" "$URL" --merge-output-format mp4