I was recently tasked with editing together a bunch of video from a HD Camcorder. When I pulled the footage of the camera’s drive I found it was in .m2ts files which are incompatible with Adobe Premier my editor of choice without an expensive plugin.
So being the cheapskate I was I went looking for some free solution to my problem and one that presentably I could put on my linux server and allow it to plod away.
After some googling I found a solution at http://wesleybailey.com/articles/ffmpeg-tutorial-convert-avchd-mts-m2ts
After following his guide to install the software I found his FFMPEG command setup didn’t provide me with a workable file. As well as this I wanted to be able to run one command and have it convert the entire folder. With this being said I made some adjustments and put it in a script file and ended up with the following.
for file in *.m2ts; do `ffmpeg -i $file -vcodec mpeg2video -r 25 -b 18000k -deinterlace -s 720×576 $file.avi`;done
Which I save in a file called encode. I then copied this to any directory I wanted to convert files in and ran it, leaving me with a set of files I could easily use in the editor.