Have you tried do the multiplexing and demultiplexing with bbMPEG?:
http://members.home.net/beyeler/bbmpeg.html
As an alternative, you could capture to an AVI and compress the video to MPEG later. This would take more effort, but it would provide better quality and avoid the MPEG cutting issues.
-Cart
http://members.home.net/beyeler/bbmpeg.html