Hi Tadeu thank you so much for the link but i don't see any MPEG codec block in it. i was thinking that MPEG should be a part of DVB standards please correct me if i'm wrong
Probably the best solution is to use "ffmpeg". For instance you can try something like this "ffmpeg -i original.m2ts -vcodec copy -t 20 final.h264". You can use ffmpeg as command line in Linux and Windows. You can play the video sequence using mplayer (‘mplayer final.h264 -fps 25’). You can also call these tools from Matlab/Octave using the command system('ffmpeg ...').