What is M2TS?
MT2S files are generally used with Sony formats and hardware, particularly Blu-ray Disc and AVCHD. Camcorders make use of M2TS in the form of AVCHD, a recording format made specifically for camcorders. Some Canon camcorder models also use M2TS files. M2TS are capable of storing quite a large amount of information and data tracks. Software called the "Picture Motion Browser" is distributed with Sony camcorders for playing this files
Now how to install M2TS files in Ubuntu using VLC Player
First you have to install the following
Or You can use synaptic Package manager
Go to Tools -->Preferences --> Input & Codecs
For the option “Skip the loop filter for H.264 decoding” select ALL
Then in preference window Click Show Settings -> All. Now expand Stream Output -> Click Muxers ->select Mux module as “FFmpeg muxer”
Expand Video -> Select Output module -> In Video Output module and select X11 video output.