Monday, September 27, 2010

On making an interlaced DVD from interlaced HD, and why it's such a pain in the @#$@#

I hate interlacing. Really, I do. It gives the illusion of greater motion detail than is there - but in the digital video editing realm, it adds all sorts of problems. This is especially true of interlaced high definition video, and doubly true when you want to turn HD interlaced video into standard definition (SD) interlaced video. Just about every method of making a DVD from an HD source assumes that you want to deinterlace the footage at some point along the way, which removes the benefits of shooting interlaced in the first place (and can end up looking very choppy if you aren't careful with your field order settings. Yes, there's actually a field order in interlaced video. Don't get me started...)

I use Premiere Pro CS3 to edit with, which is a very versatile program, but making a DVD directly out of an HD project in Premiere Pro results in crap quality, since Premiere decides to render all the elements at SD resolution (including titles, effects, SD footage, etc.) instead of at HD first and then downconverting to SD. In the past, the only solution to this has been to export out an uncompressed (or relatively low compression) HD movie file, then downconvert that somehow. Needless to say, if you're on a low hard drive budget and working on a huge project, this is a major pain in the ass.

One way to handle this is to take your rendered-out HD video and import it directly into Encore, but that can also create odd-looking results. For best quality, you generally have to downconvert the HD video first by making an uncompressed intermediate (16x9 anamorphic) SD file from the HD file, and import that into Encore. You can also just drop the HD file into After Effects in a new composition, change the composition to the DV widescreen preset, conform the image to fit, and render out to MPEG-2 from there. The problem with both processes is that they deinterlace the video automatically at some point along the way. I've gotten used to just doing this, and it creates a sort of pseudo-film look, but again, it removes the point of shooting interlaced video in the first place.

The HD2SD filter for AVISynth combined with the Debugmode Frameserver plugin for PPro CS3 allows a crazy, hacktastic workaround that essentially serves out a frame at a time of rendered-HD-then-downconverted-to-SD goodness to another program (in this case Virtualdub) so all you need to do is render out an SD intermediate file (in this case, using the lossless Lagarith codec). You can then import said intermediate file into Encore, and render out a properly interlaced DVD that preserves all the lovely interlaced motion...in theory. In actuality, Encore seems to have some trouble properly detecting the interlacing, and so once again deinterlaces the footage.

Also (by default), nothing in the AVISynth process chain is multithreaded, so if you have a multicore processor (or multiple processors, if you're a lucky dog) you will either have to suffer through single-core performance, or config everything in your render chain to be multicore, which is complicated and not guaranteed to boost your performance much (remember, any holdup in Premiere Pro's rendering will negate the advantages of multicore rendering further down the chain.) The upshot? the process is very, very slow. On my Core 2 Quad 2.4GHZ machine, it takes around 12 minutes to render every (one) minute of video... and that's with little to no effects.

So what's the solution? Well, there are basically two:
  1. Play back the uncompressed HD footage through some sort of hardware downconverter into another device set up to record uncompressed video. Being that I don't have another computer around with another Blackmagic Intensity card, not happening here. This is by far the easiest, though, and happens in real time. Of course, there's still no guarantee Encore will recognize the SD footage as interlaced, and if you experience a playback skip during the recording, you either end up with two files you have to stitch together, or you have to start the recording over again. So, you probably should have the HD video on a RAID (0,5 or 6) array-equipped system to do this properly.
  2. Pass the SD downconvert through a third-party MPEG-2 encoder that will detect the interlacing (or allow you to set it properly). So far, I've only been able to do this with the freeware HCEncoder, and the quality doesn't seem to be all that great - but it does produce properly interlaced video as long as you set the field order properly (usually Bottom Field First).
Update: I downloaded and installed TMPEGEnc Free, and that will also work with the SD downconvert - as long as you make sure the interlaced and bottom field first parameters are either detected automatically or set. The video quality is more consistent than HCEncoder for me, but that could also be because i'm not quite sure how to properly set the latter. Note that the MPEG-2 encoding in TMPEGEnc Free expires after 30 days, so use it wisely, and then consider buying the Plus version.

My guess is that most standalone encoding programs would produce similar results. Anyone have any issues with this sort of thing with DVD Studio Pro?

Saturday, September 11, 2010

Mounting CDs/DVDs in Dosbox on Ubuntu 10.04


Since Ubuntu 10.04 uses the CD/DVD volume name for the subdirectory it mounts the CD/DVD to, you can't use
/media/cdrom0
as a standard CD/DVD mount directory in Dosbox like you could in the past. This means you either have to change your /etc/fstab file (as detailed here - use at your own risk! I have not tried this.), or you have to make separate entires in your dosbox.conf file for each CD you want to use. For example, if you wanted to mount the Full Throttle CD, you'd put this in the [autoexec] section of your dosbox.conf:
mount d /media/FT1_00 -t cdrom
You could then generate a list of CDs like so:

mount d /media/FT1_00 -t cdrom
mount d /media/DN_3D -t cdrom
mount d /media/SQVI -t cdrom

And use the commenting marks to select out everything except the CD you're trying to mount:

mount d /media/FT1_00 -t cdrom
#mount d /media/DN_3D -t cdrom
#mount d /media/SQVI -t cdrom

A front-end could potentially make this problem a non-issue, but I dislike using them, so there yah go. ;)

Oh, and remember that you can still use .ISO or .BIN/.CUE disk images as well (in fact, they're the *only* way to properly use multisession CDs in DOSBox at the moment.)