Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Video Encoding x264 (MeGUI)

28 Aug 2010   #10
Wishmaster

Windows 7 Home Premium 64bit
 
 

My guide is really geared more towards HD TBH, but does work with DVD.

I would just create the AviSynth scripts with MeGUI.


--The main settings that impact encode time the most are in the Analasys tab.

Lowering Subpixel refine to 7 & ME range to 16 will speed things up quite a bit.

All though the quality wont be as high, it will still be very good.

The encoding FPS will depend largely on a couple things.
The encoder setting 1, and the resolution of the video. Also if resizing.

You also try different profiles if you so choose. The same basic idea will apply however.
many profiles are geared toward differnt types of files, the one I reccomend just keeps things within BluRAY and HD standards.

But these 2 settings are the 2 that will affect encoding time the most as well as bit rate to a much smaller degree.


My System SpecsSystem Spec
.
28 Aug 2010   #11
rurouni572

Windows 7 Ultimate x64
 
 

I do a lot of resizing. My camera films 1080i, but I usually resize everything to 720p to keep file sizes reasonable.

So I guess the resolution of the raw video being 1920x1080 and then resizing to 1280x720 is what's hurting my fps the most? Because I tried lower Subpixel refine to 7 and ME range to 16 and it's still at about 24 fps as opposed to the upper 20's.
My System SpecsSystem Spec
28 Aug 2010   #12
Wishmaster

Windows 7 Home Premium 64bit
 
 

Anytime you are dealing with Hd content it will take a while. you must consider how many pixels its actually dealing with.
If you test these settings with DVD resolution for example, youll likely get 40ish+

18-24FPS is actually about average for a second pass.
But the quality itself should come out quite good.

The second pass is usually the slowest.

Are you using Automated Two pass?
In the Misc Tab, did you uncheck "Slow First Pass"?


With this checked, the 1st pass is very slow, like the second for very little gain in quality.


Constant Quality is a quality based 1 pass that slightly faster overall. 18-20 are good seetings for it. Lower being better quality/larger file size.
My System SpecsSystem Spec
28 Aug 2010   #13
rurouni572

Windows 7 Ultimate x64
 
 

Yep, automated two pass, unchecked slow first pass. I ran some slightly less aggressive settings and the video still looked fine. I'm at about 25fps.

I think I figured out what's going on here though. The sites that posted benchmark results were using 720p source videos. They also used sharktooth's SA-Blu-Ray megui profiles.

I ran the same benchmark x264 tool and I was able to get 85fps first pass and 34fps second pass. I didn't realize how much resizing was an issue when it came to fps. O_O

In any case, excellent guide. I didn't know that I had to index files for MPEG-2 encoded source files. This is far more detailed and informative than trying to piece together bits and pieces from multiple forums.
My System SpecsSystem Spec
.

28 Aug 2010   #14
Wishmaster

Windows 7 Home Premium 64bit
 
 

Quote   Quote: Originally Posted by rurouni572 View Post
Yep, automated two pass, unchecked slow first pass. I ran some slightly less aggressive settings and the video still looked fine. I'm at about 25fps.

I think I figured out what's going on here though. The sites that posted benchmark results were using 720p source videos. They also used sharktooth's SA-Blu-Ray megui profiles.

I ran the same benchmark x264 tool and I was able to get 85fps first pass and 34fps second pass. I didn't realize how much resizing was an issue when it came to fps. O_O

In any case, excellent guide. I didn't know that I had to index files for MPEG-2 encoded source files. This is far more detailed and informative than trying to piece together bits and pieces from multiple forums.
If its MPEG2 source, I have found indexing provides better results.

And yes, the downsize from 1080 --> 720 does make a difference time-wise

But the end result is certainly worth it IMHO considering File Size VS Quality

Typically no de-interlacing is needed for HD content. But being a 1080i, you may want to do so. Analysing it will set the best way to do it.

