I've seen a few threads about this, with the conclusion always seemingly "extract them from the source file with mkvmerge, then remux them afterwards or burn them in through avidemux". However, this falls apart if you're trimming the file in avidemux, in that you have to use a subtitle editor to then trim the subtitles and re-time them as well.
So, while this isn't *wholly* avidemux-related, I thought I'd share it here as it's where fellow avidemuxers are likely to be looking. And it does still use avidemux
What I landed on was this... it works for me because my OTA source file has SubRIP/SRT and not DVB or teletext subs, but there may be variations:
1. Load the ts source file into both avidemux and mkvmergegui
2. Use avidemux to find the trim points
3. Load those into mkvmergui as "Split... by parts based on timecodes" (e.g. 00:01:27.286-00:20:28.840 might be the first chunk of programme - the bit after the pre-programme preamble but before the first adverts)
4. Repeat until you have all parts identified
5. Process the file through mkvmergegui, and you'll get one discrete file per part of the programme - complete with subs streams (assuming you selected those - you did, didn't you?)
6. Re-load all the parts back into mkvmergegui and remux them as appended files (you can set a chapter mark for each in the output options if you like)
End result: one trimmed file in which the audio, video and subtitle streams are cut and appended appropriately.
If there are other filters/encoding that you want to do in avidemux, just do those first on the whole file. You can then extract the subs from the original source and remux them back into the post-avidemux file while they're the same length/timing, and then start trimming as above.