PDA

View Full Version : Compression in Fandubbing



Fernie
07-24-2006, 10:03 PM
Compression in Fan Dubbing (Or how to get the file size down without it looking or sounding like ass)

Is this really worth me typing out an entire tutorial for? I don’t know, but I very often see fandubs encoded in an .avi format with either lousy audio quality or pointlessly large file sizes. I figured there might be at least one or two people who would like to know how to rectify that, so I wrote up this small little tutorial.

In the very small world of fan dubbing, there are quite a few folks who will use a video editing program such as Adobe Premiere or (shudder) Windows Movie Maker. And while there’s nothing wrong with that, I’ve seen some quality productions from folks who use such programs, I prefer to have the versatility of a dedicated audio editing program such as Cool Edit or Adobe Audition, along the video quality and size advantages that using an .avi and a codec such as xvid would offer as opposed to .wmvs. However, to put the audio mixed in with the video the usual course of action would be to use a handy little program called Virtual Dub. While I love the program, its audio compression options are less than acceptable.
If you know your way around Virtual Dub feel free to skip a few steps wherever you feel is necessary, I’m just illustrating the way I usually go about doing it.


Step One - First off, I’m assuming you’ve finished mixing your fandub, all that’s left is getting it down to a size you can upload to the internets. At this stage you’ll need to decide what resolution you’ll want the video, and in turn the file size of the clip itself. Usually either whatever the original size of the raw was, or about half that. That would mean 640x480(640x360 for widescreen) or 320x240(426x240 is what I prefer to shrink WS down to) Not a hard and fast rule, but it works for me. If you decide to keep it the original size you can simply go to Video -> Direct Stream Copy and move on to the next step. If you would like to make it smaller you should, after opening the video file, go to Video ->Filters, click on add, then select resize. Plug in the new numbers into the new width and height and select some sort of filter mode, whatever looks best to you. Click ok a couple of times and you should see a smaller version of the original on the right screen.

http://www.seraphskye.com/site/SCpicture1.jpg

It’s not enough just to change the size though, you should also compress it to an appropriate bitrate. To do this we go back to Video -> Compression, select the Xvid codec (my favorite, mainly because of its efficiency, good video quality, and open sourced nature) and click on configure. In there, if you do not see a button labled “Target Bitrate (kbps)” click on “Target quantizer” until you do. Then either grab the slider or enter in an number in the space to the right of that button. The number you enter really depends on the resolution of the video and how much video quality you’re willing to sacrifice. I’ve found a good rule of thumb is around 350kbps (thousands of bits per second) for a video that’s around 320x240(426x240) Feel free to experiment with this a bit, try encoding at lower and higher bitrates and see how much of the file size you can cut without it looking horrible. It all depends on how much movement is present in the video, a slower paced anime could get away with something near 250kbps. Anyway, click okay a few times and you should be ready for step two.

http://www.seraphskye.com/site/SCpicture2.jpg

Step Two - A relatively simple one. Go to Audio -> and select No Audio. Yeah, it might sound a bit counter intuitive, but our plan is to use another program to actually stick the audio in with. Usually people would open a .wav file and either encode the video using that, or going into the audio compression and using the built in Mpeg Layer 3. But VirtualDub is capped off (due to some legal reasons I won’t bore you with) to only 56kbps, 22050hz sound. That results in a very muddy and almost radio sounding clip, and we’re going to avoid that. So yeah, select No Audio.

Step Three - Also a simple one. Go to File ->Save as Avi, and save the file. You might want to stick something like “mute” somewhere in the filename so you can easily tell the difference.

Step Four - So now that we have the video out of the way, lets work on the audio a bit. Start off by mixing down your project into a .wav, you’ve likely already have done this if you were planning on working with VDub anyway. Compress that file into an .mp3. I’m hoping you can figure out how to do that part, right? As for the settings, something along the lines of 128kbps, 44100hz, and Stereo. That should be enough to make it sound acceptable but if you must be picky about it feel free to increase the kbps. Just keep in mind the bigger it is, the bigger the file size will be.

http://www.seraphskye.com/site/SCpicture3.jpg

Step Five - Now it’s time to find Virtual Dub MOD. Someone out there has taken Virtual Dub and modified it to do a couple of things differently. However it runs very slowly and I wouldn’t recommend it for daily use, hence our doing all that work beforehand in regular VDub. Go download it here. (http://www.free-codecs.com/download/VirtualDubMod.htm)

Step Six - Now we open up VDub Mod, open up our muted video. Then we click on Streams -> Stream List, and it should be empty (because we encoded our muted file without any audio tracks, otherwise you would see something). Click on add, and select the .mp3 we made in step four, and select ok.

http://www.seraphskye.com/site/SCpicture4.jpg

Then File -> Save as. But wait! Be sure to check the bottom of the window and change the full processing mode to Direct Stream Copy, we don’t want to mess around with the video again.

http://www.seraphskye.com/site/SCpicture5.jpg

Save it, and we are done. Now you should have a decent looking, decent sounding fandub that won’t have a bloated file size, save yourself a bit on the bandwidth, and save the poor 56kers among us a few hours of their time. Yay.


Examples! (to illustrate my point, the same video quality was used, right click and save as)
-No compression of audio, just going to Audio -> Wav audio and saving with that. Almost 4MB for 16 seconds. =O (http://www.boringmonkey.net/other/compress/UncompressedExample.avi)
-Compressing using VDub’s poor quality Mpeg Layer 3 thing. (http://www.boringmonkey.net/other/compress/BadVDubExample.avi)
-The way I’ve rambled on about. =D (http://www.boringmonkey.net/other/compress/VDubModExample.avi)


Heh, I don’t know if I’ve said too much or too little, please let me know if this was helpful and made any sense, or if you would like me to clarify anything.
Thanks!
-Fernie