Monday, October 12, 2009

Quick & Dirty Rifftrax Re-Author

This guide is for creating a Rifftrax video in Ubuntu utilizing an AVI source file. As the title says, this is a 'quick & dirty' method. I'm not going to go over audio ducking or Disembaudio muting. Perhaps I'll include these in a future tutorial.

First off, we're going to need to acquire three programs: mencoder, ffmpeg, and audacity. These can be installed the normal way either through the Synaptic Package Manager or via command line.

sudo apt-get install audacity
sudo apt-get install mencoder
sudo apt-get install ffmpeg

(If you need to generate an AVI file from your DVD, I recommend Handbrake.)

Once you have all three programs, we'll begin by extracting the MP3 audio file from the AVI. Make sure you're in the proper directory and from the command line enter:

ffmpeg -i room.avi room.mp3

As you can see, my input file is called room.avi. You'll, of course, have to change to the name of your file. The audio output is room.mp3. You can call this file whatever you please. (Note: You can use mencoder to extract the audio, but it generates a much bigger file and takes longer.)

Next, we're going to remove the audio track from our video source. (That is we want a video with no sound on it so there's no conflict when we recombine.) Again, you can name the output whatever you feel like.

mencoder -ovc copy -nosound room.avi -o room_mute.avi

Along with the Rifftrax mp3, we should have all the files we need. Now comes the tricky part. Fire up Audacity. Import your movie's audio by choosing File-->Import-->Audio or by simply dragging the files onto Audacity. Our sound waves are a bit mashed together, so click the + magnifying glass several times.

Now we need to find the spot on the Rifftrax audio where Mike tells you to pause. This usually occurs around the 2 minute mark. It also might be helpful to mute the movie audio for now. Click the area just after the 'pause.' Press Shift + J to select the area from your cursor to the start of the track. You should have something that looks a bit like this:

Press the Delete key to remove this selection. Un-mute the movie audio if you muted it before. Press play and note down the time of Disembaudio's first sync line and also time for the corresponding line in the movie. The movie audio line might be obscured by sound effects/music, so zoom in more if necessary. (Use the counter down at the bottom left to get very precise time measurements.)



In my example, I found that Disembaudio's sync started at 2 minutes 8.155 seconds. The corresponding movie line occured at 2 minutes 27.340 seconds. By subtracting, we can determine that Disembaudio is 19.185 seconds ahead of the movie.

Go back to the beginning of the Rifftrax audio and place the cursor in the area with no sound. From the menu choose Generate-->Silence. From the drop down choose hh:mm:ss + milliseconds. Enter the amount you want to offset, in this case 19.185. You should be fairly spot on with this method, but if you're off for some reason, just add or subtract silence from the beginning of the track. One final thing you might want to do is adjust the gain from the -/+ slider to the left of the track. I like to make my Rifftrax audio somewhat louder than the movie.


Finally, the hard part is over. Choose File-->Export-->Ok. Name your file something like room_mixed.mp3 and click Ok.

Once this is done exporting, all we need to do is combine our mixed audio with our audioless video source. For this we turn back to our old friend mencoder. From the command line type:

mencoder -ovc copy -audiofile room_mixed.mp3 -oac copy room_mute.avi -o room_rifftrax.avi

And there you have it. Enjoy!

Sunday, September 27, 2009

Allow Multiple Users to Share a Single Virtual Machine in VirtualBox

I wanted to enable a second local user to access the Windows 7 virtual machine I'd set up using Sun VirtualBox. This is actually a fairly simple process where the main hurdle revolves around permissions.

Navigate to the VirtualBox installation folder (.VirtualBox) which is located your home folder. You'll have to enable the viewing of hidden files in the view menu or by pressing CTRL+H.

Open up the HardDisks folder and right click on the .vdi file containing the VM you wish to share. Click the permissions tab. Where it says, Others Access choose "Read and write" from the drop-down menu and click Close.

Now you're going to want to log in as the second user and open up VirtualBox. Click New and then Next. You can name your machine whatever you want here. In the OS Type drop-down box, make sure you choose the same version as you installed before, in this case Windows 7. Click Next. Choose a memory size. The default is good. Click Next.


Now you're going to want to choose "Use existing hard disk." Click the little folder with the green arrow on it. Click the Add button and navigate to where the .vdi file is located in the other user's home directory. You'll have to Right Click and Show Hidden Files. Select the desired .vdi file and choose Open.

Click Select. Now you'll be able to use the existing hard disk. Click Next. Click Finish.

You should now be able to start the virtual machine as normal.

Wednesday, September 23, 2009

Configuring Dual Widescreen Monitors

Setting up a dual, widescreen monitor system used to be extremely painful. Fortunately, this is now much easier to accomplish. I have an NVIDIA 8800 graphics card. I assume this will work similarly for any NVIDIA product. The first step is to install the proprietary drivers.

Click System --> Administration --> Hardware Drivers

You'll get a setup box that will allow you to choose between a couple of different drivers. The newest one is recommended. Once you activate it, you'll be asked to restart your system.

Once this is complete, open up a terminal.

Click System --> Accessories --> Terminal

Type:

sudo nvidia-settings

This will open up the NVIDIA X Server Settings box. (Note: you can also open this from the menu, but it will cause problems saving the configuration file later due to permissions.)

From here you'll want to choose the X Server Display Configuration option. It should look similar to this:

Click the disabled monitor and then Configure. Next, you'll want to choose Twinview.

You can also adjust your screen resolution or position as desired. Click Apply.

You'll be given the option of keeping these settings or reverting back to default. If things look fine, click OK.

We're almost done. Click Save to X Configuration File. Keep the default settings and choose Save.

That should be it. Enjoy!

Welcome to Ubuntable!

Like many, I've flirted with Linux operating systems. I've done the virtualization thing. I've done the dual booting. That's all well and good, but now I believe now that it's time to take the plunge. I'm jumping head first into the world of the open source.

By this, of course, what I'm mainly refering to Ubuntu, for which this site (obviously) will be dedicated. You might ask "Why Ubuntu?" The explanation is easy. It works. It works quite well. For the most part. There are other fine flavors of Linux out there, but this is on the one I find works best for me.

This blog will serve as documentation for everything else that's not included in "the most part." While this is mainly to solve specific problems pertaining to my own system, I hope that others might find it useful as well.