Revert FFmpeg path to full binary only; add separate FFprobe Binary Path field

This commit is contained in:
Forkless
2026-05-11 21:57:24 +02:00
parent 47e2407b38
commit 8f151daa25
27 changed files with 121 additions and 84 deletions
+13 -4
View File
@@ -529,10 +529,19 @@ class Transcriber {
return $resolved;
}
$cached = true;
$cached = true;
$settings = get_option( 'piperless_settings', [] );
$custom = $settings['piper_ffprobe_binary'] ?? '';
// Use the same directory as ffmpeg — wherever it was resolved,
// ffprobe is likely right next to it.
// 1. Try the configured ffprobe path.
if ( '' !== $custom ) {
if ( @file_exists( $custom ) && @is_executable( $custom ) ) {
$resolved = $custom;
return $resolved;
}
}
// 2. Try the same directory as resolved ffmpeg.
$ffmpeg_path = $this->cache->find_ffmpeg();
if ( null !== $ffmpeg_path ) {
$candidate = dirname( $ffmpeg_path ) . '/ffprobe';
@@ -542,7 +551,7 @@ class Transcriber {
}
}
// Fallback: common paths extended via filter.
// 3. Fallback: common paths extended via filter.
$candidates = apply_filters(
'piperless_ffprobe_paths',
[ '/usr/bin/ffprobe', '/usr/local/bin/ffprobe', '/opt/bin/ffprobe' ]