#!/bin/env bash
# Use whatever you want to prompt the user for input, I have a wrapper for rofi that accepts a prompt name as an argument.
rofiname=$(echo $(rofi_input "NAME WEBM").webm)
ffmpeg -i "$2" \
-c:v libvpx-vp9 -b:v 0 -crf "$1" -pass 1 -an -row-mt 1 -threads 12 -speed 4 -tile-columns 2 -frame-parallel 0 -f null /dev/null && \
ffmpeg -i "$2" \
-c:v libvpx-vp9 -b:v 0 -crf "$1" -pass 2 -an -row-mt 1 -threads 12 -speed 1 -tile-columns 2 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 "$rofiname"
include in fzf w/
alt-m:execute<ffmpeg_webm {q} {r+}>
uses the crf value typed into the search bar and converts the selected video to webm