On the unsolving of problems

Oh, it’s supposed to be so easy. And it is, until it doesn’t work properly. At which point it becomes a Living Hell.

Yes, I know that’s not narrowing it down in the slightest. Let me elaborate.

I decided it was about time to migrate my videos to the bandwagon that is YouTube. Their Internet tubes are gallons more voluminous than mine, and everyone’s got a Flash player these days. Plus people can rate and comment and make video responses and make it a favourite and embed it and do all those wondrous things that don’t actually make anyone more productive or useful but ooh, isn’t it exciting! and please blog me and make me famous and so on and so forth.

First problem: you’re limited to 10 minutes and 100 MB per video upload. Hmm… OK. I don’t have many videos longer than that; I can split those. I’m sure by tickling the codecs I can limbo my way under the file size restriction. (By “I’m sure”, I mean “I think/hope”.)

Wearing my bestest geek hat I perform a test run. I’m not going to start with one of the manky WMVs currently available under the Avaragado Pictures banner, though – I’m returning to the source material, or as close as I can get without installing video editing software from the dark ages or resucking gigs of raw footage from DV tape. The test run is with the Alpe D’Huez 2001 trailer: 2 min 30, for which I have a DVD-quality MPEG.

YouTube recommends you upload at 320×240, MPEG4 (DivX or Xvid video, MP3 audio). Note that this has already confused 95% of the world, for whom that reads “wah wah wah wah MP3 wah”. But anyway.

I am equipped with: sundry codecs (Xvid, DivX, etc); VirtualDub-MPEG2 (for transcoding the DVD MPEGs into AVIs with the codecs of your choice); and Adobe Premiere Pro (cos I is a professional amateur, innit).

Right. Raw MPEG into VirtualDub, deinterlaced, resized, DivX, MP3, save. OK, it’s an AVI not YouTube’s recommended MPEG4, but let’s try it. I mean, what could possibly go wrong?

I upload via the crummy Flash-based uploader (it could really do with a makeover, but it works). Meh, metadata stupidity: I must enter a description and at least three tags, and it doesn’t grok multi-word tags. It then processes the uploaded video, slicing and dicing into the correct format for playback, giving me no indication of progress but at least letting me do other things. Some time later…

I play it. The sound and video are out of sync. Not by much, but by enough: the video leads the audio by five or six frames. Well, this won’t do. The file I uploaded is fine.

Casting the runes, Google leads me to a page that suggests manually shifting the audio track by my best guess and re-uploading. You’ve got to be kidding me. Nope, not doing that. Other sites tell me that this is a common problem, and suggest various combinations of codecs and container formats. (“It worked for me!”)

This is nonsense, right? I’ve got free software here, there and in the other room that will happily transcode anything into anything inside any container format and preserve synchronisation between the audio and video. I’ve got a Quicktime player, a Real player and a Windows Media player that’ll stream live feeds over the Internet to my desktop and preserve synchronisation.

Why can’t YouTube do it? Is it the player? Their back-end? Their conversion process? Flash itself?

I know that most YouTube videos are in sync. But mine isn’t. Anyway, this shouldn’t be guesswork, or semi-random. And given the size of the videos I’ll be uploading, trial and error is simply not practical.

For this test run, I try various combinations. The best I find – but still not perfectly in sync – is an AVI with Xvid and MP3. Bah.

I proceed to the smaller collection of videos – mostly short clips, some with a bit of editing. For these, the synchronisation doesn’t matter much and it’s often hard to notice when a video’s out of sync anyway. Some of them I transcode as AVI/Xvid/MP3. In some cases I’ve got the original source videos handy – from my digital camera at the time – and the Premiere project file. So I generate bog-standard MPEG2 files from these, and they end up perfectly synchronised in YouTube. In one case I just upload the WMV I have handy, as it would take too much effort to recreate from source; again, this is acceptable quality.

A mental model begins to form. Maybe MPEG2 is the way to go. Tried, tested, etc.

On to the first “proper” video: one of the Ireland ones. With music and that (and therefore sensitive to synchronisation issues). AVI/Xvid/MP3: 45 MB upload, out of sync. No good.

I find and download a program called SUPER, with the UI sensibilities of a deformed cabbage (you pick something from a menu and the window moves around the screen) but with the ability to generate MPEG container files and much else besides, unlike VirtualDub. It’s a hideous front-end to ffmpeg, MEncoder, etc, but at least it works.

I spend the best part of a day trying different combinations. MPEG2. MOV/H.264/AAC. WMV/MPEG4-v2/MP3. All no less than 30 MB. I even transcode to AVI/DV/WAV (880 MB), load into Premiere (it loves that combination) and get it to spit out MPEG2 (as the MPEG2 files I built from Premiere for the shorter clips worked fine). They’re all out of sync. (I say all: at the time of writing, one upload is still processing. It has been for several hours now; I’ve given up on it.)

All out of sync, that is, except one. One magical upload works. Which one? The crummy low-quality WMV sitting on my web site.

My mental model now adjusts. Maybe I just need to lower the quality. Maybe, maybe, maybe.

Maybe when I wake up in the morning the sky will be blue, the birds will be a-twitter and the kid currently walloping his football noisily against a wire fence every five seconds will have been given a clip round the ear and told to pack it in.

Maybe I’ll try Google Video or somewhere else.

Aha. Hang on. That WMV/MPEG4-v2/MP3 combo that’s been processing for about four hours has finally finished. And guess what? It’s in sync.

Mental model #3: WMV? WMV?

MENTAL MODEL DOES NOT COMPUTE. [Emits smoke, sparks, explodes despite containing no explosives]

Advertisements

Leave a comment

Filed under Random

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s