# # FFmpegBinaryPath # $CONFIG{'FFMPEG_BIN'} = $cfg->get('FFmpegBinaryPath') if defined($cfg->get('FFmpegBinaryPath')); my $ffmpeg_error_message = undef; if (-x $CONFIG{'FFMPEG_BIN'}) { unless (PDLNA::FFmpeg::get_ffmpeg_codecs($CONFIG{'FFMPEG_BIN'}, \$CONFIG{'FFMPEG_VERSION'}, $CONFIG{'AUDIO_CODECS_DECODE'}, $CONFIG{'AUDIO_CODECS_ENCODE'}, $CONFIG{'VIDEO_CODECS_DECODE'}, $CONFIG{'VIDEO_CODECS_ENCODE'})) { $ffmpeg_error_message = 'Invalid FFmpeg Binary: Unable to detect FFmpeg installation.'; } unless (PDLNA::FFmpeg::get_ffmpeg_formats($CONFIG{'FFMPEG_BIN'}, $CONFIG{'FORMATS_DECODE'}, $CONFIG{'FORMATS_ENCODE'})) { $ffmpeg_error_message = 'Invalid FFmpeg Binary: Unable to detect FFmpeg installation.'; } } else { $ffmpeg_error_message = 'Invalid path for FFmpeg Binary: Please specify the correct path or install FFmpeg.'; } # a disabled LOW_RESOURCE_MODE requires FFmpeg if (defined($ffmpeg_error_message) && $CONFIG{'LOW_RESOURCE_MODE'} == 0) { push(@{$errormsg}, 'A disabled LowResourceMode requires a valid FFmpeg installation.'); push(@{$errormsg}, $ffmpeg_error_message); }