11
Part B: Encoding your video with x264 in 1080p and 720p 1. If you haven't yet, render out your uncompressed AVI file to the "encoding" folder of this tutorial package. Name the "avi" file "Encoding". This is important. Then, go to the "Avisynth" folder and install Avisynth_258.exe. 2. Now, it's time to start encoding. Go to the "MeGUI preloaded" folder, and double click on "MeGUI" folder. Find the "Megui.exe" file.

x264 Encoding Megui

Embed Size (px)

DESCRIPTION

x264 that shzznit

Citation preview

Page 1: x264 Encoding Megui

Part B: Encoding your video with x264 in 1080p and 720p 

1. If you haven't yet, render out your uncompressed AVI file to the "encoding" folder of this 

tutorial package. Name the "avi" file "Encoding". This is important.  

Then, go to the "Avisynth" folder and install Avisynth_258.exe.  

 

2. Now, it's time to start encoding.  Go to the "MeGUI pre‐loaded" folder, and double click on 

"MeGUI" folder. Find the "Megui.exe" file.  

 

Page 2: x264 Encoding Megui

Double click on it, MeGUI will open up. Don't worry about updating it. By default, you are on 

the "input" tab.  

 

To the right of "Avisynth Script", import (click on the small box with " ... " inside of it) 

 

 go to the "Encoding" folder and open EncodingFullResolution.avs. Your video with pop up. If it 

doesn't, then your .avi file isn't in this folder, and/or the .avi file is not named "Encoding". 

Underneath the input tab, select your video output of the video encode, or keep it as default. 

You're just changing the name and the output location with that setting.  

 

 

Page 3: x264 Encoding Megui

3. To the right of the "Encoder Settings" (located under Video Output) click on the long 

rectangle (to the left of "config") and select x264: FraGTaLiTy's x264 Preset for decent outcome, 

OR select one of the Ultimate‐Presets for an even better outcome, at the price of longer encode 

time. If you want to choose one of the Ultimate‐Presets, pick the one that is CLOSEST to your 

video's resolution. If your video's resolution does not match one of the presets, don't worry. It 

won't distort your video, your video's resolution will remain the same after the encode. 

 

4. If you used FraGTaLiTy's x264 Preset:

 

Click on "Config". See the "Quality" value to the right? This is called a "CRF Value" By default, it 

is on 18. The higher the value, the lower the file size and the higher the loss of quality. The 

lower the value, the higher the file size and the lesser amount of quality loss. I would 

recommend trying "18", but if that is too big after you encode it, try again at any value between 

Page 4: x264 Encoding Megui

18 and 23. Leave everything else alone. Click "OK".

 

If you used FraGTaLiTy‐Ultimate x264 Preset: 

 

Click on "Config". This preset is bit‐rate based. Feel free to tweak the bit‐rate within 2000 kb/s 

of the default bit‐rate. If you want to hit a particular file size and want to find a bit‐rate 

accordingly, go here http://www.3ivx.com/support/calculator/index.html. When done, click 

"OK". 

 

note: Because of how CRF works, you can actually afford to use a higher CRF value with 1080p 

than you can with 720p, so don't be afraid to use a higher value for your 1080p version than for 

Page 5: x264 Encoding Megui

your 720p version. Also, if you know a bit about x264 feel free to play with the settings, but the 

preset I made hasn't failed me yet. 

5. File format: both MKV and MP4 are equally great, but most people seem to use mp4 in the 

fragvid scene, so just use that. MKV is more stable, but not as compatible yet.  

 

6.  Now, it's time to set up the audio. On the bottom half of megui, hit "Audio Input" and import 

your Encoding.avi file. 

 

Go down to "Encoder Settings" and select "FAAC: *scratchpad*". It's automatically on a high 

