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

shashaanktulsyan
19th December 2008, 19:03
Where can I get profiles (for anime specifically) for bitrate lesser than 1000, like (specifically 256, 450, 512) .
I have a commandline parameters for a few, although they do gr8 (from my perspective) they use values that are not recommended (in doom9 guides).
So I was wondering if I could get it from the experts.

Should I just change the value of bitrate in those profile to a lower value? Or should profiles be optimized for lower bitrates?

Slightest guidelines would be appreciated, thanks.

(sorry if this has been answered before, i didn't find any)

Offtopic:
Q)Why I want to do this? A) I have been doing this for a long time, and x264 encoding at those bitrates didn't give a video that was so bad in quality as to bother me.

mat8035
19th December 2008, 20:12
I have been using the PS3 profile, but want to use a CRF of 20 instead of 2 pass 1000kbps. If I change this in the encoder settings (MeGUI), will I need to change anything else, or this ok? Or perhaps there is another profile more suited for this? Thanks.

Sharktooth
19th December 2008, 21:00
@mat8035: VBV and single pass encoding is not recommended coz it may not work as expected.

@shashaanktulsyan: presets are not relative to bitrate but to "quality". quality is proportional to compression... so, to make things short, for the lower the bitrate the better an higher quality preset...

mat8035
19th December 2008, 21:23
@mat8035: VBV and single pass encoding is not recommended coz it may not work as expected.

Thanks for your reply. Would it be better for me to simply increase the bitrate on this profile then? e.g. 2000kbps. Would I need to change anything else? I am using non-mod16 cropped heights so that's why I wanted to use CRF.

nurbs
19th December 2008, 22:17
You can increase bitrate or use crf. While it is true that single pass is not as good if you have VBV constraints in most backup scenarios it won't be a big problem. The PS3 supports levels up to 4.1 IIRC which means a vbv max bitrate of 50Mbps. The encodes I have done with HD-DVD and blu-ray sources resized to 720p at crf 22 come out at around 5 Mbps and bitrate never goes anywhere near the allowed maximum bitrate, so there will be no trouble. It depends on what exactly you want to do of course. If you try to encode 720p and have level 3.1 restrictions (17.5 Mbps max) it may be better to use 2pass.

mat8035
19th December 2008, 22:27
You can increase bitrate or use crf. While it is true that single pass is not as good if you have VBV constraints in most backup scenarios it won't be a big problem. The PS3 supports levels up to 4.1 IIRC which means a vbv max bitrate of 50Mbps. The encodes I have done with HD-DVD and blu-ray sources resized to 720p at crf 22 come out at around 5 Mbps and bitrate never goes anywhere near the allowed maximum bitrate, so there will be no trouble. It depends on what exactly you want to do of course. If you try to encode 720p and have level 3.1 restrictions (17.5 Mbps max) it may be better to use 2pass.

Thanks. I'm using ST's PS3 profile, which I think has a vbv limit of 24mbps. I should be ok using CRF 20 with this? I would use 2pass bitrate 2000kbps however I have read that it is better to use CRF with non-mod-16 resolutions. This is because you do not suffer a loss in quality, just get slightly overall bitrate. I guess my question is what should I use for non-mod-16 crops, when backing up DVDs for Playback on the PS3, with a file size of about 1-2gb?

nurbs
19th December 2008, 22:43
My mistake on the maximum bitrate then. Anyway the bitrate crf will give you depends on the source complexity and the resolution. Since you have a standard definition source crf 20 probably won't violate vbv, but you can't really know what size you will get. I used to backup DVDs with crf 20 and they generally came out in the size range you want, but that was before AQ and psy-rd where added so that might have changed a bit. Personally I wouldn't worry about the quality loss from using non mod16, because x264 uses really efficient internal padding so it is rather small.
Short: If you want a certain filesize and/or have tight vbv constraints use 2 pass, if you want a certain quality and don't care too much about filesize use crf. With DVDs it's unlikely that vbv will be an issue on the PS3, but there may be isolated cases where it is.

edit:
You should maybe do some tests at crf 20 - 22 and see which one you like. It varies from person to person. On high-def sources you can usually get away with a bit higher crf value without noticing the difference.

