It’s annoying when you realize that there’s something wrong in your code’s performance that, well, isn’t actually your fault. It’s even worse when you have no idea what’s wrong in the first place. Samsung was nice enough to provide both challenges for me during the past couple of weeks.
Being (ridiculously) new to Android programming, I took most of my Android programming advice from various how-tos on the internet, and it seemed that the easiest way to program a camera on the Android platform was to use cwac-camera from CommonsWare. After refactoring the code that I had been working with, it turned out to be true; cwac-camera crunched the ridiculous super-file that held all of the camera parameters into three mini-files that actually made sense. I would highly recommend it.
However, when I started testing out my handiwork, things didn’t go so well. Everything I recorded seemed to get… flatter. And then… fatter.

After weeks of claimed successes and horrible realizations, Jack and I realized that there’s a glitch on Samsung phones that mismatches the preview and video recording size when setting up the camera. You might be looking at a 720x480 image, but the video is being taken as 835x480. When you grab the video off the camera, you end up getting a playback that fits to the preview, not the real video dimensions, resulting in a weird warping effect.

I did end up fixing this error (to the best of my knowledge), though I had to fiddle with the cwac-camera internals a bit. The gist can be found here. Luckily, CWAC makes it easy to do this kind of thing, so it was just a matter of knowing what was wrong in order to fix it.
A final note: Strangely, this warped playback can’t be seen on Samsung’s own native video player; it warps and un-warps the file without issue. It’s only once the mp4 was played on something else (say, a computer) that I ran into problems. Classic.