Saturday, October 17, 2009

On Ubuntu and DOSBox

Okay, I've had enough. After a third virus/malware scare in less than two years, I'm switching to Ubuntu Linux for my web browsing and general work. I still have an XP partition around for video /sound editing, but that is only connected to the internet for updates. I can now run my email, web browsing, and Skype needs out of Linux, without having to worry about Windows viruses/malware/keyloggers/etc. Ubuntu 9.04 is also by far the most polished and accessible Linux I've ever used, which helps quite a bit. It's still not "grandma" material, as you do have to put up with a lot of configuration wackiness, especially if you have hardware that's a little unusual, like me having two sound cards and a webcam.

On the plus side, almost everything in the whole world of Linux can be done on Ubuntu, and usually a simple Google search will not only tell you how to do it, but give you the command-line commands to do it, which you simple copy, then paste in an open terminal window. For someone like me who's grow up around computers, this is an acceptable compromise.

I don't have a lot of hard drive space allocated to Ubuntu, but thankfully, I like to play classic games. To this end, I use the fabulous open-source DOS emulator, DOSBox.

For those of you who would like to try this as well, I looked at the following forum posts:

Tutorial: dosbox with Glide under Linux and DOSBox 0.72 and MIDI Support

And here is my condensed summary (Note: I'll mark the general-midi portions of the setup in green, so that if you don't want to mess with your system sound settings, you don't have to):

Note: This is for Ubuntu 9.04 and DOSBox 0.73. If you try this with a different version of either, your mileage may vary.

Update: On Ubuntu 9.10, DOSBox 0.73 can be installed from the Ubuntu Software Center, so you can skip the compilation steps below. You may want to change (in your dosbox.conf or dosbox-0.73.conf) the mixer settings to "rate=44100" and the "prebuffer=50" to avoid stuttering sound. I haven't tried setting up General MIDI to work with it yet, but I'll post here if I do.

  1. Get DOSBox (the "source" version, as this is frequently the most current).
  2. Extract the package into your /home/yournamehere directory.
  3. Open a terminal window and copy/paste the following command in and run it:
    sudo apt-get install libsdl1.2-dev libsdl-sound1.2-dev libsdl-net1.2-dev libpcap-dev build-essential cvs
  4. When that's done, "cd" into the folder you extracted earlier , for example "cd /home/yournamehere/dosbox-0.73".
  5. copy/paste, run the following commands (one at a time, in order):


    sudo make install
  6. Then, get the following packages (you can just paste this in the command-line, like before):
    sudo apt-get install dosbox timidity fluid-soundfont-gm fluid-soundfont-gs
  7. Type "dosbox".
  8. This should automatically make a dosbox.conf (or dosbox-version.conf) file. You can check by opening your /home/yournamehere directory, turning on "Show Hidden Files" in the "View" menu, then scrolling down and opening the ".dosboxrc" folder. If you don't see the file there, go back to dosbox and type:
    config -writeconf dosbox.conf
  9. When you see the file in the directory, close DOSBox, and open up the dosbox.conf file by double-clicking it.
  10. Scroll down until you see a line that starts with "mp401=", then make sure it looks like this:
  11. Save the file and exit it.
  12. In the terminal window, type (or paste) the following command:
    sudo gedit /etc/timidity/timidity.cfg
  13. Scroll down, put a "#" in front of the line that reads "source /etc/timidity/freepats.cfg", then paste this on the next line:
    soundfont /usr/share/sounds/sf2/FluidR3_GM.sf2
  14. Save and close. In the terminal, type (or paste) the following command:
    sudo /etc/init.d/timidity restart
  15. DOSBox should now be configured for General MIDI sound.
  16. Now, you'll need to create a folder for DOSBox to use to store and run programs. I call mine "dosdisk", but you can name it anything you want, and I'd recommend creating it in your "home/yournamehere" folder.
  17. Open up the dosbox.conf, scroll down to the very bottom of the file. Under "[autoexec]
    # Lines in this section will be run at startup", type the following (change folder names as appropriate):
    #Hard drives:
    mount c /home/yournamehere/dosdisk
    mount d /media/cdrom0 -t cdrom
  18. Save and quit. Open a terminal window and run dosbox. It should mount your folder and DVD-ROM drive as c: and d: respectively. If it gives you an error, quit out, go back to dosbox.conf, and check your autoexec section at the bottom is pointing at the right folders/drives.
  19. Now, you can either take zip files of classic games and extract them to the "dosdisk" folder directly, or put a game cd in your drive, start DOSBox, and install it just as you would on a real DOS machine. DOSBox works exactly like real DOS, except you don't usually have to mess with all that memory management crap.
  20. If you have any further questions, message me, or check out either the DOSBox or Ubuntu forums (search for dosbox in the latter).
  21. Have fun!

Monday, August 24, 2009

On DVDs and a film festival

When a film festival shows DVDs, they have a couple of issues:
  • Inserting the sponsor logos and festival trailer to right before the start of the movie
  • Different, possible dodgy DVD+/-Rs from filmmakers
  • European DVDs in PAL format
In addition, if they do a short films program, they may have to do several disc swaps between two or more DVD players over the course of the program.

Or they can try to consolidate.

Over the past few days, I got to be the "consolidator" for the shorts programs at the Sausalito Film Festival, where I learned some new things about DVDs and how Macs can handle them.

Prior to showing up, I did a little online research, and came up with the following workflow:
  • Rip DVDs using MacTheRipper to rip the encrypted DVDs
  • Use MPEG Streamclip to rip the unencrypted DVDs
  • Import into DVD Studio Pro
  • Profit!
Well, having grabbed some alternate programs just in case, I went in and started ripping away. As it turns out, DVD Studio Pro (Like Encore on the PC) needs a particular set of files to import into a new DVD project. As far as I can understand it, .VOB files describe some file formatting info as well as the raw media content, and DVD Studio Pro does not have the means to strip that info away.

So, new plan:
  • Rip the encrypted DVDs using MacTheRipper
  • Import the .VOB files or unencypted DVD into MPEG Streamclip
  • Export out .m2v and .ac3 (or .aiff for PCM audio) from said program
  • Import those files into DVD Studio Pro
  • Profit! (Okay, I'll stop using that now)
Well, all of this went fine, until I had to rip a film with subtitles. As luck would have it, there were several films like that, and they were all in PAL (of course).

So, my next idea was to transcode all the discs into ProRes using Streamclip and show them off a MacBook Pro. I started to mess around with that a bit, before I realized a tiny flaw in my plan:

MPEG Streamclip couldn't extract the subtitles.

I checked MacTheRipper, and it had no subtitle ripping options either. None of the programs I had could do it. To make a long story short, I found that the process of ripping and overlaying subtitles was going to be time consuming, and crappy quality to boot.

To understand why this was so unexpected to me, you have to realize I'm a PC guy. And on the PC, there's a program called DVD Shrink. Shrink will let you re-author a DVD from a disc, folders with .VOB files in them (VIDEO_TS folders extracted from a DVD), or both. It will let you select what audio tracks to include, what video to use (by title, which actually could span several .VOB files), and most importantly, what subtitles to carry over, even allowing you to force them to display. Other for-pay DVD prosumer programs can do this, but Shrink does it for free.

No free program for the Mac will let you do all this. In hindsight, I probably should have asked to get a copy of Toast. But that still wouldn't have solved the problem of mixing PAL and NTSC material on the same disc without reencoding anything.

I ended up having to punt on the PAL discs, as time was running out, so the festival used a universal player for those discs, and I compiled the NTSC shorts together into a DVD per short program. It worked well in the end, but the process was really dissapointing for me.

One of the reasons all of this matters is that the festival had to use a video switcher, which introduced minor audio latency (delay), since it didn't switch the audio as well.

One possible solution for next year (if the program is still mostly DVD-based) is to get the films together early, then dump all the discs into Final Cut Pro via an HDMI connection from a really good upconverting DVD player (probably one NTSC and one PAL player, actually) to 720p HD ProRes 422 HQ (or 1080p if the projector is high-res enough). Then, you could edit in the sponsor info and festival trailer at the beginning of each segment, and play back all the material via Front Row from a Macbook Pro with an HDMI-equipped video outboard unit (Such as the AJA iO). This way, you could go directly into the projector and sound system without using the latency-inducing switcher, and you could also pre-tweak the volume in Final Cut Pro to maintain consistant levels over the course of the program. You would also never have to change aspect ratios or any other settings on the projection equiptment.

You would probably still have to rip the encrypted DVDs so you could copy via the HDMI cable, and check for issues switching between video files in Front Row, but basically, I think it could be done.

Oh well, next year.

Also, the festival was a blast both to work for and attend, so I would reccomend anyone in the Bay Area next year should check it out.

Sunday, August 9, 2009

Wonder why people like the Red One so much?

This is why. (click the picture to enlarge it)

And this is from an HDTV (1920x1080) downconversion. The original file is at 2k resolution (and it can shoot at up to 4k resolution).

The only thing I've noticed is that medium to light pastel blues tend to pop out unnaturally, but some of that can be minimized in post-production color correction.

This short was shot using a set of fairly expensive Zeiss prime lenses. While the RED-branded prime lenses appear to work quite well (and I would consider shooting with them for some projects), good quality film lenses like the Zeiss and Cooke primes handle the shape and depth of the image in different ways. They aren't necessarily as "accurate" as the RED lenses, but they give a more classic film "feel", which personally I think helps to sell it to those filmmakers who are going to use it in place of film, since their end product will conform more to what audiences expect to see (at least subconciously). As an exercise, note how the focus falls off in the image above, then go look at this Red Prime lens test. A more extreme example is if you look at films shot using anamorphic (film) lenses, which can really distort the image around the edges, yet still remain pleasing to the eye (check out Road Warrior for a good example). Car commercials in the last few years have taken to computer-generating the distinctive lens flares from anamorphic lenses because they like them so much.

I'll try to get up a clip of the short this still is from in the near future so I can make a better comparison.

Thursday, June 4, 2009

More Post-Production Woes

Well, the documentary was finished back in February, but I'm still trying to figure out where the fault lies in my editing system. Even after a full reinstall of Windows XP, I'm still having capturing issues and write-speed dips that I can't account for.

The only thing I can say is that the problems are not XP-specific. I've been running the Windows 7 Beta (and later, the Release Candidate) in dual-boot form for the last few months, and the same capture issues show up there.

One additional thing i've noticed, though, is how my M-Audio sound card (Delta 1010LT) now adds a fair amount of static to recordings. It was somewhat an issue before, but it's become much worse, to the point of me having to resort to recording audio via my DVX-100 over firewire (as a DV signal). From reading around online, other people having this issue are saying it's an IRQ conflict. That makes some sense given the amount of stuff I've crammed into this computer, but it's really dissapointing given that if I have the room to add two expansion cards, I would figure that would mean I could actually use them without them tripping and stumbling over each other's toes.

I really hate to say it, but at this point, I'm ready for a Mac (or Macbook) Pro. Having recently done some basic editing using Final Cut Pro on a friend's Macbook Pro, and having them not having to save their project for a day and a half before worrying about crashing, I think it's safe to say they've worked out some stability issues. Oh, and that's editing using 2K footage.

Also, Apple Prores is quite possibly the coolest editing codec I've ever worked with. If they ported it over to PC as a codec Premiere Pro could capture to, I would probably use it for everything.

Sunday, March 1, 2009