Making A DoD Movie: The Complete Guide

 

Rendering & Compression

Rendering & Compression is all about the codec you apply to a movie to reduce the file size.

People go wrong in the quality area.

Basically as you would know by now, when you record your footage it is totally uncompressed in image file format. When you render the footage with a codec it compresses it's file size. To do so it must lose something in order to lower its size. Normally we see a reduction in image quality, color quality or sound quality. Choosing the right codec is essential as it could quickly undo all your hard work during the editing phase.

There are really three main codecs that get used; WMV, XVID (.avi) and x264 (.mp4). I will deal with the first and third of the codecs. XVID some people will swear by, however, in my experience I find that it looses your luster and can loose the keyframe locations that you have so carefully left, coupled with this the compression is not great. Due to this I will personally walk you through WMV, which is the sweet and easy nub way to compress, and x264, the coders code.


WMV9:

Pros: Decent to average file size, good quality at any resolution. Very simple encoding process.

Cons: Toubles with color balance. Edges of reds can be lost, areas of green can be oversaturated.

 
How To:

1.
Select --> "File" --> "render as"
2. Select --> "Windows Media Video V9 (*.wmv) from the "Save as type" drop down.
3. Click on --> "Custom"
4. It will bring up the following window, starting with the "Project" tab.

Copy my settings shown above.

5. Click --> "Audio"

Copy my settings as shown. (You can ofcourse increase the kbps and kHz however this will increase the final file size, I find these settings give a nice crisp sound for a good file size).

6. Click --> "Video"

Copy my settings. Again you may raise or lower the bps figure, however, the higher you make it the higher file size and vice versa for lower. I find 5bps is a happy medium for .wmv.

7. Click --> "Ok" (You don't need to adjust anything in the "Bit Rate" and "Index" tabs.
8. Click --> In the "Template" drop down box and type "5mb wmv" and then click the "disk" to save. (This will save your settings so you don't need to re-do it everytime.
9. Click --> "Save"
10. Wait and wait. Rendering takes a long time. Allow up to 10hours for a feature length movie.

 

x264:

Pros: Lowest file size out of any codec, high quality at most resolutions.

Cons: Slow encoding process and difficult to use.

Files required (click to download):

*
x264 files
*
huffyuv codec

 
IMPORTANT: Your video resolution height and width MUST be divisible by 16. i.e. 1024*768 is divisible by 16. if you want to use 800*600 just change the resolution to 800*592 as they are both divisible by 16 and the -8 on the height will not be noticeable.
 

How To:

1. Firstly download and extract the above files (WinRaR required).
2. Open the folder called "Huffyuv-2.1.1", and right click on the file "Huffyuv.inf" and select "Install"
3. Open the file called "x264-encoding-pack-unreal" and double click on "Avisynth_257" to install it and double click on "Yamb-1.6" to install.
4. Copy the folder called "x264" to "C:/Documents and Settings/USERNAME"

Note:

Avisynth_257: is used to encode our video file.
Yamb-1.6: is used to Mux. Muxing is the process which combines our audio and video files into one final file.

5. We need to make sure our file extensions are visible for x264 to work. To do this we go to, "Start" --> "Control Panel" --> "Folder Options" --> "View". The below window you can now see.

Make sure you check this highlighted box.

*Back to Vegas

Now we need to create some uncompressed files in Vegas. For this we will use the .avi and .wav presets.

First we will render our uncompressed Video.

6. Select --> "File" --> "Render As"

Now in your "Render As" window

7. Save as type --> Video for Windows (.avi)
8. Template --> Default Template (uncompressed)
9. Then click on the "Custom" button. In your "Custom Template" Window:
- Project tab > Video Rendering Quality: Preview (this will prevent deinterlacing and you will not lose any quality)
- Audio Tab > Uncheck "Include Audio" box
- Hit okay. Name it what you want, and hit save. (It's easier if you just save it to your desktop)

This is your master video file. It's uncompressed and you can encode it into whatever codec you want.

After that's done, you'll need to produce the uncompressed audio file:

10. File --> "Render As"

Now in your "Render As" window

- Template: Default Template
- Save as type: Wave (Microsoft) (.wav)
- Hit okay. Name it what you want (preferably the same as the video i.e. if you named your video blah.avi then name your audio blah.wav), and hit save. Agian it's easier to save this to the desktop also.

This is your master audio file. It's uncompressed and you can encode it into whatever codec you want.

Okay now we have our two core files which we will compress seperately.


11. Move --> Your audio and video files to " C:/Documents and Settings/username/x264"

Audio:

12. Start --> Run --> type "cmd"
13. This is the command prompt. When I tell you to type something in within this section DON'T USE THE QUOTES.

The default directory should be: C:/Documents and Settings/username


14. Type --> "cd x264" and hit enter

Now your directory should be: C:/Documents and Settings/username/x264

15. Type --> "faac -w -b 128 audiofilename.wav" and hit enter.

Your audio file should encode pretty quickly. You will now have a file called "audiofilename.m4a" in your C:/Documents and Settings/username/x264 folder. This is your compressed audio.

Video:

Remember, resolution (width and height) must be divisible by 16!

16. Right-Click in any white area in your C:/Documents and Settings/username/x264 folder -> "New" --> "Text Document".

Rename it to: videofilename.avs (obviously replace videname with the name of your video file i.e. blah

17. Windows will ask you if you want to change the file type. Say yes.
18. Open up the file (it won't know what program to use. Just do Chose Program from List and use notepad). Put this in the body:

AVISource("videofilename.avi")
Crop(0,0,-0,-0)
ConvertToYV12()


19. Save it and close it.
20. Double Click --> "megui.exe" (you may get an error when you open this like I do, however if you just move the error screen out of your way you can still use the program; don't close the error screen as megui.exe will close)
21. Codec --> "x264"
22. File Type --> "MP4"
23. Across from AviSynth Script click on the "..." Button. Browse to: C:/Documents and Settings/username/x264 and click on videofilename.avs.

A new window should open up with the video file. You don't need to do anything there. Just close it.

24. Back in your main window, Click --> "Config"
25. The first thing you MUST do is set your "AVC Profiles" to "High Profile"

Now use the settings that I have above.

26. Click --> "RC and ME"

Again use my settings as above.

27. Click --> "Advanced"

Again use my settings as used above.

Also within the "Advanced Tab"

Note: I can't guarentee good quality or smooth playback with these settings. x264 is tricky. Every video is different. Currently I get about 23 MB/minute with amazing quality @ 800x592 with these settings. To increase the bitrate change the bit rate from "3100" to a higher number less than "5000" in the "main" tab. This will effect the compression amount.

28. Click --> "Ok"

Back in the main Window

29. Click --> "Enqueue" (this puts your video file into a queue)
30. Click --> "Queue" (you will now see 3 jobs in queue)
31. Click --> Start

Note: Encoding in x264 takes a VERY long time. Be patient. After you're done encoding, you'll have a file named "videofilename.mp4" in your C:/Documents and Settings/username/x264 folder. This is your compressed video file.

Muxing:

32. Double Click --> YAMB.exe
33. Across from Audio and Video in blue text hit add. Add both your audiofilename.m4a and your videofilename.mp4 files. For the final time, THEY MUST HAVE THE SAME NAME OR YOU WILL GET ERRORS.
34. Click --> Mux
35. Save it as what you want and hit okay

DONE!

With x264/.mp4 files WMP will not play them. I suggest using VLC Player which you can download HERE. In fact I recommend VLC for all your movie viewing.

Congratulations you have now reached the level of:  Elite

Next

Back to HOME