bitrate, you can adjust it accordingly by hitting "config", or just leave it at default (the highest it 

will go". 

For extension, select "M4A" if it isn't already. 

 

Note: If you are encoding audio that is not stereo, such as 5.1 or 7.1 surround sound, don't use 

mp3. Use DTS or something, I'm not an expert when it comes surround sound audio encoding 

so you'll have to ask Google. 

Page 6: x264 Encoding Megui

7. So, now we have our video and audio so up. We are now going to begin encoding. We are 

going to set it up in a way so that your audio encode, 1080p encode, 720p encode, and youtube 

encode go one after the other. 

Go ahead and hit "Enqueue" at the bottom in the audio portion. 

  

8. Then go back up and hit "Enqueue" in the video section. 

 

Page 7: x264 Encoding Megui

9. We now have our video and audio ready to encode. Now we have to get our "youtube" 

encode ready. This is the version you will use when uploading to youtube. Simply go back up to 

the video "Encoder settings" and select "FraGTaLiTy's Youtube Preset". Make sure you name 

the Video Output something different than "Encoding", otherwise it will overwrite the last 

encode. Just name it "Youtube". Then hit Enqeue again.  

Optional: If you followed the interpolation guide, you're also going to want to encode a 720p 

version. Luckily, you won't have to re‐render. I have a resizing script. Simply go back up 

"Avisynth Script" 

 

and then find "Encoding_resize.avs". 

Before importing it, you're going to have to open it and do some math. 

Right click on "Encoding_Resize.avs" and open it with Notepad.

 

If your Encoding.avi video file is 1920x1080 resolution, you don't need to do anything. 

1280x720 is correct. However, if you cropped it, then you'll need to adjust this script 

accordingly. Divide the height by the width of your video's resolution, and multiply that value 

by 1280. Change the "720" in this script to that value. 

For instance, if you cropped your video to 1920x1020, you need to divide 1020 by 1920, and 

multiply that value by 1280. The answer is .53125. Multiply that value by 1280. The answer is 

680. Therefore you change the script to (1280, 640). 

Once you have adjusted your AVS script accordingly, go to FILE>SAVE. 

Page 8: x264 Encoding Megui

Your Resize AVS file is not good to go. Import it into Megui, select either the "x264 preset" or 

the "Ultimate Preset" closest to the video's resized resolution, and hit Enqueue.

 

11. If you followed all the steps, including resize part, we have all the encodes outlined in Megui 

in this order: 

  1. Audio  

  2. Video encode at native resolution 

  3.  Youtube encode 

  4.  720p Resize encode (optional) 

It's time to start the encoding. Go over to the "Queue tab" 

 

Here you will see a list of all the jobs you "queue'd" earlier. Depending on what presets you did, 

you may have anywhere between 2 and 6 jobs listed (the ultimate presets are "double pass, 

thus 2 jobs for 1 encode). 

Page 9: x264 Encoding Megui

 

Hit "Start", and all the jobs will begin, in order from top to bottom. 

 

It will take a while to perform all these jobs... so leave Megui alone until it completes 

everything. 

Page 10: x264 Encoding Megui

12. Once it finishes, you will have 1 audio file, and all your x264 video encodes. We need to 

combine the audio and video together into 1 file. 

In Megui, go to TOOLS>MUXER and select the tool that matches the extension of the file you 

encoded. Refer back to step 5 if you forgot, or just look at the video file you encoded. 

 

For "Video", Select one of your video files, and for "Audio 1", select your audio file. Then hit 

"Queue". 

Page 11: x264 Encoding Megui

 

Do this for all the video files you encoded, hitting "Queue" after each one. Use the same audio 

for all of them. Once you've done that, go back over to the "Queue" tab, and you should see all 

the jobs listed. Hit "Start". This will all happen very quickly.  

Once it finishes, you successfully have all your x264 copies, and are ready to release to the 

public. Remember to use the "Youtube" version for Youtube, and the other copies for people to 

download on their computers.  

If you're having trouble playing any of these video files, check out this guide: 

http://www.mlgpro.com/forum/showthread.php?t=320946