How can I convert a .m2ts to .mkv?

33,253

Solution 1

With Handbrake you can convert all kinds of files:

Supported Sources:

  • Any DVD or Bluray-like source: VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted -- removal of copy protection is not supported), and some .VOB, .TS and M2TS files
  • Most any multimedia file it can get libavformat to read and libavcodec to decode.

Outputs:

  • File format: MP4(M4V) and MKV
  • Video: MPEG-4(ffmpeg), H.264(x264), or Theora(libtheora)
  • Audio: AAC, CoreAudio AAC (OS X Only), MP3, or Vorbis. AC-3 pass-through, DTS pass-thorugh (MKV only)"

Solution 2

ffmpeg Install ffmpeg

I think ffmpeg will do the job it's quite simply copy all the streams and output them in an mkv container. No information is lost/re-encoded.

ffmpeg -i input.mt2s -scodec copy -acodec copy -vcodec copy -f matroska input.mkv

Solution 3

The easiest tool to use is mkvmerge, which is part of the mkvtoolnix package. To convert your file:

sudo apt-get install mkvtoolnix
mkvmerge -o output.mkv input.m2ts

Example output:

mkvmerge v6.1.0 ('Old Devil') built on Mar  4 2013 20:24:55
'input.m2ts': Using the demultiplexer for the format 'MPEG transport stream'.
'input.m2ts' track 0: Using the output module for the format 'AVC/h.264'.
'input.m2ts' track 1: Using the output module for the format 'AC3'.
'input.m2ts' track 2: Using the output module for the format 'PGS'.
The file 'output.mkv' has been opened for writing.
'input.m2ts' track 0: Extracted the aspect ratio information from the MPEG-4
 layer 10 (AVC) video data and set the display dimensions to 1920/1080.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 4 minutes 20 seconds.
Share:
33,253

Related videos on Youtube

Thomas Boxley
Author by

Thomas Boxley

Updated on September 17, 2022

Comments

  • Thomas Boxley
    Thomas Boxley almost 2 years

    Does anyone know of an application that allows me to convert an m2ts file to mkv or some other format? Preferably something that allows me to convert it directly, rather than convert the whole Blu-ray disc. hddump didn't work because it doesn't convert only the m2ts file, and the contents are on a .iso that I mounted virtually.

  • Alvar
    Alvar over 13 years
    You can also convert for ipods and similar. It's really great :)
  • Mike Pelley
    Mike Pelley over 10 years
    Note that Handbrake will re-encode the video, whereas ffmpeg will simply copy the internal stream to the new MKV container. This will be much faster and not change the quality.
  • Yanick Rochon
    Yanick Rochon over 10 years
    Except the PPA doesn't work (404). I had to manually add it to my softare sources.
  • Csabi Vidó
    Csabi Vidó over 10 years
    You're right, mosu's tools support this for a while now. I recommend subscribing to the RSS feed of his blog and installing updated versions from his repository, which are updated every one to two months. I recently found that they don't seem to support lpcm though.