#!/bin/bash
#
# Dumbass script to help turn Video into a 4chan compatible Soundpost format.
#
#clear
duration=${4} # MANUAL
#duration=$(ffprobe.exe -hide_banner -show_entries format=duration -v quiet -of csv="p=0" -i ${1} |tr -d $'\r') # AUTO CALC for full lenght video
#
bitrate=$(echo "((4*8*1020*1020)) / ${duration}" |bc)
bitrate=$(echo "${bitrate::-3}")
#
filtercomplex=${5} # Variable Input
#
# Useage: INPUT NAME START DURATION FILTER
echo "ffmpeg.exe -hide_banner -loglevel warning -stats -i ${1} -ss ${3} -t ${4} -vn -c:a copy -y ${2}.aac | ffmpeg.exe -hide_banner -loglevel warning -stats -i ${1} -vf \"${filtercomplex}\" -ss ${3} -t ${4} -an -c:v libvpx-vp9 -row-mt 1 -threads 0 -deadline best -pix_fmt yuv420p10le -crf 20 -b:v ${bitrate}k -pass 1 -y ${2}.webm | ffmpeg.exe -hide_banner -loglevel warning -stats -i ${1} -vf \"${filtercomplex}\" -ss ${3} -t ${4} -an -c:v libvpx-vp9 -row-mt 1 -threads 0 -deadline best -pix_fmt yuv420p10le -crf 20 -b:v ${bitrate}k -pass 2 -y ${2}.webm | ffmpeg.exe -hide_banner -loglevel warning -stats -i ${1} -vf \"${filtercomplex}\" -ss ${3} -t ${4} -an -c:v libvpx-vp9 -lossless 1 -pix_fmt yuv420p10le -deadline best -y LL_${2}.webm" | clip.exe # OR "xclip -selection clipboard" when using outside of WLS
#
Edit
Pub: 20 Feb 2024 17:10 UTC
Views: 46