The support formats of OpenCV depend on ffmpeg.
Thus, install
sudo apt-get install libx264-dev yasm
git clone git://git.videolan.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make
sudo make install
if you can play the file with ffmpeg, you can load it.
Sample code
import cv
import numpy
capture = cv.CreateFileCapture("yourvideo.m2ts")
cv.NamedWindow("Test", cv.CV_WINDOW_AUTOSIZE)
while 1:
img = cv.QueryFrame(capture)
cv.ShowImage("Test", img)
c = cv.WaitKey(2)
if c ==ord('q'):
break