Remux is a script I wrote to aid in the converting of kaffeine .m2t recordings to .mpg files. The problem is that some streaming clients seems to have problems with .m2t files (DVB-S Transport Stream). In addition with every transmission error the audio/video sync will shift a bit.

Projectx is used to demux and fix any audio/video sync issues. Mplex is then used to recombine the streams to a single mpg file. In the process it strips off all audio streams except the one that produces the largest file size. This is because several TV stations insert a blank 64k audio stream that is annoying when editing the file.

The script is called in the following manner.

remux <-t tempdir> <-o outputdir> filename <filename...>

If tempdir is omitted then /tmp is used.

If outputdir is omitted the ./ is used.

If an error is encountered in the demuxing/remuxing then a log file of the process is saved in the tempdir directory.

This script was written for my own use so do not be surprised if it fails horribly in your environment, crashes your machine, eats the hard drive and spits it at a passing dog.

Download it from here. --- More info can be found here.