--You may also wish to experiement with resizers.
I recommend and prefer Lancoz resizer, as I find it to give better overall results and I like the the sharper Image it produces.
But not everyone may agree.

It is also a little slower (although more accurate IMHO) than some of the other resizers.


Something Bicubic or Spline may by slightly faster.
They also offer a shaper filter if you like them, as well as a nuetral and softer variant.

Some, in fact, actually prefer the results these give over Lanczos.
So it may be worth your time to experiement with, not only for speed but quality.

The quickest way to test them out would be capture a 5min clip to experiement with.

If you are fine with the results, it may help speed things up a bit more.



--As for your phone, Im unsure what codecs its capable of playing.
I know for my Zune, the ipod profile is fine (and make a few tweaks from there)
Most of these type of devices use a baseline x264 setting, rather than high Profile.

You may try a iphone, PSP, or Tmobile type profile. Agian, just a guess as I am unsure about that phone.
My System SpecsSystem Spec
18 Nov 2010   #15
taiydo

Windows Vista
 
 

Thank you for your superb tutorial, I've a question about what you said:

Quote:
However, I would recommend using the "Suggested Resolution Mod16" option. this will keep the video in multiples of 16, that the x264 can handle much more efficently.
Some people recommend using mod16 for xvid and mod4 for x264 while other like you in this tutorial suggest mod16 for x264, but I never really understood the difference, could you help me about that?

I'm asking cause I saw that using mod4 or mod16 can have a significant impact when resizing and calculating the aspect ratio % error. Thanks.
My System SpecsSystem Spec
18 Nov 2010   #16
Wishmaster

Windows 7 Home Premium 64bit
 
 

Quote   Quote: Originally Posted by taiydo View Post
Thank you for your superb tutorial, I've a question about what you said:

Quote:
However, I would recommend using the "Suggested Resolution Mod16" option. this will keep the video in multiples of 16, that the x264 can handle much more efficently.
Some people recommend using mod16 for xvid and mod4 for x264 while other like you in this tutorial suggest mod16 for x264, but I never really understood the difference, could you help me about that?

I'm asking cause I saw that using mod4 or mod16 can have a significant impact when resizing and calculating the aspect ratio % error. Thanks.
This is a good question, although I must admit I do not fully understand the full impact of either as far as encoding times.
I should probably revise the tutorial
I think that if your going to resize, Mod16 is perfectly fine for the most part.
There are, however, occasions when it isn't.

If you want to keep the original resolution, simply do not resize and use a bit higher bitrates.
I do not think it really matters either way, so long as the final resolution is divisible by 16 or 4.


But it works something like this.
It basically means the resolution is divisible by 16 or 4 with no remainder.

For example:
1280X720 resolution Mod16: 1280/16=80 720/16=45
1280x720 resolution Mod4 : 1280/4=320 720/4=180
So either works perfectly fine here.

But at 1080P
1920x1080 resolution Mod16 1920/16=120 1080/16=67.5
1920x1080 resolution Mod4 1920/4=480 1080/4=270
As you can see, theres a remainder at 1080P resolution using the Mod16.

This results in the resolution being downsized to 1920x1072 if use Mod16.

If Im doing 1080P material, I either keep the originail with no resize (to keep its full 1920x1080 res) or downscale it it to 1280x720.

For DVD, much the same.
For example most DVD material is 720x480.

If its a Widescreen, its the same 720x480 resolution, only anamorphic. Which tells the decoder to stretch the image to fit a 16:9 screen.
Using Mod16 on a anamorphic Image will resize it to 720x400 (16x9)

Or, you can use the anamorphic option in your script which keeps the original resolution without resizing, and adds only the 16:9 flag.


For DVD Material, if you wish to keep the original resolution, do not resize.
Since the native resolution is divisible by 16 or 4, you will be fine either way.
Same goes for DVD widescreen anamorphic.
My System SpecsSystem Spec
18 Nov 2010   #17
taiydo

