diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index 3a2e271d..8edeccba 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -83,6 +83,7 @@ setup_config_interactive() { METADATA_PATH=$DATA_PATH/metadata CONFIG_PATH=$DATA_PATH/config FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg + FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe PORT=$PORT" echo "$config_text" @@ -105,6 +106,7 @@ setup_config() { METADATA_PATH=$DEFAULT_DATA_PATH/metadata CONFIG_PATH=$DEFAULT_DATA_PATH/config FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg + FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe PORT=$DEFAULT_PORT" echo "$config_text" diff --git a/index.js b/index.js index 9b1acfda..f6c26bba 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ if (isDev) { process.env.METADATA_PATH = devEnv.MetadataPath process.env.AUDIOBOOK_PATH = devEnv.AudiobookPath process.env.FFMPEG_PATH = devEnv.FFmpegPath + process.env.FFPROBE_PATH = devEnv.FFProbePath } const PORT = process.env.PORT || 80 diff --git a/server/utils/prober.js b/server/utils/prober.js index 9929fff5..c912875c 100644 --- a/server/utils/prober.js +++ b/server/utils/prober.js @@ -256,7 +256,11 @@ function parseProbeData(data, verbose = false) { // Updated probe returns AudioProbeData object function probe(filepath, verbose = false) { - return ffprobe(filepath) + var options = {} + if (process.env.FFPROBE_PATH) { + options.path = process.env.FFPROBE_PATH + } + return ffprobe(filepath, options) .then(raw => { var rawProbeData = parseProbeData(raw, verbose) if (!rawProbeData || !rawProbeData.audio_stream) {