Converts DVB Transport Stream (.ts) files into Matroska (.mkv)
Ts2mkv is a command line utility to convert DVB MPEG-2 Transport Stream (.ts) files into Matroska (.mkv) which is well supported by all modern media players and devices. The conversion process can also have a separate encoding phase which radically reduces the resulting mkv file size. Ts2mkv comes with some useful presets for encoding video tracks into H.264 and audio tracks into AAC, AC3 or MP3.
Basic usage is:
You can also enable video and audio track encoding by adding some additional parameters:
ts2mkv my_recording.ts --video-preset=h264 --audio-preset=aac
For full syntax type:
Mkvenc is a supplementary tool bundled with ts2mkv. It can be used to apply the encoding phase afterwards if the original ts->mkv conversion was made without encoding. Basically the tool can be used to encode any Matroska file but it depends on codecs, etc.
In the first phase mkvenc extracts all the tracks out from the existing Matroska file. Then the video and audio tracks are encoded based on presets and configuration. Finally the tracks are merged back together in single Matroska file. Note: Mkvenc tries to preserve language information and possible chapters but some information may be lost during the process.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.