Im trying to remux a tv series from flv format to M2TS Transport streams.
I am doing this to stream them from a pc to a media extender via windows media center.
The problem is some episodes have variable framerates.

In mediainfo it shows: Original framerate: 23.976 Average framerate: 25.066 (example), also minimum and maximum.
I can easily extract the audio and video with Yamb. I can also easily mux into m2ts with TSmuxer,
but I cannot manually input the framerate. TSmuxerGUI only has the basic framerate options, and I've never touched command.
Episodes with framerate 23.976 remux perfectly and look beautiful.
The others all have audio out of sync no matter what settings are used.

MKVmerge has a field for FPS and if I input the average framerate, I can create a MKV file
that works fine, however the video quality when played is rather poor.
Ive tried encoding the audio to the new framerate, though unsuccessfully.

Can TSmuxer, when used through command prompt, use a custom framerate for H264?

If so, could someone explain to a dummy how to type a script for this?
If not, is there another simple alternative?

Thanks for any advice.