Log in

View Full Version : MeGUI x264 presets.


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21

300watt
11th April 2012, 04:30
I'm new to MeGUI, but what I would like to do is to convert a bunch of old videos in WMV2 to h264 in order to save space. I don't wanna lose any quality however, so I need a lossless-profile. I see there is one, but why does it only do 1 pass?

Processing time is not an issue for me.

Atak_Snajpera
11th April 2012, 10:23
I'm new to MeGUI, but what I would like to do is to convert a bunch of old videos in WMV2 to h264 in order to save space. I don't wanna lose any quality however, so I need a lossless-profile. I see there is one, but why does it only do 1 pass?

Processing time is not an issue for me.

lossless h.264 will be ALWAYS larger than your original wmv files.

LigH
11th April 2012, 10:32
I really don't care about MPEG-4, just h.264.

:o H.264 is the kernel of MPEG-4 Part 10 (Advanced Video Coding). :p

You probably only don't care about MPEG-4 Part 2 ([Advanced] Simple Profile, as implemented in e.g. DivX or Xvid).

Well - it's not primarily your fault. Manual authors have no clue about tech and specs, usually.

tebasuna51
11th April 2012, 11:55
Agreed. But only Sharktooth or a moderator can change the text or add at least a warning.
Warning added. Please say me if is correct/enough.

300watt
11th April 2012, 13:58
lossless h.264 will be ALWAYS larger than your original wmv files.

oh ok. I guess I don't need a technically lossless profile, but rather one that will reduce the size, while not losing any quality. Basically, if I take a screenshot of any one frame in the h264 it should be just as good a picture as when taken in the wmv2 original.

I'm assuming this should be possible while getting a smaller file size due to h264 having more advanced compression technology?

LigH
11th April 2012, 14:05
one that will reduce the size, while not losing any quality.

Technically impossible. Each lossy compression will discard a certain amount of information. But you may not notice it – then you may call it "transparent quality".

In general, always the same rules apply:

If the target size matters, use 2-pass encoding.
If it doesn't, use 1-pass quality-based encoding with your personal CRF value.


The bitrate or the CRF value are always the most important constraint. The choice of preset, tuning, or hardware device compatibility, are secondary options. Do not try to substitute bitrate by compression efforts, the result is not guaranteed to satisfy.

300watt
11th April 2012, 14:41
So what you're saying then is that the lossless compression algorithms of wmv2 are as good as the ones in h264 and that h264 is only better at lossy compression?

Atak_Snajpera
11th April 2012, 14:49
Remember going from one lossy format to another lossy format will always decrease quality unless source has very high bitrate like BD.
For example. Compressing strongly compressed JPEG to JPEG-XR also does not make sense.

