From 67ef7d128f19ad695732f99bcfd7505607d18210 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 3 Jul 2024 18:28:37 -0700 Subject: [PATCH] Allow old usage of making the video bitrate something specific. --- bashrc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bashrc.sh b/bashrc.sh index c14abc1..34af13b 100644 --- a/bashrc.sh +++ b/bashrc.sh @@ -57,9 +57,9 @@ alias install="pkg install" # Optimize the bitrate and audio levels for an edited video. function process-video-usage { - echo "USAGE: process-video oldFile newFile [videoBitrate] [audioBitrate] [sizeRating]" + echo "USAGE: process-video oldFile newFile [videoBitrate] [audioBitrate] [sizeRating] [numPasses] [forceBitrate]" echo -n "Purpose: Call ffmpeg with preferred video posting settings. " - echo -n "Bitrates default to 2000k and 192k, size is 720. " + echo -n "Bitrates default to 2000k and 192k, size is 720, passes is 1, and force is N." echo "These work well on Odysee and are fairly small as backups." echo "Examples:" echo "- Create a small file for quick streaming." @@ -75,6 +75,7 @@ function process-video { audio="$4" size="$5" passes="$6" + force="$7" # Validations if [[ -z $file || ! -e $file ]]; then @@ -119,6 +120,10 @@ function process-video { passes=2 pass="-pass 2" fi + + if [[ $force == "Y" ]]; then + video="${video//maxrate/b:v}" + fi ## Main ## # More information on two-pass processing with ffmpeg