what code would I need in a avs to add subs to a movie through tmpgenc?

I know you can do it through VDub but that just means longer to encode.

or if anyone knows of a program that muxes the subs as permanent subs like winsub does with vcd and svcd style subtitles.