What is the ffmpeg string for transcoding the ts file downloaded by get-iplayer? Is there a way to change within the script or do I simply have to pull down the raw file and perform my own ffmpeg transcode?
get_iplayer does not transcode. If you want to do so, change the script or use the raw files - it's up to you. The latter will likely be easier. There is no point in doing time-consuming transcoding with get_iplayer.
You’re downloading a ts file and then converting to mp4, so no encoding using ffmpeg?
No encoding. MPEG-TS -> MP4 is only a change of container format. Google is your friend here.
This is the setting in my ~/.get_iplayer/options to transcode the radio programmes I download into mp3.
commandradio ffmpeg -i "<filename>" -vn -codec:a libmp3lame -ac:a 2 -b:a 160k -id3v2_version 3 -y "<dir>/<fileprefix>.mp3"
Instructions for doing this sort of thing are in
https://github.com/get-iplayer/get_iplayer/wiki/custcmd