How to transcode AVCHD / MPEG-TS (.mts, .m2ts) files into a GStreamer-friendly format?

Created by Jean-Fran├žois Fortin Tam on on 2010-12-31
Keywords:
pitivi gstreamer mpeg ts codecs containers
Last updated by:
Jean-Fran├žois Fortin Tam on on 2011-05-20

You can losslessly convert your .mts files to a MP4 container using this command:

for FILENAME in *.MTS; do ffmpeg -i ${FILENAME} \
                    -vcodec copy -acodec copy -sn \
       `echo ${FILENAME} | sed 's/MTS/mp4/g'`; done

Source: http://blog.pcode.nl/2010/12/31/losslessly-remux-your-mts-into-an-mkv/