LigH
11th April 2012, 14:58
In general, lossless compression algorithms differ only slightly. They have a typical compression ratio, compared to an uncompressed video, of less than 1:5 (even if compared to RGB; video compression is usually based on YV12 though, which already uses only half the size due to chroma subsampling, so it's more exactly "quasi-lossless").

I have no idea if WMV3 / VC-1 has a lossless mode at all.

Modern lossy algorithms can have compression ratios close to 1:1000 and still offer transparent quality, depending on the material. One key dependency is the efficiency of B-frame motion prediction. The better the similarity between several sequent frames can be used to reduce redundancies, the more efficient the compression can be without losing too much original quality. But the harder (more time consuming) it is to compress and to play back. Blu-ray video has to limit the compression efficiency due to limited hardware buffer sizes, related to the wish to be able to quickly seek and scan through the video.

300watt
11th April 2012, 16:28
So if the efficiency of lossy compression comes from the majority of the frames only containing info regarding the changes from a previous frame, couldn't you have something that's visually-lossless then if all the pixels you see on the screen are as good as the source, while still discarding unnecessary static picture information?

I guess I should just try the unrestricted presets for my purposes. Anyone that could recommend one to try if I don't wanna lose any quality and having a long processing time is no problem for me?

LigH
12th April 2012, 07:30
Well, as already mentioned: If you spend enough bitrate, you'll get so little differences that you won't notice them. How little they have to be to become "transparent" for you depends on your personal experience. Some are satisfied with an amount of artefacts ("WOAH! Top quality!!1!"), another viewer would get annoyed about ("Eye cancer")... You will possibly have to do your own tests to decide. x264, fortunately, has a very convenient feature to discover your personal annoyance threshold: the CRF value, which describes the acceptable amount of difference between input and output video. The encoder will use as much bitrate as necessary to ensure a degree of similarity.

Create a series of copies with CRF values between about 18 and 24 (fractional numbers are allowed, but integers may be sufficient for the test) of a few different short high-quality videos (preferably not web trailers, they will already contain compression artefacts, so getting good material may be the most complicated part about it; downloading and processing the PNG image sets of the Blender movies is possible, but quite complex and time consuming). Many average viewers will probably be satisfied with the quality of CRF values around 21-22. CRF 15 may already be taken as "archival grade".

But the smaller the CRF is, the more bitrate will be spent, the bigger the file gets. Possibly even bigger than the original, if that was already compressed. And already compressed original videos will probably already contain compression artefacts (usually blocking and edge ringing). And encoding such artefacts even further requires even more bitrate because they are unnatural details.

If you insist in a specific target bitrate and output file size, using 2-pass encoding, x264 will calculate the required CRF value after the 1st-pass analysis, and apply it during the 2nd-pass encoding.

Apart from the bitrate (target average bitrate for 2-pass, or resulting bitrate via CRF in 1-pass), the other encoder options do not primarily increase the amount of kept quality (only indirectly in a 2-pass encoding, via the more efficient compression). The (speed) "Preset" controls the efforts to find similarities to use to increase efficiency. The (content) "Tuning" mainly controls features to make quality loss less obvious. And the "Target Playback Device" option limits the efficiency to maintain compatibility with decoders which have limited features, compared to an all-purpose PC with GHz CPU and GB RAM to run a more or less complete decoder software.

Use the trinity of (speed) "Preset", (content) "Tuning", and "Target Playback Device" compatibility. x264 has a very elaborately tuned and tested set of options which will give you nearly optimal results for most cases. A slower preset than "Slower" is probably not necessary, you won't get much more efficient compression despite wasting a lot more time. Find your personal CRF threshold. Select the hardware compatibility matching your player. And from here, save your personal "Encoder settings / presets" with a few probable tunings. If you insist in a maximum file size, switch to 2-pass encoding. Done.

Change the advanced options only if you know their meaning at least as good as the x264 developers.

Zathor
12th April 2012, 11:21
Warning added. Please say me if is correct/enough.
Thank you very much!

300watt
12th April 2012, 13:53
Alright thanks for the info. I tried using the unrestricted-insane preset, going all the way down to CRF 13 where the result ended up bigger than the source and still some quality was lost (like the fine texture fidelity of surfaces, h264 just smudges it out). I guess I'm better of just using the original wmv2, remuxing it into a new container. Some of the files have wrong aspect ratios and sound desync, but that should all be fixable through the container format.

I also compared the "Unrestricted-Insane" and "slower" presets at the same CRF 15, and it seems like insane took longer and produced a better quality.

Is content-tuning worth experimenting with (for regular live-action movies) or what is it about??

LigH
12th April 2012, 14:09
Tunings can help in certain situations, like preserving more details (grain) or, the opposite, smoothing low-detail parts more (animation), by tweaking the in-loop deblock filter, among other options.

Presets with names like "insane" or "placebo" got this name for a certain reason. If you have to use these to achieve "satisfying" results, you did something generally wrong.

tonyymmao
16th April 2012, 03:02
i just have 1 question, i can see that u can set the bit rate in the encoder settings, so why can u set the bit rate again after u press auto encode

Betsy25
16th April 2012, 05:24
i just have 1 question, i can see that u can set the bit rate in the encoder settings, so why can u set the bit rate again after u press auto encode

You have to press "Auto Encode" *after* you have your encoding settings set.
Auto Encode means something like "All is ready, let's do it !" :)

LigH
16th April 2012, 09:29
http://th250.photobucket.com/albums/gg262/Dutchygamer/Random%20Forum%20Pics/th_picard.jpg

Shevek
16th April 2012, 09:36
http://th250.photobucket.com/albums/gg262/Dutchygamer/Random%20Forum%20Pics/th_picard.jpg

I wish this board had a Kudos button - you'd get 10 points from me for that :D:D

hello_hello
16th April 2012, 10:44
i just have 1 question, i can see that u can set the bit rate in the encoder settings, so why can u set the bit rate again after u press auto encode

So you don't have to set up multiple encoder presets with different bitrates?

