Index

Introduction

Having been in the pc editing community for about 6 years, i've dealt with different methods of encoding. Ofcourse, within AE/SV there are several methods to render your video out, and media encoder offers a great deal of encoding presets for web. For external encoders, the most easy to use and the one i've always used is Handbrake. Handbrake has, in comparison to MeGUI a fairly easy to use GUI. Other people have been speculating MeGUI has always been the better encoder, but the interface can be quite intimidating to users not familiar with rendering I went through the effort of putting together encoding results for each method, including a newer method, using FFMPEG and the windows command line

Requirements

*Download the build, extract, navigate to the bin folder and copy ffmpeg.exe, ffplay.exe and ffprobe.exe into your System32 directory *optional

Rendering & encoding methods

First, i rendered an image sequence directly from the game engine, editing it comes next, which was done in AE. (Add some cc-lens, directional blur, s_glow, whatever you're into!) Rendering it out of AE is the easy part, i would recommend rendering as lossless (format: .AVI), or as image sequence with a separate audio track, preferably PNG or TGA You can put the image sequence and audio track together in VirtualDub. Vdub: After installing, open VirtualDub and drag the first image of the sequence into the window. Press Ctrl+R to set the framerate (Must be the same as your AE composition, Press Ctrl+K in AE to check this) Go to the Audio menu, hit 'Audio from other file' and select your audio file, you'll see a window pop up. I'm not quite sure what to put here, but i always go with 'autodetect' Additionally, you can change the compression by hitting Ctrl+P. Lagarith lossless can save you some disk space. Remember, we're rendering in an uncompressed format. The filesize will be high, so make sure you have enough space available on your hard drive a video containing 250 1920x1080 frames will be around 2.35GB, 1.40GB if rendered with the lagarith lossless codec using Vdub Let's have a look at the orginal video file: #Input, VDUB/AE render Length: 00:00:05 Size: 1.40 GB MB/S: 180 Frame width: 1920 Frame height: 1080 Framerate: 48 frames/second Extension .avi Codec: Lossless/Lagarith Lossless At this stage, we're ready to compress! Below you can see the results of each compression method Click on the names to see the settings used for the final results Render times may vary depending on computer speeds. #Method 1, Handbrake encoding time: 0.13 Frames/second Length: 00:00:05 Size: 60 MB MB/S: 12 Frame width: 1920 Frame height: 1080 Framerate: 48 Frames/second Extension .mp4 Codec: h264 #Method 1, MeGUI encoding time: 0.10 Frames/second Length: 00:00:05 Size: 141 MB MB/S: 12 Frame width: 1920 Frame height: 1080 Framerate: 48 Frames/second Extension .mp4 Codec: h264 #Method 3, FFMPEG/Commandline encoding time: ~20 Frames/second Length: 00:00:05 Size: 199 MB MB/S: 38 Frame width: 3840 Frame height: 2160 Framerate: 48 Frames/second Extension .avi Codec: xvid

Conclusion

No matter what you choose, MeGUI, Handbrake, FFMPEG, the results are very similar. To put everything into perspective, i have exported the exact same format youtube displays at 1080p for each method used. Comparisons: You can go ahead and try to compare each frame with the raw version. To any normal human being, there may not be a big difference, just a few pixels blurred.. who cares? To everyone who gets a hard on from high-quality videos, i've got good news! I compared them using a difference matte at 7.5% tolerance By counting the amount of black pixels, you start to see a noticable difference. It's a small difference, but big enough for those who seek the best quality possible If you look at the graph, you start to see a big difference between frame 1 and frame 30 The first frames will always be lossy, no matter the codec. There really isn't anything you can do about that. Until i tried to render my video at a higher resolution..

Upscaling

Take a look at the output format youtube displays for each video (at 1080p)

Handbrake (x264)

Format code extension resolution note
299 mp4 1920x1080, DASH video 5776k, mp4_dash container, avc1.64002a, 48fps, video only, 3.47MiB

MeGUI (x264)

Format code extension resolution note
299 mp4 1920x1080 DASH video 5774k, mp4_dash container, avc1.64002a, 48fps, video only, 3.47MiB

FFMPEG (xvid)

Format code extension resolution note
299 mp4 1920x1080 DASH video 5773k, mp4_dash container, avc1.64002a, 48fps, video only, 3.48MiB
Once a video gets uploaded, youtube converts it to separate formats. 144p, 240p, 360p, 480p and 720p formats are generated from a 1080p source. Just how many different formats are there? Take for example the video ran through handbrake, with 1080 as highest resolution. The stats tell us it is using format code 299 Now take a look at all formats available: Each video has different format options, i'm assuming some are for web, some are for mobile. The formats displayed above are the formats youtube returned, when looking at the current stats. Obviously 299 should be the highest.. right? It appears there is is another format code, used only when there is a higher quality version of the video available Instead of 299, it is using format code 303 with WebM as extension, which is primarily used for HTML5 players Check the stats for nerds and see for yourself:

FFMPEG (xvid), upscaled to 4k

Format code extension resolution note
303 webm 1920x1080 1080p48 4664k, vp9, 48fps, video only, 2.80MiB
Comparing both formats you start to see a noticable difference, especially on the first frames. And the difference mattes (All white pixels show the difference between the by YouTube encoded video and the raw footage) We can put these results into a graph: The graph displays the amount of black pixels from a difference matte with a tolerance of 7.5%

Final Result & Best settings

In the end, it doesn't really matter what codec or method you use, the differences are so minimal, you just have to make sure you get their settings right. Refer to methods to choose your preferred method. Obviously, having a quick look at the first graph, xvid/ffmpeg should be your preferred method This method wins by quality and speed. the filesize is decent, so the upload to youtube should be worth the wait. You can download this little script i wrote to convert your uncompressed .avi files into the xvid format

Download the Xvid fast converter

NOTE: THIS SCRIPT REQUIRES FFMPEG, REFER TO REQUIREMENTS AND FOLLOW INSTRUCTIONS

Download the script

Installing/Usage provided in the readme.txt shipped with the download Read carefully before encoding! The download also includes a Pre-records batch converter, an alternative to Handbrake which surprisingly, does not lag AE or Vegas. You have to make sure you have the xvid codec installed, again, refer to the requirements to download the xvid codec Feel free to make a video related to this script, make sure to credit this page http://gmzorz.com/render