This FFMpeg command takes as input an equirectangular image and provides as output an image as if it was shot by a camera poiting in the direction specified by yaw and pitch parameters:
ffmpeg -i input.png -vf v360=e:flat:yaw=-30:pitch=-20 -y flat.png
-vf - video filter
v360 - v360 filter
e:flat - reproject from equirectangular to flat (see other ...