Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #201 from nysasounds/ffmpeg-from-snap
Browse files Browse the repository at this point in the history
feat: Add support for ffmpeg via snap package
  • Loading branch information
KrumpetPirate authored Feb 6, 2022
2 parents bf7d405 + 1ce836f commit 9a1f0fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 10 additions & 4 deletions AAXtoMP3
Original file line number Diff line number Diff line change
Expand Up @@ -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

# -----
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,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.
* **--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-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
* **-a** or **--advanced** Get more options to choose. Not used right now.
Expand Down Expand Up @@ -173,6 +175,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
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 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:
Expand Down

0 comments on commit 9a1f0fa

Please sign in to comment.