Windows Vista
 
 

Wishmaster, thanks for your quick reply and the explanation.

I asked because I'm using mod4 (with x264) to get a better aspect ratio error % in comparision with mod16 but that way I also get an high DRF value (the average quantizer I got is 27).

I think I will try a mod16 resize/encode to put down that DRF, the main issue I have is the DVD res, 720x576. When resizing the only way to get the lower AR error is mod4 (0,02% at 712x392) while using mod16 I only can get an 0,92% at 720x400.

About the the anamorphic option you mentioned, is that the "Clever anamorphic encoding" checkbox on the AviSynth script creator window? Is that enough or should I modify the .mkv later with tools like mkvmerge entering the aspect ratio factor?
My System SpecsSystem Spec
18 Nov 2010   #18
Wishmaster

Windows 7 Home Premium 64bit
 
 

Quote   Quote: Originally Posted by taiydo View Post
Wishmaster, thanks for your quick reply and the explanation.


About the the anamorphic option you mentioned, is that the "Clever anamorphic encoding" checkbox on the AviSynth script creator window? Is that enough or should I modify the .mkv later with tools like mkvmerge entering the aspect ratio factor?
Yes.

Interstingly enough, its intended for Anamorphic Widescreen formats.
But it can also be used for Fullscreen sources as well, which retain the original resolution and aspect ratio.
I find it quite useful many times because it embeds the Ascpect ratio into the stream, regardless what type ratio your are working with.

As you can see in my snips below, I have a 1280x720 video.
The first is just set to mod16, 1280x720.
The second, is using the Clever anamorphic Mod16.

All it has done is embedd the aspect ratio in the stream.

This works the same way if you are dealing with a true Anamorphic Widescreen video, or even a 4:3 Fullscreen.
In the case of say a 720x480 Fullscreen, it simply embeds the 4:3 ratio in the video stream.


A lot of this is experimenting and finding what results looks best to you quite honestly.
I would suggest while you are experimenting with differnent resizers, resize methods etc, make a Cut of about 5minutes to play around with.
Once you make a cut of the audio, the cut line from your AviSynth script can simply be copy/pasted to the new script at the end.

A bit easier and faster while still experiemnting rather than wait for the whole video to encode.
But im guessing you already know this


Attached Images
Video Encoding x264 (MeGUI)-1.jpg Video Encoding x264 (MeGUI)-2.jpg 
My System SpecsSystem Spec
18 Nov 2010   #19
taiydo

Windows Vista
 
 

Again thanks, hope you dont mind if I come back to that topic in the future for more questions. Will try that anamorphic option for sure, let see if I'll be able to put down the drf.
My System SpecsSystem Spec
Reply

 Video Encoding x264 (MeGUI)




Thread Tools




Similar help and support threads
Thread Forum
BSOD's Encoding DVD-Video
I have been trying to create a DVD-Video using Nero software. This has caused blue screens multiple times tonight. The encoding will work for maybe a third of the video then the PC crashes. The BSOD's have different headings, one mentioned a hardware error and another said that a driver had overran...
BSOD Help and Support
Video Encoding/Decoding Causing Lag
Today, I was trying to copy a DVD to an mp4. Whenever I started the process, my computer experienced severe lag. For instance, the mouse took several seconds to move and several seconds to process a click. I also discovered that this also happens when I try to convert a video I have on my computer....
Music, Pictures & Video
MeGUI encoding problem
Everytime I finished all the procedure listed,I always end up with a video with no audio. I have checked the audio input and output and also I have specified the NeroXXX codec. Any thoughts? And also does MeGui is still recommended for encoding x264 these days? Is StaxRip any better?
Music, Pictures & Video
Video Encoding Problem
I use handbreak to condvrt my dvds to .avi format to store in PC, as it requires less space. But sometimes the pc restarts unpredictably when this program is running, not always. Have any solution?
Music, Pictures & Video


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:25.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App