I am not sure exactly what you want to do, but I guess my question would be whether you have ffmpeg installed, and if so, will it convert a recording to the format you want when used from the command line? If so, then you should be able to use some variation of the technique shown at https://freetoairamerica.wordpress.com/2015/01/07/how-to-play-video-recorded-from-high-bitrate-422-sources-on-low-power-systems/
Although, that won't do the conversion in real time. If you want that, it MAY be possible if you have a VERY fast system, but the problem is that converting video in real time requires a LOT of CPU power. You'd need to do something similar to what's shown at https://freetoairamerica.wordpress.com/2015/09/03/fixing-the-audio-on-live-tv-from-a-certain-network-which-shall-remain-nameless/ but since you're not attempting to do exactly the type of conversion shown there (which you will note only converts the audio stream, and only does a straight copy of the video which require little CPU power), you'd need to modify the call to ffmpeg to do the type of real-time conversion you want. BUT, and this is a big BUT, in most cases ffmpeg is too slow to do any significant real-time conversion of video. Even on a fairly modern desktop system, ffmpeg can take around twice the actual running length of the show or longer to do the conversion, which means that attempting a real time conversion is doomed to fail. This is especially true if you are attempting to compress the video in any way.
EDIT: If you have a good GPU in your system then what I said about ffmpeg being too slow may not apply, provided you set ffmpeg to use the GPU. However this is not exactly a straightforward process because the correct ffmpeg options to enable use of the GPU may vary depending on the exact hardware configuration. But if you set the options correctly, you may be able to achieve real-time video conversion.
Transcoding the recording after it's finished is easier, you can just make the call to ffmpeg from a post recording script - see https://tvheadend.org/projects/tvheadend/wiki/Tvheadend_post_recording_scripts (you invoke these by going to the Recordings tab, then under Digital Video Recorder Profiles you create a new profile with the same settings at the profile you'd normally use, which is probably the default profile, except you place the call to your script in the Post-Processor Command textbox. You then use that modified profile when setting up recordings, under the "DVR Configuration" setting).
Note that if you are trying to create a replacement recording that can be accessed as if it were the original, you can't just delete the original and the copy the replacement in using the same filename, because if the original disappears for even a fraction of a second TVHeadEnd will notice it is gone, and remove it from its index of available recordings. So, you have to "move" the completed converted file over the old one. You could use a script such as this as a post recording script - I'd place it in the TVHeadEnd (hts) user directory and make sure it's owned by the hts user and made executable; you could use usesudo su hts before creating the script, as I will mention again in a minute:
#!/bin/bash
# Invoke using path/to/scriptname "%b"
# Then $1=%b in this script
# Extension of converted file must be same as original file (.ts)!
cd /home/hts/recordings
cp "$1" /home/hts/recbackups
/usr/bin/ionice -c 3 /usr/bin/nice -n 20 /usr/local/bin/ffmpeg -loglevel quiet -i "$1" -c copy "converted-$1" &> /dev/null
mv -f "converted-$1" "$1"
Before running it create a directory called /home/hts/recbackups (do this as the hts user, usesudo su hts before creating the directory) so it will have the correct permissions. This will contain the original unconverted recordings and you will probably want to set up a cron job to kill all the recordings in that directory every week or every morning, just not at any time when a conversion might be in progress. Also the ffmpeg options "-c:v copy -c:a copy -c:s copy" are just an example that pretty much do nothing, obviously you would replace these with the ffmpeg options that do the type of conversion you actually want. Thepath/to/scriptname "%b" is what you'd use as the call to the post recording script in your TVHeadEnd profile (the %b passes the path and filename of the recording). Also, check the path to ffmpeg in the script, it may be different on your system. Runwhich ffmpeg from a command prompt to find out where it is, and change the path in the script if necessary.
I hope this is at least somewhat helpful. This works in TVHeadEnd 4.0.9, maybe newer versions have a better way to do this but if so I am not aware of it.