Author Topic: Virtualdub Tutorial - Xvid / DivX compression  (Read 108550 times)

Martijn

  • Moderator
  • Thanks: 113
Virtualdub Tutorial - Xvid / DivX compression
« on: January 06, 2006, 12:29:43 am »
After editing your video (may I suggest Sony Vegas?), you need to export it as uncompressed avi to get the best quality (European settings are: PAL DV, 720x576, 25fps). After doing that, you will have a very big file you want to compress before putting it online (or somewhere on your hard disk). You have to keep people with a not so fast connection in mind, so that is why I always make a 2nd medium quality (MQ) smaller filesize version (I like to use the new H.264 codec for that). For the high quality (HQ) version, I use the DivX or XviD codec. I will explain to you how to compress your video with DivX / XviD. Check out www.divx.com and www.koepi.org/xvid.shtml to download the latest codecs.


1) First of all, go to www.virtualdub.org and dowload the latest version of Virtualdub.

2) Open your exported uncompressed avi file in Vdub: File>Open video file...

3) Encode your avi file with the XviD or DivX codec: Video>Compression and choose the option "XviD MPEG-4 Codec" or "DivX 6.x Codec" in the left box. Now hit the "Configure" button. Multipass-encoding will get you better quality videos, compared to single-pass encoding. The first pass generates a little text file that is used by the second pass to have a better quality. For an excellent explanation of all the settings you can make with DivX 6 click here. For XviD setting explanation click here. I usually use a setting of around 1000 kbit/s. The higher the number, the better the quality, but the bigger the filesize. I usually keep 10 mb/minute in mind for my HQ video, so I use something between 800 and 1200. You'll have to experiment a bit with this to get the best quality/filesize results. Hit OK, OK.

4) You must have noticed the (annoying) lines in your uncompressed avi file. I suggest you use the deinterlace filter, to blend these 2 'fields' together: Video>Filters>Add>deinterlace>OK>OK>OK. (check out www.100fps.com for more info about deinterlacing)



5) Now you have to compress the audio. I usually use MP3 to encode the music. First set your audio to "Full processing mode", in the Audio tab. Now click: Audio>Compression and choose the option Lame MP3 or MPEG Layer-3 in the left box. If your uncompressed avi file has the following audio setting: 44.100 Hz, you should choose the 44100 Hz, 128 kbps CBR, Stereo option in the right box (128 kbps is what I usually use, but it's up to you which one to choose: the higher the kbps, the higher the quality, but the higher the filesize). If you don't see this option, you probably need to check the box underneath it, which says "Show all formats".



6) Now we're ready to encode. If you chose for multipass encoding you need to do it like this: after making all the settings for the 1st pass, you have to save that: File>Save as AVI... and save it. Do NOT forget to check the box which says "Don't run this job now; add it to job control so I can run it in batch mode". This will make things easier for you. Now go and make your settings for the 2nd pass (you'll probably only need to set 1st pass to 2nd pass (or Nth pass) in the encoding mode), and save this under the SAME name as you saved the first pass. Again, don't forget to check that box. After you've done this, go to: File>Job control... You will find your 1st and 2nd pass in there, click on the first one, and hit the "Start" button to start the encoding proces. It's best to leave your computer

alone when he's encoding (same with exporting as uncompressed avi).






I hope you found it usefull, and if you have any problems just let me know! (Sean and others know a lot, probably even more than me about Vdub) There is also a lot more you can find on the internet (tutorials, plugins, filters, codecs, etc), so for other stuff about this, just Google it! Tip: check out www.guthspot.se/video for other great filters, like the "area based" deinterlace filter. Also check out the MPEG compression with TMPGEnc thread of Sean.
download Made in Taiwan at www.arjangroenendijk.nl

Matt_

  • Donator
  • Thanks: 3
Virtualdub Tutorial - Xvid / DivX compression
« Reply #1 on: January 06, 2006, 04:15:32 am »
EXCELLENT! =D>

even i learned something from this thread. i foresee this thread being a huge help to future diabolo video makers. bring on the high quality!

PS. i would like to make a note--for those of us using NTSC, it's 720x480, 29.97 FPS.

edit: i need to make a couple of quick points that you didn't include, that i just realized.

