About 3 years ago we got a ‘value’ SD card Panasonic camcorder through Amazon for doing some YouTube videos for marketing. At the time, it was just the ticket since YouTube wasn’t HD and not even widescreen. Now YouTube is all widescreen HD, we need to either buy a new camcorder or make do with what we’ve got.
The Panasonic camcorder we have is an SDR-S26 which was a top-selling camcorder on Amazon UK in 2009. It has a 704×576 sensor which is fine for old-style YouTube videos but rubbish for widescreen. The camcorder does some optical trickery when you select 16:9 to squish your real-world image into ‘skinny’ pixels. I.e. pixels are no longer square but (approximately) 4:3 aspect ratio. The resulting .MOD files, which are MPEG2 encoded video, fail to be correctly recognised as having 4:3 aspect ration pixels by just about every video editing software that we have tried, be that on Linux or Windows. The symptom is squashed, alien-thin / tall people in your videos with black bars down the side. Also, you can’t just upload the video to YouTube expecting it to Just Work. YouTube’s Encoding Do’s And Don’ts says that uploaded videos need a pixel aspect ratio of 1:1 – and they mean it.
The (A) Solution
There may be more ways to crack this particular nut, but what we do is re-encode the video to H264 with a command-line Linux tool, mencoder. This veritable swiss army knife of multimedia hackery beats the problem into submission and produces a much smaller output file to boot – about one quarter the size. Here’s our command line to fix video shot in 16:9 so that the rest of the world actually sees it in 16:9:
mencoder yourfile.MOD -vf scale=1024:576,pp=lb,dsize=0 -ovc x264 -oac mp3lame -o yourfile.mp4
P.S. YouTube’s Advanced encoding specifications suggest a few changes, such as AAC-LC for the audio encoding – I might tweak the post some time to reflect this.