How can I resolve FFMPEG installation path issues for video conversions in PHP on a SNAP-managed RedHat server?

I recently switched to installing FFMPEG via SNAP on a server where the usual ffmpeg installation fails to work. My prior installations used the path /usr/bin/ffmpeg -i, as referenced in a PHP script:

if ($ext != "mp4" || $ext != "MP4") {
    exec("/usr/bin/ffmpeg -i $uploaded_file ../user/$log_username/$db_file_name");
}

Running on RedHat, I discovered the new installation path with “which ffmpeg,” revealing /var/lib/snapd/snap/bin/ffmpeg.

Further investigation with sudo ls -l /var/lib/snapd/snap/bin/ showed symbolic links for ffmpeg pointing to /usr/bin/snap, including for ffplay and ffprobe.

Despite trying these new paths in my PHP code, I’m unable to perform video conversions to mp4, leading to confusion.

As an alternative, is it possible to access the original ffmpeg path remotely on another server where ffmpeg was previously installed without issues?