You are making your own analyzer then.
You can use ffmpeg (path to ffmpeg is $exe) with grep/sed/awk piping to extract information into variables, use if-elif constructs ($A is path to file A)
Here is example to get video codec, video resolution, frame rate and reset to be not greater than 24 fps, and get audio encoding frequency.
videoa=`$exe -i $A 2>&1 | grep Stream.*Video | sed -e 's/.*Video: //' -e 's/[, ].*//'`
if [ $videoa = "h264" ];then videob="-c:v libx264"
elif [ $videoa = "hevc" ];then videob="-c:v libx265"
fi
resolution=$($exe -i "$f" 2>&1 | grep -oP 'Stream .*, \K[0-9]+x[0-9]+')
crop="crop=960:544:0:2,"
if [ $(echo $($exe -i "$f" 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p") | awk '{printf "%.0f\n", $1}';) -gt 24 ];then r="-r 24";else r=""; fi
if [ $(echo $($exe -i "$f" 2>&1 | sed -n "s/.*, \(.*\) Hz.*/\1/p") | awk '{printf "%.0f\n", $1}';) -gt 44100 ];then af="-ar 44100";else af=""; fi
video="-map_chapters -1 -map_metadata -1 -vf ${crop}scale=${resolution},setsar=1/1,setdar=16/9 $videob -an $r"
$exe -y -ss $ss -i "$f" -t $t -map 0:v:0 $video $v