1. in order to get that neat list of audio codecs (specifically the LAME MP3 one), you need to get the LAME ACM (http://www.free-codecs.com/download/LAME_ACM_Codec.htm) and install it.
2. another filter you need, besides the deinterlace, is the resize filter. resize to 640x480--that is a common internet size, and it will help your video be the correct (4:3) aspect ratio.
3. when you are encoding, i would recommend going into the main virtualdub window (sorry, i forgot the actual name of the menu, but it only shows when you're encoding) and go down to "show status window". this lets you set the runtime priority. set it to "idle" and your stuff will still encode normally, but you can use your computer normally the entire time (i ended up just watching anime today while encoding the hall/yabe workshop vid).

thats a lot of info i know, i hope people actually read it :x

Martijn

  • Moderator
  • Thanks: 113
Virtualdub Tutorial - Xvid / DivX compression
« Reply #2 on: January 06, 2006, 10:52:55 am »
Okay thanks for filling me in on that Matt :) bring on the high quality indeed! :P
download Made in Taiwan at www.arjangroenendijk.nl

erikc

  • Thanks: 0
Virtualdub Tutorial - Xvid / DivX compression
« Reply #3 on: January 06, 2006, 01:06:39 pm »
thank you both for being this helpful.
Now there's almost no excuse left to make a video.

Cheers.

Valium

  • Donator
  • Thanks: 1
Virtualdub Tutorial - Xvid / DivX compression
« Reply #4 on: January 06, 2006, 08:58:40 pm »
hey thats nice, gonna check it out when I get my hands on a cam from a friend in a couple of weeks

RoB

  • Thanks: 0
Virtualdub Tutorial - Xvid / DivX compression
« Reply #5 on: January 08, 2006, 04:38:48 pm »
Thanks a lot Martijn. Very good work, this will be very uselfull. Since i'll have my cam tomorrow.  :D .

Also thank you to Matt for the aditional info.  :D

Shawn Fumo

  • Thanks: 1
Virtualdub Tutorial - Xvid / DivX compression
« Reply #6 on: January 21, 2006, 03:31:54 am »
Good work! One last thing to keep in mind.. For the de-interlacing, blend is ok most of the time, but if you are doing an instructional video and think someone may want to step through it frame by frame, may not want to use that. Blending will cause a doubled image when looking at a single frame. In that case, the easy way is to select "duplicate field 1". It may make the edges slightly more jagged (you're losing vertical resolution), but is clearer when looking frame by frame.

A better solution than either of those is to use an adaptive de-interlacer (or a bobber for very smooth half-speed slow motion), but that may be too much to get into here. I can give some avisynth scripts if anyone has an interest... (aka video obsessed like me...haha).

There's also some other neat stuff out there like I think a plugin for virtualdub called de-shaker, which can help smooth out hand-held video.

Shawn

Martijn

  • Moderator
  • Thanks: 113
Virtualdub Tutorial - Xvid / DivX compression
« Reply #7 on: January 21, 2006, 12:07:56 pm »
Great to have such an expert here! :D

I read a lot about deinterlacing on http://www.100fps.com, some of it was easy to understand, but there were also several things I didn't quite get. I tried the "bob-method" but unfortunately didn't work for me... don't know why :oops:

Anyway, I am just fine with the blend mode myself, I use the Area based deinterlace filter all the time and I love it :)
download Made in Taiwan at www.arjangroenendijk.nl

OLOBAID

  • VotW Contributor
  • Thanks: 2
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #8 on: January 14, 2007, 03:02:32 pm »
sorry for a one year bump!
why should i select pal/ntsc standard of the country i live in?
is it better to select ntsc because of the higher framerate(for smoother slowmo?)?
my cam supports both,...
for watching on computer its the same, or not?

its hard to start away without a clue, for me wmm did the job but its about time to change :) have to read manymany sites!
and yes, thanks for this great tutorial, Tijn! your vids are the best proof that you know what your talking!

one more thing: is adobe primere a good alternative to sony vegas?

--- watch Videos on YouTube, visit my Website or mail to hiwatt@gmx.at ---

Martijn

  • Moderator
  • Thanks: 113
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #9 on: January 14, 2007, 05:44:50 pm »
Adobe Premiere is excellent, good luck with it Peter :)

