#!/bin/bash if [[ -n "$1" ]]; then yt-dlp "$1" -i -o "%(title)s.%(ext)s" --cookies "~/.config/cookies.txt" && exit 0 || ffmpeg -i "$1" -c:v libx264 -preset slow -crf 22 "$(date +%s).mp4" && exit 0 || exit 1 else printf "[ Error ] Not enough arguments.\n" exit 1 fi