I never encode using set bitrates or file sizes but MeGUI has two queue buttons which let you add individual video-only or audio-only encoding jobs to the job queue. In the former case I imagine it'd use the bitrate you specified when setting up the encoder. When using the auto encode button, you're usually encoding video and audio (or adding existing audio to your video encode) so the auto encode method lets you specify a new bitrate or final file size for each auto encode job.

Dal
26th August 2012, 08:04
Ok, after coming back here to read, I finally understand why there hasn't been any updates to the presets for a long time :)
But I would claim the old presets still works pretty good, though.

But all I have seen in here lately is talk about the x264 codecs and presets...

What about the Xvid presets? Are they outdated too?
I still use the Xvid: 2pass HQ (No Qpel) on a daily basis, and things seems to work fine to me.

I think presets for different encoders is a great thing, because it allows the not so technically strong among you (including me) to do excellent work without having to understand the ocean of options in there.

Thanks.

kalehrl
26th August 2012, 08:38
What about the Xvid presets? Are they outdated too?
Personally, I don't use Xvid presets because I created mine which better suit my understanding of Xvid options.
This is for 2-pass:
program -i "input" -pass2 ".stats" -bitrate 842 -turbo -max_key_interval 250 -nopacked -lumimasking -bvhq -o "output"
Bitrate of course varies from encode to encode.
This is for CQ:
program -i "input" -single -cq 3.3 -max_key_interval 250 -nopacked -lumimasking -bvhq -o "output"

Dal
31st August 2012, 16:39
Personally, I don't use Xvid presets because I created mine which better suit my understanding of Xvid options.
This is for 2-pass:
program -i "input" -pass2 ".stats" -bitrate 842 -turbo -max_key_interval 250 -nopacked -lumimasking -bvhq -o "output"
Bitrate of course varies from encode to encode.
This is for CQ:
program -i "input" -single -cq 3.3 -max_key_interval 250 -nopacked -lumimasking -bvhq -o "output"
Thank you, I will try this.

But about the x264 settings:
Should I still have two different settings? One for SD (AVC Level 3.1) and one for HD (AVC Level 4.1)
If I just choose playback device = DXVA, MeGUI chooses (and encodes in) 4.1 automatically, no matter what the source material is.

kalehrl
31st August 2012, 19:30
No need for that because x264 takes care of that automatically if you use built in preset.
I just choose 'slow' and 'targeting quality' or 'targeting size' and HD encodes are always 4.1 and SD 3.1.
I don't choose playback device = DXVA so don't know about that.

hello_hello
1st September 2012, 08:28
kalehrl,
My understanding is a given level might impose different restrictions according to the resolution. Might I inquire as to the reason for using 3.1 for SD and 4.1 for HD? I'm just curious.


But about the x264 settings:
Should I still have two different settings? One for SD (AVC Level 3.1) and one for HD (AVC Level 4.1)
If I just choose playback device = DXVA, MeGUI chooses (and encodes in) 4.1 automatically, no matter what the source material is.

