We have been looking for a MPEG2 cutting program that will cut with minimal to no re-encoding. So far all we could find that can cut at arbitrary places and create a valid output was avidemux. However avidemux is a gtk program and even when it runs in "command-line" mode, it still insists on bringing up the GUI. This is an issue as we are trying to use it from nuvexport which is meant to be run in a shell.
My current plan is to gut avidemux, and reuse the algorithms in a gtk-free program. Ideally, I'd like it to be C rather than C++, but no gtk is a necessity. Later, I may work in the code from lvemux as well to remultiplex the output. God bless GPL software.