Tuesday 17 March 2009

Time-based Manipulation of VOB Files

Editing DVD VOB files can be a royal PITA.

I had a DVD which was a copy of a VHS tape, produced by a simple copy in an LG RC-195 DVD/VCR combo unit. The tape was of a TV show which is damn near impossible to buy now, and all the reviews of the DVD version claim it has been badly edited. Even the VHS drops the main title sequence from all but the first episode.

So - I wanted to create a backup of the tape, but also make it a bit more intelligent and be able to access the individual episodes. The primary problem was episodes were split across multiple VOB files - so I needed a tool which would treat these as a single data stream and allow time indexing into it.

Media Coder is the only tool I've found that allows setting time-based start and end points. Alas it didn't want to play nicely with joining across the multiple VOB files, particularly with the time indexing past the first file. It supposedly supports joining files, but I had no success with that.

Enter VOBmerge. This handy little tool allows multiple VOB files to be joined into one large file. It's very quick, and I also discovered that Media Coder was much quicker in transcoding from the merged VOB file than from the originals - plus it seemed to be producing smaller results at the same settings - approx 160meg XviD avis versus the approx 200meg when transcoded from the original VOBs.

[Aside: someone suggests 'copy /b A.vob + B.vob merged.vob' gives exactly the same result!]

While this is ongoing, I was happy with yesterday's progress. Next step is to join the original title sequence onto each episode, and instead of transcoding to XviD, preserve the footage in DVD format so I can create a custom menu for the DVD.

Wednesday 11 March 2009

Rubber Duck Debugging

Priceless. http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html

We called it the Rubber Duck method of debugging. It goes like this:
  1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety).
  2. Place rubber duck on desk and inform it you are just going to go over some code with it, if that's all right.
  3. Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line.
  4. At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.
Works every time. Actually, if you don't have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.