DXVA just changes the level to 4.1. That's it.
Are you aiming for playback using a particular device? Most portable players will specify the level they support, but these days High Profile, Level 4.1 is pretty standard. I encode everything that way regardless of the resolution. I've not had problems playing my encodes using my TV's built in media player, either of the Bluray players in this house, using the PCs video card to decode.... even my Android phone plays High Profile, level 4.1, 1080p without a problem. As should the iphone 4s (I've not used one).

If you're using a (possibly) older device for playback which only supports a lower AVC level then change it accordingly, or use the Target Playback Device option, but you'd still probably use the same level regardless of resolution. I'm not sure I understand the logic behind changing it for SD or HD.

kalehrl
1st September 2012, 13:23
Might I inquire as to the reason for using 3.1 for SD and 4.1 for HD?
I'm not setting the levels manually.
x264 does it for me according to the resolution.
So far, all my SD encodes were 3.1 and HD 4.1.

BlockABoots
2nd February 2013, 15:55
Can anyone tell me the command line for the 'HD-DVD' and 'HD-DVD Fast' so that it works with the newer releases of x264?? As that preset gives really good quality and fast encoding times for Youtube 1080p uploads. Im not sure what needs to be changed from the old command line...

HD-DVD
program --level 4.1 --pass 2 --bitrate 8000 --stats ".stats" --deblock -1:-1 --keyint 14 --min-keyint 2 --bframes 2 --b-adapt 2 --qpmin 10 --qpmax 51 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 14475 --vbv-maxrate 24000 --qcomp 0.5 --me umh --direct auto --subme 6 --trellis 2 --nal-hrd vbr --mvrange 511 --output "output" "input"

HD-DVD Fast
program --level 4.1 --pass 2 --bitrate 8000 --stats ".stats" --deblock -1:-1 --keyint 14 --min-keyint 2 --bframes 2 --ref 2 --qpmin 10 --qpmax 51 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 14475 --vbv-maxrate 24000 --qcomp 0.5 --merange 12 --direct auto --subme 4 --trellis 0 --nal-hrd vbr --mvrange 511 --output "output" "input"

Also is there a Youtube preset that gives the best video quality and fast encoding times for 720p and 1080p uploads??, i think the above HD-DVD presets are really good for youtube

StainlessS
3rd February 2013, 00:39
@BlockABoots

Use of the word 'best', invites bottom smacking on D9.

Atak_Snajpera
3rd February 2013, 12:34
some people forget that youtube ALWAYS reencode your video files so it does not matter what settings you use. just use default settings with low crf value (16 or lower)

BlockABoots
3rd February 2013, 20:16
some people forget that youtube ALWAYS reencode your video files so it does not matter what settings you use. just use default settings with low crf value (16 or lower)

Yeah i understand that but i though the better you can get the quality before uploading to YT the better the TY vid would look?

Hang on, i thought the higher the CRF value the lower the quality???

Atak_Snajpera
3rd February 2013, 20:19
what does 'lower value' mean in english then?

Shevek
4th February 2013, 12:09
Hang on, i thought the higher the CRF value the lower the quality???

what does 'lower value' mean in english then?

Lower CRF results in higher quality encode

i.e. CRF 16 will be better quality than CRF 23

If you hover over the Quality box in the config window you will see a tooltip with a very good explanation.

Unfortunately you cannot copy/paste from a tooltip otheriwse I'd repeat it here.

LigH
4th February 2013, 12:43
But you can easily quote from megui\Data\ContextHelp.xml:

Constant Ratefactor

Encode in Quality Based Variable Bit Rate mode, regardless of bit rate.

CRF targets a certain 'quality'. The idea is for crf n to give the same perceptual quality as qp n,
just in a smaller space. It is not extremely exact, but reasonably close (and will average out to be
accurate over a large number of videos). The arbitrary unit of measure for crf values is the "ratefactor".
CRF achieves this by reducing the quality of 'less important' frames. In this context, 'less important' means
frames in complex or high-motion scenes, where quality is either more expensive (in terms of bits)
or less visible, will have their quantizer increased. The bits saved in frames like these are redistributed
to frames where they will be more effective. CRF will take less time than a 2pass bitrate encode,
because the 'first pass' from a 2pass encode was skipped. On the other hand, it's impossible to predict
the bitrate a CRF encode will come out to (without actually performing the encode or a portion of it).
It's up to you to decide which rate-control mode is better for your circumstances.

Default: 23

Recommended:
The range 18-26 is probably where you will want to look at. If you need absolutely perfect quality
you could go down to 16, but it's probably not worth it. Around 19-21.5 is where a rip will look very good.
Higher resolution encoding can generally get away with higher crf values.

TheProfosist
28th March 2013, 21:34
For some reason the link sems to be dead for me. I know the archive is outdated for settings for x264 but i would still like it if possible.

EDIT: never mind the mirror worked

Zathor
29th March 2013, 10:52
Avoid using those profiles in MeGUI. A lot of the settings have changed and they will not be migrated anymore to the correct settings.

greatdanton
15th October 2013, 02:57
no more update for Megui?

LigH
15th October 2013, 08:00
Read the last reply by Zathor above your post again.

Use the basic "Preset" and "Tuning" options if you know less about the relations between the advanced x264 options that the developers of x264. ;)

greatdanton
16th October 2013, 01:52
Read the last reply by Zathor above your post again.

Use the basic "Preset" and "Tuning" options if you know less about the relations between the advanced x264 options that the developers of x264. ;)

ok thanks but I can't find the advanced x264 options in this forum other than the officanl website of the x264 (http://mewiki.project357.com/wiki/X264_Settings#subme)