mat8035
19th December 2008, 22:59
My mistake on the maximum bitrate then. Anyway the bitrate crf will give you depends on the source complexity and the resolution. Since you have a standard definition source crf 20 probably won't violate vbv, but you can't really know what size you will get. I used to backup DVDs with crf 20 and they generally came out in the size range you want, but that was before AQ and psy-rd where added so that might have changed a bit. Personally I wouldn't worry about the quality loss from using non mod16, because x264 uses really efficient internal padding so it is rather small.
Short: If you want a certain filesize and/or have tight vbv constraints use 2 pass, if you want a certain quality and don't care too much about filesize use crf. With DVDs it's unlikely that vbv will be an issue on the PS3, but there may be isolated cases where it is.

edit:
You should maybe do some tests at crf 20 - 22 and see which one you like. It varies from person to person. On high-def sources you can usually get away with a bit higher crf value without noticing the difference.

Thanks for your help again. I think I will stick with 2pass encoding, as like you say, non-mod-16 isn't going to be an issue that I will notice. I was happy with the quality of CRF 22, but for some reason couldn't accept that a low bitrate could look any good. I guess that shows just how good x264 is! Playing these back on a 32" 1080p TV, and doubt I could tell the difference from the original DVD unless it was playing alongside.

Just a note that on a CRF 20 encode of 720 x 436, the overall bitrate was 1547 kbps and the max was 6483 kbps. Does that mean that I was noway near the VBV limit?

nurbs
19th December 2008, 23:30
Correct. I haven't looked into it much, but on the files I did the max bitrate never went above about 5 times the average. So if the allowed vbv max bitrate is much higher than that as in your case there generally won't be any problems.

shashaanktulsyan
20th December 2008, 04:38
@Sharktooth
Thanks.

Sharktooth
23rd December 2008, 04:20
Presets updated: V83

disklib
23rd December 2008, 14:12
Thanks for making the new Unrestricted Anime-Toons preset.

buzzqw
24th December 2008, 10:43
just to mention that in autox264 i added support for MeGui x264 profiles

BHH

mat8035
24th December 2008, 14:34
Correct. I haven't looked into it much, but on the files I did the max bitrate never went above about 5 times the average. So if the allowed vbv max bitrate is much higher than that as in your case there generally won't be any problems.

Great. So I should be fine to use ST's PS3 profile, and simply changing it to CRF x? Don't need to change anything else?

Sharktooth
24th December 2008, 15:11
... 1 pass rate control is "not so happy" about VBV restrictions. if you use a reasonable bitrate it may work though.

mat8035
24th December 2008, 15:52
... 1 pass rate control is "not so happy" about VBV restrictions. if you use a reasonable bitrate it may work though.

Would it be possible for you to include a profile for PS3 CRF next time? Or what would I need to change myself? Or do you still reccommend using VBR over CRF anyway?

Sharktooth
24th December 2008, 16:23
no, since it will not always work. id recommend using 2 passes.

Deinorius
24th December 2008, 19:32
@mat8035
Just set crf and try it.

@Sharktooth
Why shouldn't it work? It's just crf. It works fine for me.
Why do you use M.E.Range 12 for PS3 profiles anyway? I have no problems with merange 16.

nurbs
24th December 2008, 23:21
Whether it will work or not depends on the input and crf you select. If for instance you do a crf 22 encode at 720p there will be no problems 99.9 percent of the time with level 4.1 restrictions, because even in scenes where you need lots of bitrate it's unlikely that you will ever approach the level limit. If you do 1080p, have a very noisy source and do say crf 18 there may be cases where you can get close to the level limit.
When the bitrate needed hits the level limit different things can happen. Best case you have some degradation of image quality but it is small enough that you don't notice it (i.e. you are only a couple of hundred kilobits short of what you need). If you are a lot short you get visible artifacts (i.e. blocking). Worst case you exceed the limit and you may end up with a (partially) unplayable stream, but the outcome in that case depends on the player you use. If you use 2pass x264 will handle all of those cases better than in 1pass. The last case is the only one that is important for hardware compatibility and from what I have read this is also what 2pass ratecontrol is a lot better at preventing (although it got better in 1pass too over the last year). Anyway you will know because vbv violations show up in the log. In the other cases you will still have quality loss with 2pass.
My opinion on this is that as long as you use a typical crf (>=20 for HD) you won't have any problems on 720p. I only did some test encodes at 1080p so I'm not so sure about that, but I don't think vbv violations will be a problem except in isolated cases. The quality issue might come up more often, but it is dependent on the source of course.

