Allow old usage of making the video bitrate something specific.

This commit is contained in:
Hyperling 2024-07-03 18:28:37 -07:00
parent 3bb4e2794b
commit 67ef7d128f

View File

@ -57,9 +57,9 @@ alias install="pkg install"
# Optimize the bitrate and audio levels for an edited video. # Optimize the bitrate and audio levels for an edited video.
function process-video-usage { 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 "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 "These work well on Odysee and are fairly small as backups."
echo "Examples:" echo "Examples:"
echo "- Create a small file for quick streaming." echo "- Create a small file for quick streaming."
@ -75,6 +75,7 @@ function process-video {
audio="$4" audio="$4"
size="$5" size="$5"
passes="$6" passes="$6"
force="$7"
# Validations # Validations
if [[ -z $file || ! -e $file ]]; then if [[ -z $file || ! -e $file ]]; then
@ -120,6 +121,10 @@ function process-video {
pass="-pass 2" pass="-pass 2"
fi fi
if [[ $force == "Y" ]]; then
video="${video//maxrate/b:v}"
fi
## Main ## ## Main ##
# More information on two-pass processing with ffmpeg # More information on two-pass processing with ffmpeg
# https://cinelerra-gg.org/download/CinelerraGG_Manual/Two_pass_Encoding_with_FFmp.html # https://cinelerra-gg.org/download/CinelerraGG_Manual/Two_pass_Encoding_with_FFmp.html