LigH
16th October 2013, 07:46
Understanding some of the advanced options in x264 may require having read and understood the MPEG4 Part 1, 2, and 10 specifications, as well as general video analysis and compression techniques. Most of that is technical stuff too heavy for the average user. Therefore, the x264 developers spent a lot of efforts into balancing the relations between presets and tunings to be useful in most cases. And in general you can trust the rule: Nothing is better than "enough" bitrate.

greatdanton
22nd October 2013, 17:53
Understanding some of the advanced options in x264 may require having read and understood the MPEG4 Part 1, 2, and 10 specifications, as well as general video analysis and compression techniques. Most of that is technical stuff too heavy for the average user. Therefore, the x264 developers spent a lot of efforts into balancing the relations between presets and tunings to be useful in most cases. And in general you can trust the rule: Nothing is better than "enough" bitrate.

ok thanks for reply
Do you mean that is enough for average user to encode in settings such as presets and tunings, high bitrate?

LigH
23rd October 2013, 07:56
Yes. The x264 developers put severe efforts into condensing the complex relations between the many detail options to so few convenient and intuitive meta-options that average users can most probably get acceptable-to-great results with

target bitrate or "quality level" (CRF value)
(speed) preset
(content) tuning
maybe a few device compatibility options, if required (to be turned into a "device" meta-option some day; MeGUI already does that in its dialog...)

Xor
18th March 2014, 23:19
Hi thanks for presets.

Please i'am a newbye how to install presets in megui? I tryed to copy in related folder "c:\MeGUI_2356_x86\allprofiles\x264\" but not work. Installed preset not appear.

Thanks

LigH
19th March 2014, 09:30
Do not try to use obsolete presets which are not supported by the current MeGUI version anymore.

rapscallion
21st March 2014, 18:33
Well, in case he wants to (I still use the 720p/1080p presets and they work fine)

>File>Import Presets....then select the Zip file presets.

Zathor
21st March 2014, 19:53
And as an additional information:
Every setting which has changed internally in the last years will not be applied at all when importing these old presets. So you will definitively end with something between the original preset and the recent MeGUI default values as a lot has been changed internally over those years.

rapscallion
21st March 2014, 20:59
I didn't realize that !

So, in the "Input" screen what do you enter in the Encoder Settings dialog box (where the presets are/were displayed)?

If I delete all the x264 preset options/profiles, then x264: "Scratchpad" remains. Is that what it should be?

Zathor
21st March 2014, 21:08
It is up to you. But I would not import those old presets and instead create a few new ones depending on what you need / encode for.

I have created a few presets for my encodings like several Bluray presets and also a few WDTV ones. All of my presets have crf (~18) & very slow setting & no/film tuning. At the end you can say I change only settings on the first page and do not bother with the other settings.

rapscallion
21st March 2014, 21:56
The only one I've been using for a long time is the x264:Blu-ray 1080p/720p. On build #2487

First page (show advanced settings) I select "Automated 2 pass", "Target Playback Device: Bluray", "Tuning": Film
"Bitrate": whatever I get in the bitrate calculator for the particular BD I'm re-encoding (I usually reduce a full BD-50 down to BD-25, film only) And, like you, "Preset": slow

If I select "scratchpad", and apply the same setting as above, the command line is virtually identical.

BTW, I wouldn't know the first thing on creating a preset. I don't see any option in any of the "Advanced Settings" for selecting CRF 18. But, then again, I'm using VBR so Constant Rate Factor wouldn't apply, I believe?

Edit: I have been happy with the results and always seem to get a result almost identical/transparent to the original BD.

Custom Command line on the Misc page:
--level 4.1 --bframes 3 --ref 4 --slices 4 --aud
-nal-hrd vbr --b-pyramid strict --keyint 24 --min-keyint 2
-vbv-bufsize 30000 --vbv-maxrate 40000 --weightp 0
-colorprim "bt709" --transfer "bt709" --colormatrix "bt709"

Main page settings:

http://forum.doom9.org/attachment.php?attachmentid=14115&d=1395519563

ramsmart
2nd September 2017, 11:19
how to get megui x265 presets ??????

LigH
2nd September 2017, 12:21
Just as collectibles ... or for a specific purpose (e.g. being compatible to specific playback devices)?

ramsmart
18th September 2017, 09:06
Just as collectibles ... or for a specific purpose (e.g. being compatible to specific playback devices)?

Just as collectibles