merange is only a speed thing (hardware compatibility would be mvrange IIRC)

Sharktooth
25th December 2008, 03:27
@Sharktooth
Why shouldn't it work? It's just crf. It works fine for me.
Why do you use M.E.Range 12 for PS3 profiles anyway? I have no problems with merange 16.
1) coz, as i already said, 1 pass RC is not always respecting the VBV restrictions. that doesnt mean it wont work, but just it MAY not work.
2) i set MERange 12 in the preset coz usually ppl encode HD stuff for PS3 and MERange 12 helps speed up the encoding process. you can always use the BD preset which has MERange 16.

Dan|el
29th December 2008, 11:05
What would be the best profile for a blu-ray backup?
Encode time is not an issue, going for max quality. HTPC playback.
Also any suggestions on the bitrate? :rolleyes:

Im guessing unrestricted 2pass Insane. Is there a noticable difference between HQ and Insane? What about the DXVA profiles? Sorry for the noob questions.
Thanks for your help.

nurbs
29th December 2008, 13:43
There is no best on this forum, because what's best for you depends on what you want to do. For HTPC playback you should maybe use one of the DXVA profiles, because you can use hardware acceleration on playback and some standalones (e.g. popcornhour) can also play back such encodes IIRC.
Bitrates: For 720p something in the range of 4 - 6 Mbps will generally look good, but it is dependent on the complexity of the source video so there might be some where it's not enough or where you are just wasting space.
Insane is much slower than HQ and I'd be surprised if you can see a difference unless you use a really low bitrate for that source. Also I can't remember if Insane uses --trellis 1 or --trellis 2. In my opinion --trellis 2 noticibly smooths the picture so it's not necesarrily the best option if you aim for quality.
IIRC psy-trellis is set to 0 by default in the profiles so you might want to play around with it a bit in the range of 0.5 to 1.0. In my opinion it improves picture quality, but sometimes it can produce artifacts (I didn't notice anything yet) which is why it isn't on by default.

Also for future playback compatibility you might want to wait till january when divx7 comes out. It will use avc as a video codec and is restricted to level 4.0 and maximum keyframe interval 0f 100 frames IIRC, but it's probably best to just wait for the release if you want that. Then again it's hard to tell wheter it will actually catch on.

Dan|el
29th December 2008, 14:31
Hardware acceleration shouldn't be necessary. My GPU(GF8200) supports H264, VC-1, and MPEG-2 decoding, so the CPU does close to no work anyway.
Both HQ and Insane use Trellis 2 - but both have 0 psy-trellis.
I'll have a play around with Trellis and psy-trellis then!
Thanks for the reply.

RunningSkittle
29th December 2008, 14:57
Hardware acceleration shouldn't be necessary. My GPU(GF8200) supports H264, VC-1, and MPEG-2 decoding, so the CPU does close to no work anyway.
Both HQ and Insane use Trellis 2 - but both have 0 psy-trellis.
I'll have a play around with Trellis and psy-trellis then!
Thanks for the reply.

In order for your GPU to off load the processing, the stream needs to be DXVA compliant.

Sharktooth
29th December 2008, 15:39
@nurbs: trellis 2 does not smooth the picture. infact it is recommended along with psy-trellis for very noisy sources.

@Dan|el: there are intermediate presets between "HQ" and "Insane"... they're called Extra Q.
also, as RunningSkittle said, videocards need DXVA compliant streams or they wont decode them...

nurbs
29th December 2008, 19:53
In my opinion --trellis 2 noticibly smooths the picture so it's not necesarrily the best option if you aim for quality.

It's my opinion and I stand by it. I did test encodes (with psy-trellis), they looked smooth to me, therefore I don't recommend using it.

disklib
3rd January 2009, 21:43
Sharktooth, can you please describe the content type/style that you designed the new Unrestricted Anime-Toons preset for? (or conversely, what it's not for)

For example, is it only for the traditional hand-drawn style of flat colors with sharp edges?

As I went to use it I realized that my "animation" collection is a diverse group of styles. (hand-drawn painted cells, cell-shaded CG, photo-real CG, stop-motion, etc).

Thanks

Sharktooth
4th January 2009, 22:21
there are no options in x264 that are specifically made for cartoons or anime so the presets are not so selective.
what i did is rise the number of reference frames and use a different b-frame placament straegy (b-adapt 1) and a higher b-frame number. that is to maximize the compression since in toons and animes there are a lot of repeated blocks.
also all anime/toons presets have a lower AQ settings than what is used for movies since it may screw the image quality around hard edge (high contrast areas).

lexor
7th January 2009, 03:59
Hi, Sharktooth, I don't know if kurtnoise told you about this, but he added -aud option everywhere (that I can see), so now there is duplication of settings (though I don't know if it matters to x264's parameter parsing).

Kurtnoise
7th January 2009, 07:58
you can remove it from the custom command line area...and update the preset.

Sharktooth
7th January 2009, 13:39
yes, i know. ill update the presets.
do anyone cares if i remove the HD-DVD presets?

ricky man
7th January 2009, 21:39
i am wondering which preset profile is for blu-ray only?

rack04
7th January 2009, 21:46
i am wondering which preset profile is for blu-ray only?

Standalone-Blu-ray
Standalone-Blu-ray_Fast

ricky man
7th January 2009, 21:50
Standalone-Blu-ray
Standalone-Blu-ray_Fast

i want to convert blu-ray to mkv. will that also works with those profile or not?

rack04
7th January 2009, 21:57
i want to convert blu-ray to mkv. will that also works with those profile or not?

The standalone Blu-ray profile is for compliance with standalone Blu-ray players. This doesn't mean that the file will not play on your PC. If you don't know which profile to use and you're going to be playing the file on a PC I recommend you use the DXVA profiles. However, these are not blu-ray complaint. Meaning if you ever decide to author the mkv to blu-ray format and burn to DVD-5/9, it won't play on a standalong Blu-ray player.

anu
8th January 2009, 21:37
Hi!
I'd like to encode video files by using the settings which are closest to *HD results. It doesn't mattar to me the speed of the encoding that much, as long as it is not more than 2 days (with P4 512 MB RAM Radeon 9550).
I'm not using any AviSynth functions except of the profile's and DirectShowSource.
These are the settings:
program --pass 2 --bitrate 1000 --stats ".stats" --level 4.1 --ref 16 --mixed-refs --no-fast-pskip --bframes 5 --b-adapt 2 --b-pyramid --weightb --direct auto --deblock 1:2 --subme 9 --trellis 2 --psy-rd 1.5:0 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --qpstep 3 --ipratio 1.0 --pbratio 1.0 --chroma-qp-offset 12 --vbv-bufsize 50000 --vbv-maxrate 50000 --scenecut 50 --me tesa --merange 32 --threads auto --thread-input --aq-strength 2.0 --cqm "jvt" --aud --progress --no-dct-decimate --no-psnr --no-ssim --nr 500 --output "output" "input"
*HD: Some of you will say that HD=720p which is any video file which is X*720. You're right. But when I say HD, I mean like the quality of true real HD, like the one you see on your HD TVs.
I'm encoding very bad quality anime. I'd like to know if any necessary changes should be usefull. Thanke in advanced!

Sharktooth
8th January 2009, 22:03
--aq-strength 2.0 is way too high... use a much lower value expecially with anime!
--cqm "jvt"... remove it.
--no-fast-pskip and --no-dct-decimate, are unnecessary
--psy-rd 1.5:0 is too high too...
--ipratio and --pbratio 1.0... definatly not good. use default values.
--chroma-qp-offset 12... use the default.
--qpstep 3... use the default.
--scenecut 50... use the default...
--nr 500 ... remove it. use light denoising in avisynth script creator instead.
--b-pyramid --level 4.1 --vbv-bufsize 50000 --vbv-maxrate 50000 --ref 16... WHAT ARE YOU TRYING TO GET? remove them all except --ref 16...

in short... megui has anime presets... use them and DONT TOUCH options if you dont know what you're doing (in your case a complete mess!)

disklib
9th January 2009, 05:42
there are no options in x264 that are specifically made for cartoons or anime so the presets are not so selective.
what i did is rise the number of reference frames and use a different b-frame placament straegy (b-adapt 1) and a higher b-frame number. that is to maximize the compression since in toons and animes there are a lot of repeated blocks.
also all anime/toons presets have a lower AQ settings than what is used for movies since it may screw the image quality around hard edge (high contrast areas).

Sharktooth, I apologize for babbling a bit as I try to ask you this...

If I have 2D hand-drawn, flat-color, hard-edge animation, then the Anime-Toon preset seems like a good choice.

If I have 3D computer generated, complex-textures/lighting high-motion animation, then the "normal" HQ presets seem like a good choice. (please correct me if I'm wrong)

What happens when I have something in-between?

Say the 2D colors are now gradients and/or patterns, or the 3D CG has simple shaded colors, not textures/patterns.

Would you say the 2 mentioned presets are appropriate to cover that whole range?

If not, is there a simple "tuning" of the presets that a novice could safely do? (I say this w/ respect to the last line of your last post above, #587)

If the 2 presets are adequate, then I just need to run enough tests to learn where the threshold is between them.

If tuning is appropriate, then I hope that you can provide some guidance on what the settings and their ranges might be.

For instance, AQ is disabled in Anime-Toons, but not in the HQ preset. It seems a simple matter to reverse the settings in an attempt to nudge one preset closer to the other, but not knowing how all the settings interact I'd soon be receiving my own personalized version of the #587 post! And the details you provided in reply to my last post (quoted above) show me that I'd clearly be in over my head. Honestly, anything beyond adjusting the Constant Quality setting, and maybe Deblocking, is beyond me at the moment.

Thanks

Sharktooth
9th January 2009, 14:43
id say, start from HQ or Anime presets, create a new one and set a LOW AQ strenght value.

G_M_C
9th January 2009, 15:45
PS Sharktooth;

A while back we exchanged some posts concerning the P4x4 partitions. We came to the point that it was agreed that "putting them back in" (including on Bluray and AVCHD profiles) seemed a good idea. I read that it hasnt been added yet (simply change to --partitions all). I fear it was forgotten.

See http://forum.doom9.org/showthread.php?p=1214050#post1214050

Oops EDIT: put in a better link

Sharktooth
9th January 2009, 15:49
it was not forgotten. we need to revert a commit though but i ended up without any free time to do it (as usual.................).

G_M_C
9th January 2009, 15:50
it was not forgotten. we need to revert a commit though but i ended up without any free time to do it (as usual.................).

Yep, i am familiar with that problem .... work work work, and no play ;)

It'll come, we'll just have to be patient.

Kurtnoise
9th January 2009, 16:18
it was not forgotten. we need to revert a commit though.
huh ? really ? and for why ? isn't just the preset to update, is it ?


btw, I don't care to remove hd-dvd presets...:D

Sharktooth
9th January 2009, 18:07
- (ateeq) [x264ConfigurationPanel] Fix to correctly apply last P4x4 change to level 3.1 and unrestricted
...
- (ateeq) [x264ConfigurationPanel] Fix doMacroBlockAdjustments for P4x4 compliance at Level 3+ when All option is selected
those ones. they enforce p4x4 to be disabled for levels > 3.1. i have to check them before reverting though.

Dark Eiri
14th January 2009, 20:28
Hey, Sharktooth, I've been playing with x264, encoding for the Xbox360, and I noticed that the preset uses --merange 12 and --subme 7. Wouldn't be better to use --merange 16 and/or --subme 8 or 9 and deblocking -1:-1 for extra details?

nakTT
15th January 2009, 07:11
Hi Sharktooth,

Any chance for us getting 3-pass presets in the near future? Thank you in advance.

Adub
15th January 2009, 09:48
@nakTT
Highly doubtful for two reasons.
1)It is pretty much unnecessary, as the amount of quality you squeeze out with a third pass is so negligible.
2)If you really want a third pass, just add it your self. Set the number of passes to three in the preset configuration dialogue and you are good to go.

nakTT
15th January 2009, 10:17
@nakTT
Highly doubtful for two reasons.
1)It is pretty much unnecessary, as the amount of quality you squeeze out with a third pass is so negligible.
2)If you really want a third pass, just add it your self. Set the number of passes to three in the preset configuration dialogue and you are good to go.
Thanks for the reply.

@2) You mean choose something like "Automated 3pass" at the x264 config dialogue? (I am a Noob who is Unfamiliar with MeGUI :D)

@1) Actually I happened to read some where in this forum that 3pass can squeze a little bit more quality at the same bit rate for encoding job that involve very short clip at a very low bitrate.

Adub
15th January 2009, 18:48
Yes, "automated 3 pass".

And yes, it can squeeze out more quality, but usually it is some minutely negligible that it isn't worth it. However, you can do it yourself using the automated 3 pass if you so desire.

Wodan
16th January 2009, 04:03
edit, looked around and found an answer :) thanks a lot for the presets!!