feat: Add support for ffmpeg via snap package, requires ability to specify custom ffmpeg binary names if required

closes: https://github.com/KrumpetPirate/AAXtoMP3/issues/200
This commit is contained in:
jcat
2022-02-06 00:03:57 +00:00
parent c9bcf2326b
commit 1ce836f5a2
2 changed files with 18 additions and 4 deletions

View File

@ -35,6 +35,8 @@ audibleCli=0 # Default off, Use additional data gathered from mkb
aaxc_key= # Initialize variables, in case we need them in debug_vars
aaxc_iv= # Initialize variables, in case we need them in debug_vars
ffmpegPath= # Set a custom path, useful for using the updated version that supports aaxc
ffmpegName=ffmpeg # Set a custom ffmpeg binary name, useful tailoring to local setup
ffprobeName=ffprobe # Set a custom ffprobe binary name, useful tailoring to local setup
library_file= # Libraryfile generated by mkb79/audible-cli
# -----
@ -92,6 +94,10 @@ while true; do
--author ) authorOverride="$2"; shift 2 ;;
# Ffmpeg path override
--ffmpeg-path ) ffmpegPath="$2"; shift 2 ;;
# Ffmpeg name override
--ffmpeg-name ) ffmpegName="$2"; shift 2 ;;
# Ffprobe name override
--ffprobe-name ) ffprobeName="$2"; shift 2 ;;
# Command synopsis.
-h | --help ) printf "$usage" $0 ; exit ;;
# Standard flag signifying the end of command line processing.
@ -218,11 +224,11 @@ fi
# Use custom ffmpeg (and ffprobe) binary ( --ffmpeg-path flag)
if [ -n "$ffmpegPath" ]; then
FFMPEG="$ffmpegPath/ffmpeg"
FFPROBE="$ffmpegPath/ffprobe"
FFMPEG="$ffmpegPath/${ffmpegName}"
FFPROBE="$ffmpegPath/${ffprobeName}"
else
FFMPEG="ffmpeg"
FFPROBE="ffprobe"
FFMPEG="${ffmpegName}"
FFPROBE="${ffprobeName}"
fi
debug_vars "ffmpeg/ffprobe paths" FFMPEG FFPROBE