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_key= # Initialize variables, in case we need them in debug_vars
aaxc_iv= # 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 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 library_file= # Libraryfile generated by mkb79/audible-cli
# ----- # -----
@ -92,6 +94,10 @@ while true; do
--author ) authorOverride="$2"; shift 2 ;; --author ) authorOverride="$2"; shift 2 ;;
# Ffmpeg path override # Ffmpeg path override
--ffmpeg-path ) ffmpegPath="$2"; shift 2 ;; --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. # Command synopsis.
-h | --help ) printf "$usage" $0 ; exit ;; -h | --help ) printf "$usage" $0 ; exit ;;
# Standard flag signifying the end of command line processing. # Standard flag signifying the end of command line processing.
@ -218,11 +224,11 @@ fi
# Use custom ffmpeg (and ffprobe) binary ( --ffmpeg-path flag) # Use custom ffmpeg (and ffprobe) binary ( --ffmpeg-path flag)
if [ -n "$ffmpegPath" ]; then if [ -n "$ffmpegPath" ]; then
FFMPEG="$ffmpegPath/ffmpeg" FFMPEG="$ffmpegPath/${ffmpegName}"
FFPROBE="$ffmpegPath/ffprobe" FFPROBE="$ffmpegPath/${ffprobeName}"
else else
FFMPEG="ffmpeg" FFMPEG="${ffmpegName}"
FFPROBE="ffprobe" FFPROBE="${ffprobeName}"
fi fi
debug_vars "ffmpeg/ffprobe paths" FFMPEG FFPROBE debug_vars "ffmpeg/ffprobe paths" FFMPEG FFPROBE

View File

@ -59,6 +59,8 @@ bash interactiveAAXtoMP3 [-a|--advanced] [-h|--help]
* **--use-audible-cli-data** Use additional data got with mkb79/audible-cli. See [below](#audible-cli-integration) for more info. Needed for the files in the `aaxc` format. * **--use-audible-cli-data** Use additional data got with mkb79/audible-cli. See [below](#audible-cli-integration) for more info. Needed for the files in the `aaxc` format.
* **--audible-cli-library-file** or **-L** Path of the library-file, generated by mkb79/audible-cli (`audible library export -o ./library.tsv`). Only available if `--use-audible-cli-data` is set. This file is required to parse additional metadata such as `$series` or `$series_sequence`. * **--audible-cli-library-file** or **-L** Path of the library-file, generated by mkb79/audible-cli (`audible library export -o ./library.tsv`). Only available if `--use-audible-cli-data` is set. This file is required to parse additional metadata such as `$series` or `$series_sequence`.
* **--ffmpeg-path** Set the ffmpeg/ffprobe binaries folder. Both of them must be executable and in the same folder. * **--ffmpeg-path** Set the ffmpeg/ffprobe binaries folder. Both of them must be executable and in the same folder.
* **--ffmpeg-name** Set a custom name for the ffmpeg binary. Must be executable and in path, or in custom path specified by --ffmpeg-path.
* **--ffprobe-name** Set a custom name for the ffprobe binary. Must be executable and in path, or in custom path specified by --ffmpeg-path.
## Options for interactiveAAXtoMP3 ## Options for interactiveAAXtoMP3
* **-a** or **--advanced** Get more options to choose. Not used right now. * **-a** or **--advanced** Get more options to choose. Not used right now.
@ -174,6 +176,12 @@ You can then tell AAXtoMP3 to use the compiled binaries with the `--ffmpeg-path`
You need to specify the folder where the ffmpeg and ffprobe binaries are. Make sure You need to specify the folder where the ffmpeg and ffprobe binaries are. Make sure
they are both executable. they are both executable.
If you have snapd installed, you can also install a recent version of 4.4 from the edge channel:
```
snap install ffmpeg --edge
```
In this case you will need to confiure a custom path _and_ binary name for ffprobe, `--ffmpeg-path /snap/bin/ --ffprobe-name ffmpeg.ffprobe`.
__Fedora__ __Fedora__
Fedora users need to enable the rpm fusion repository to install ffmpeg. Version 22 and upwards are currently supported. The following command works independent of your current version: Fedora users need to enable the rpm fusion repository to install ffmpeg. Version 22 and upwards are currently supported. The following command works independent of your current version: