I always promised technical posts, but I haven’t done many of them! Here is one of the few.
I spent several hours today trying to convert AVCHD video (from a camcorder) into something that was usable by Linux software such as vlc. There are lots of suggestions on the Internet, but none of them seemed to do the job. Eventually I worked it out, and kicked myself. AVCHD is just a container format, not a compression technology, so you don’t have to transcode the video. In fact, if you transcode the video, you are losing quality, so don’t do that unless you have to.
Once you realise this, converting AVCHD to something else becomes trivially easy:
avconv -i myfile.mts -codec copy myfile.mp4
Don’t listen to the people who tell you that this is hard, or it will be. 🙂
I did find a problem with the resulting output. With the camcorder I was using, it was 50 frames per second and interlaced. This is a good thing; it shows motion more smoothly than video recorded at 25 fps and non-interlaced. However, it confuses some software. If you have problems with flickering, you probably need to deinterlace the video. You can do this as follows:
avconv -i myfile.mp4 -codec:v:1 h264 -deinterlace -b 20000k myfile_deinterlaced.mp4
This bitrate setting is probably excessive, but avconv’s default is definitely too low. Your video is going to run at 50 fps, and that will need a lot of bandwidth.