I don't really understand your question about the pal/ntsc thing. I use the PAL settings, because my camera records in PAL, so I need the software to match those settings.
download Made in Taiwan at www.arjangroenendijk.nl

OLOBAID

  • VotW Contributor
  • Thanks: 2
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #10 on: January 15, 2007, 12:22:07 am »
hmm, i mean
many of the digital videocams support both standards. so does mine. i thought that it may be better to select ntsc rather than pal, because the framerate is higher...
dont know exactly but a halftime slowmotion should look smoother because of more frames per second, or am i wrong ???
just dont know which standard is better... or are they equal?
thanks

--- watch Videos on YouTube, visit my Website or mail to hiwatt@gmx.at ---

Martijn

  • Moderator
  • Thanks: 113
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #11 on: January 15, 2007, 01:29:41 pm »
I'm sorry, I don't know a lot about that. For more in depth explanations, I'd say have a google on it. www.100fps.com is a nice website with loads of info.
download Made in Taiwan at www.arjangroenendijk.nl

pranay

  • VotW Contributor
  • Thanks: 24
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #12 on: January 23, 2007, 08:35:19 pm »
In the Tutorial it's written that I have to check a box before multipass encoding which says:"Don't run this job now;and add it to job control!
Where is this box???

Martijn

  • Moderator
  • Thanks: 113
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #13 on: January 23, 2007, 08:58:43 pm »
Right here: (sorry for the Dutch buttons and stuff, but this is the window you'll get if you click File>Save as AVI...)

download Made in Taiwan at www.arjangroenendijk.nl

pranay

  • VotW Contributor
  • Thanks: 24
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #14 on: January 23, 2007, 09:35:07 pm »
Alright!!Thanks very much!!!

Matt_

  • Donator
  • Thanks: 3
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #15 on: January 24, 2007, 06:43:55 pm »

hmm, i mean
many of the digital videocams support both standards. so does mine. i thought that it may be better to select ntsc rather than pal, because the framerate is higher...
dont know exactly but a halftime slowmotion should look smoother because of more frames per second, or am i wrong ???
just dont know which standard is better... or are they equal?
thanks



You can do a bit of searching for the differences, but if I had to tell you straight off the bat, I'd say go for NTSC. Like you said, it has a higher frame-rate, which is good for faster things like diabolo. PAL has better colors and slightly higher resolution.

I also prefer NTSC because that's what the most important (IMO) movie/videogame/etc developing countries, the US and Japan, use for their video standard. Well, with the advent of HD that's disappearing, but my point is still there...

Another thing, make sure that you keep your sound settings the same from the camera to Premiere (or whatever program). If you record in 12 bit audio, then edit in 12 bit. Although, I'd recommend 16bit audio because that's the same bit-depth as the CD format, so if you're going to add music (highly likely!) then it won't have to convert from 16bit > 12bit.

Eric Moffett

  • VotW Contributor
  • Thanks: 10
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #16 on: September 01, 2007, 05:43:41 pm »
By using this method you could use the latest  LAMEMP3 codec (which is now completely it's own code according to the site), and the latest DIVX MPEG4 compression right? So that when they get updated you can update your compression? By like adding the codec s to the folder or whatever.
Diabolo Acquired - Thurday, 2/08/07
Vertax Skill Acquired - Thursday, 4/12/07
2 Diabolo Skill Acquired - Tuesday, 5/29/07
3 Diabolo Skill Acquired - Eh, No?

Martijn

  • Moderator
  • Thanks: 113
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #17 on: September 02, 2007, 01:41:23 am »
If you install the latest versions of the codecs you want to use, Virtualdub will be updated automatically.
download Made in Taiwan at www.arjangroenendijk.nl

Eric Moffett

  • VotW Contributor
  • Thanks: 10
Re: Virtualdub Tutorial - Xvid / DivX compression
« Reply #18 on: September 03, 2007, 08:08:10 pm »
oh cool, thanks
Diabolo Acquired - Thurday, 2/08/07
Vertax Skill Acquired - Thursday, 4/12/07
2 Diabolo Skill Acquired - Tuesday, 5/29/07
3 Diabolo Skill Acquired - Eh, No?