Mpegend is a command line utility for fixing MPEG files that are missing the proper endings for their video and system streams.