View Full Version : MeGUI x264 presets.
saint-francis
4th August 2008, 06:32
everything exceeding the SD res should be encoded with the HD preset.
I think that in this case the difference between SD and HD needs to be clearly defined.
For example: Is 720p considered SD or HD? ????
Honestly I haven't experimented with 1080p encoding too much recently but I can assure you that all of my 10 reference frame 720p encodings play back with DXVA just fine with MPC HC. I don't use Powerdvd for much more than playing from disk so I don't know what it's capable of. None the less this grey area needs to be addressed.
tetsuo55
4th August 2008, 09:18
I basic agree with tetsuo55 about hardware/bluray profiles, should be one for HD one for SD.
For SD Level 3.0 and 3.1 are fine.
@tetsuo55, your calculation for level 3.1 are wrong.
MaxDPB for level 3.1 is 6750 so when that multiply with 1024 and divide with 1.5 (YV12) you get 4608000 so calculation for max refs are 46080007/(w*h)=max refs, VBV for level 3.1 should be --vbv-maxrate 14000 --vbv-bufsize 14000 for main and --vbv-maxrate 17920 for high profile.
Level 3.0 are more compact for SD video,IIRC all comercial encoders put Level 3.0 on first place, but aslo depends from many factors. I saw some encodes with level 3.2 and working normal on standalones.
Yeah 2 hardware profiles
SD
HD
And then the sub profiles fast and anime
Thanks i fixed the formula in the other thread and in MPC-HC
nope, as i already said, SD presets has a higher number of refs and if SD preset is used for HD material DXVA wont work.
also levels are different. there are precise specs for HD and SD... so 2 different presets.
everything exceeding the SD res should be encoded with the HD preset.
We are not suggesting you Blend SD and HD.
We are suggesting that their should be 2 presets
HD
SD
(And then the sub profiles fast and anime)
Then regardless of which hardware unit you actually use you either choose SD or HD depending on the resolution
I think that in this case the difference between SD and HD needs to be clearly defined.
For example: Is 720p considered SD or HD? ????
Honestly I haven't experimented with 1080p encoding too much recently but I can assure you that all of my 10 reference frame 720p encodings play back with DXVA just fine with MPC HC. I don't use Powerdvd for much more than playing from disk so I don't know what it's capable of. None the less this grey area needs to be addressed.
SD is 16*16 to 720*576 (please note the that preset expects you to play back on a Level3.1 capable device, so these encodes might not work on some lower res players like an ipod even if you use the native resolution of an ipod )
HD is 736*???? or ????*592 to 1920*1088
---------
Ideally megui or x264 would have an interactive mode that would use a calculation of "height*width*framerate* to find the lowest possible LEVEL. And then encode at that level. This way the resulting file would be compatible with any device capable of playing that level and any device with a higher level than that. Encoded files would truly be portable across all hardware.
The downside to this approach is that lower levels mean stricter limits on bitrate, a low resolution file encoded at level 3.1 would probably look a lot better visually.
This why i suggest splitting the hardware profiles into 3 parts:
HD, for all hardware that can play this
SD, for all hardware that can play this at native resolution
Custom profiles, based on level limits, for all hardware that do not have/support a 720*576(480) screen(this category already exists, the original xbox would belong here too because of its hardware limits as its actually a software decoder)
Based on the above i would suggest the following
Preset blend suggestion
HD-L4.1-Anime_Toons
HD-L4.1-Fast
HD-L4.1-HQ
HD-L4.1-Insane
SD-L3.1-Anime_Toons
SD-L3.1-Fast
SD-L3.1-HQ
SD-L3.1-Insane
Unrestricted-Anime_Toons
Unrestricted-Fast
Unrestricted-HQ
Unrestricted-Insane
(device specific for handhelds and xbox)
(left over unrestricted profiles)
The Only difference between Unrestricted and HD/SD would be that the unrestricted profiles have been limited with the level limitations, other than that they can be exactly the same (which basically only means a bitrate and ref frame limitation)
Sharktooth
4th August 2008, 12:34
I think that in this case the difference between SD and HD needs to be clearly defined.
For example: Is 720p considered SD or HD? ????
Honestly I haven't experimented with 1080p encoding too much recently but I can assure you that all of my 10 reference frame 720p encodings play back with DXVA just fine with MPC HC. I don't use Powerdvd for much more than playing from disk so I don't know what it's capable of. None the less this grey area needs to be addressed.
720p IS HD by definition. also the presets are made to be playable ON EVERY DXVA card with EVERY DECODER supporting DXVA.
MPC-HC decoder is accepting higher parameters than the commercial decoders but usually fails on older vDXVA videocards.
@tetsuo55: ill see what i can do but remember DXVA is not universal and it is a microsoft implementation. Levels are implicit in DXVA 2.0 specs for SD and HD.
Presets updated: v59.
Sharktooth
4th August 2008, 13:48
Presets update: V60.
tetsuo55
4th August 2008, 15:22
@tetsuo55: ill see what i can do but remember DXVA is not universal and it is a microsoft implementation. Levels are implicit in DXVA 2.0 specs for SD and HD.
DXVA has nothing to do with the videocards ability to decode video. DXVA is simply the language used to communicate between the cpu and the videocard.
The capabilities of videocards to decode h264 streams is no different from other hardware (although there are lots of bugs!)
Sharktooth
4th August 2008, 15:26
nope... DXVA is tech that's part of the directx and it was implemented by microsoft.
different video cards have different capabilities, DXVA is made of a common API to let the programmer make common code for different video cards.
tetsuo55
4th August 2008, 15:49
nope... DXVA is tech that's part of the directx and it was implemented by microsoft.
different the video card have different capabilities, DXVA is made of a common API to let the programmer make common code for different video cards.
You're right
But because DXVA is such a pain in the ass all newer videocards have "Bitstreaming" which is basically a bluray decoder on the GPU die. If you look closely there is 0 difference between the settings to create a valid bluray file and a valid DXVA file.
Sharktooth
4th August 2008, 17:18
...except older DXVA enabled video cards that did that thru GPU programming...
smackbadger
5th August 2008, 14:25
Is it possible to start with a DXVA preset, say DXVA-SD-Anime_Toons and change it to a one-pass Quality 22 CRF encode and still have the final output be DXVA compliant, or are 2 passes required to meet the DXVA specs? I'd like my encodes to work if I ever do buy a standalone device in the future, but I have plenty of disk space on my HTPC and I've seen multiple people say that CRF encodes provide better quality if you're not targeting a specific file size.
Sharktooth
5th August 2008, 14:38
No. i will add the buffers for DXVA presets to be fully compliant. CRF and VBV (video buffer verifier) wont work as expected.
however it will all depend what will be the max bitrate of CRF 22 encode... if it's below the DXVA specs, it will work.
tetsuo55
5th August 2008, 15:45
...except older DXVA enabled video cards that did that thru GPU programming...
Assisted decoder features are either the same or weaker than regular h264 hardware decoders.
That feature is more of a hack than a real hardware decoder(as most of the work is still done in software)
i hope its clear now that aside from a bug here and there(resulting on stricter or looser implementation of the h264 specs) the decoding engine for DXVA and Standalone is exactly the same thing
in other words, anything encoded with the bluray profile will work perfectly fine on a DXVA card and vice-versa
---------
Is it possible to use CRF and limit its bitrate at the same time, or would that make it useless? Depending on SD or HD the bitrate limit can be pretty high
Sharktooth
5th August 2008, 15:51
Nope i already told you its not the same. DXVA has no theoretical level and bitrate decoding limits but the videocards ACTUALLY can decode full level 4.1 high profile specs and max bitrate (50Mbps) depending on videocard manufacturer and the decoder used. while blu-ray players have a cap at 40Mbps (10Mbps lower than Level 4.1 HP max bitrate) for discs and 54Mbps for other storage (exceeding level 4.1 by 4mbps for HP) ... and that is by specs.
the 2 things are completely different but videocards have just some things in common with BD players for simplicity. so encoding for DXVA playback wont ensure Blu-Ray compatibility! at all.
h.264 DXVA has different specs than Blu-Ray or other standards: http://download.microsoft.com/download/5/f/c/5fc4ec5c-bd8c-4624-8034-319c1bab7671/DXVA_H264.pdf
more on DXVA 2.0: http://msdn.microsoft.com/en-us/library/aa965263.aspx
DXVA is a Microsoft tech... and it's different from anything else.
so this:in other words, anything encoded with the bluray profile will work perfectly fine on a DXVA card and vice-versais NOT true. it's just the ACTUAL DXVA 2.0 compatible hardware can also decode blu-ray video streams. nothing more...
infact, if you think at the Radeon HD 2900 it has DXVA 2.0 support but it is NOT able to decode Blu-Ray streams coz DXVA was implemented thru shaders perfectly respecting the specs but, as i already said, the blu-ray and DXVA specs are different.
for what concerns CRF and bitrate, if you are constrained with a bitrate, CRF has not much sense... use a RC mode.
tetsuo55
6th August 2008, 10:41
i read those documents for another reason hehehe. So i agree with you at this point.
It gets even worse(good coding could force DXVA to decode 3.1 streams with the 4.1 engine, thus raising max DPB and allowing 16 ref frames in sd files)
What i am asking for is a single profile that will create a file that will work on both bluray players and DXVA videocards
Sharktooth
6th August 2008, 12:51
i dont think ppl will agree on using a "minimum common denominator" preset for both BD and DXVA...
i can add a general use preset that will work for both though but i will not remove any of the BD or DXVA presets.
chriszxl
6th August 2008, 18:24
Now 60!!! thx a lot!!!!!!!!
Sharktooth
6th August 2008, 18:29
now 60, what?
sasuke9999
6th August 2008, 18:41
why did you use trellis 1 with psy RDO and not trellis 2 in DXVA-SD-Anime_Toon? Trellis 2 with psy RDo schould bring the best quali or?
Sharktooth
6th August 2008, 18:48
psy-rdo on animes is not so efficient, maybe at all. so i disabled it in all anime/toons presets.
i used trellis 1 to enhance quality. trellis 2 is slow and tends to "flatten" the image in non RDO modes or when psy-rdo is disabled.
feel free to edit our local the preset and use trellis 2 if you want. maybe i will change it at a later time.
sasuke9999
6th August 2008, 18:58
so --psy-rd 0 means its deaktivated and --psy-rd 1 aktivated?
Sharktooth
6th August 2008, 19:25
psy-rd = 0 deactivated.
it is active BY DEFAULT.
~bT~
6th August 2008, 20:46
now 60, what?
presets v60 released.
tetsuo55
7th August 2008, 11:37
i dont think ppl will agree on using a "minimum common denominator" preset for both BD and DXVA...
i can add a general use preset that will work for both though but i will not remove any of the BD or DXVA presets.
Wow great solution, thanks! Simple and effective
Sharktooth
7th August 2008, 14:22
uhm... DXVA does not support level 4.1 for SD. i have to force level 3.1 but bitrate limits (VBV) will jeopardize BD 1080p encodes.
at this point i dont think it's possible to make it.
tetsuo55
7th August 2008, 14:41
uhm... DXVA does not support level 4.1 for SD. i have to force level 3.1 but bitrate limits (VBV) will jeopardize BD 1080p encodes.
at this point i dont think it's possible to make it.
why would 567P(L3.1 SD) settings interfere with 720p/1080p(L4.1HD) settings?
Are you saying that bluray allowes plaback of SD resolution with L4.1 encoding settings? in other words 720x567@16ref frames? Or does it only lift the bitrate limit?
Sharktooth
7th August 2008, 14:44
nope im saying i have to make 2 presets, one for SD and one for HD... that is quite useless.
also, DXVA is able to accelerate blu-ray streams... so we already have presets that work on both.
Sharktooth
7th August 2008, 16:27
Presets updated: V61.
tetsuo55
8th August 2008, 11:39
i'm not finished with all the tests yet but i have a question for you.
if i understand correctly, A standalone bluray player will play any resolution(SD/HD) as long as it stays within the L4.1 limits? In other words a SD stream can be out of L3.1 limits but still work on the standalone?
i have already confirmed this behaviour to be true for DXVA.
---
Also do you have or can you point me to a Bluray edge case? (1920x1080, 54Mbps, 4 ref frames), from tests in the past DXVA was able to decode at least 80Mbps
Sharktooth
8th August 2008, 12:09
i'm not finished with all the tests yet but i have a question for you.
if i understand correctly, A standalone bluray player will play any resolution(SD/HD) as long as it stays within the L4.1 limits? In other words a SD stream can be out of L3.1 limits but still work on the standalone?
the blu ray specs says Level 4.1 independently from the resolution.
i have already confirmed this behaviour to be true for DXVA.
Actually i cant remember if DXVA can do the same but i think the actual videocards can since they actually uses almost the same hardware decoders as the blu-ray standalones. that is subject to change though.
Also do you have or can you point me to a Bluray edge case? (1920x1080, 54Mbps, 4 ref frames), from tests in the past DXVA was able to decode at least 80MbpsNope sorry.
[)370|\|470!2
9th August 2008, 00:06
pff... damn windows and M$... lost all presets...
proceding with a hard undelete... crossing fingers.
Just wonder: not tired yet of bashing "M$", especially for things you should obviously blame your own incompetence?
vzmr82
9th August 2008, 00:36
I know this is a noob question, but I tried to search with no success: how do I delete the old profiles?
The files used to be (in some old version) within megui directory in Program Files, but I can't find them anymore.
Thanks in advance.
RS
~bT~
9th August 2008, 03:13
Just wonder: not tired yet of bashing "M$", especially for things you should obviously blame your own incompetence?
sharktooth has been very unwell of late yet he found time to update megui and provide new presets for us all here.
we (majority @ doom9) appreciate his hard work here so go find another thread to post in as your comments don't provide any encouragement or help!
bond
9th August 2008, 10:50
Just wonder: not tired yet of bashing "M$", especially for things you should obviously blame your own incompetence?cool down please, striked
chriszxl
11th August 2008, 15:38
now 60, what?
nothing..just mean ver.60 on then. :-)
and a question is I most use x264 for 1500-2000kbps source xvid/divx to 600-800 x264.. but I note that deblocking value change in your profile, I wanna know what's diff ? and I think I'd like more sharpen , so whice deblocking value better for me?
Avenger007
11th August 2008, 16:42
but I note that deblocking value change in your profile, I wanna know what's diff ? and I think I'd like more sharpen , so whice deblocking value better for me?
Lower deblocking values don't make the image sharper, it just makes block edges more visible and may appear sharper aka placebo effect. ;)
The best deblocking value would generally be the default 0,0; that's probably why it's the default :)
gav1577
11th August 2008, 19:02
Hi i have a question about the avchd and bluray profiles why do they both have --ipratio 1.1 --pbratio 1.1 in them is there any particular reason for this i mean any benefit over standard default values ?
Thanks
Octo-puss
11th August 2008, 20:51
I just was testing something and came to an interesting question:
Is it possible that unrestricted 2pass insane profile would result in a LITTLE worse image than the HQ one?
JarrettH
11th August 2008, 21:52
Not according to the settings. I looked at both and the difference is just the ridiculous settings not recommended to use are maxxed out. :p
rica
11th August 2008, 22:33
Sharktooth; first of all thanks a lot for your hard work!
Do you think it might not be a bad idea to make interlaced DXVA presets since most of the HDTV broadcast is interlaced (at least in Europe)?
And PV2 hard/soft owners can easily watch those re-encoded h264 files in DXVA decoding+deinterlacing mode which created by interlaced DXVA profiles.
I think the file lenght of the created files will be decreased while 1088i=544p.
florinandrei
12th August 2008, 03:17
I've been using the Standalone-AVC-HD preset for a while for 1080p content. The results are good, no issues on my PS3.
One question: This preset is supposed to limit the max bitrate to something like 16000kb/s or something like that. And yet, if I encode 2-pass with an average bitrate of about 11000kb/s, when I watch it on the PS3, I see the bitrate going briefly up to like 25Mb/s or so. Isn't that a problem with this preset?
Also, the presets come in an archive format that has issues with some archive management programs. On Windows, I can't extract it with File Explorer, I must use Total Commander if I want to look at individual files.
On Linux, I can't extract files with anything. Weird.
Octo-puss
12th August 2008, 16:49
if encoded with DXVA profile, I assume it will still play on PC with non-DXVA card, only it will be slow? or what the difference would be?
rica
12th August 2008, 20:07
if encoded with DXVA profile, I assume it will still play on PC with non-DXVA card, only it will be slow? or what the difference would be?
If DXVA compatible card and software don't exist, you will watch even created DXVA re-encodes in software mode and with a high CPU utilization.
Octo-puss
12th August 2008, 21:05
I gotta try to see the difference. How exactly are the DXVA profiles different?
rica
12th August 2008, 21:50
Octo-puss, you can give it a go with this file if you want:
Original 1920*1080 24p VC1 Terminator3 HD DVD
Used filters for decoding in re-encoding process:
File source(async) > Arcsoft mpeg demux > Arcsoft Video decoder (TMT)
x264 DXVA HD-HQ preset
http://rapidshare.com/files/136868880/EVO_arc.ts.html
_ _ _ _
Octo-puss
12th August 2008, 21:57
This is a sample from the source? Or something?
I'll try overnight :)
What kind of CPU usage are we talking about anyway, if it's possible to tell? Roughly!
rica
12th August 2008, 22:04
This is a sample from the source? Or something?
I'll try overnight :)
What kind of CPU usage are we talking about anyway, if it's possible to tell? Roughly!
This is a re-encode of the rip from the original HD DVD.
In DXVA mode %4-15 CPU usage with my E6750 and nVidia 8600 GTS. It's gonna be %50-65 without DXVA...
Octo-puss
12th August 2008, 22:44
Hmm... I played it and shows about 25% usage on 6750@3.2GHz.
rica
12th August 2008, 23:28
When i untick the DXVA feature of the decoder, CPU usage is %35-55...
Octo-puss
13th August 2008, 05:05
Untick where?
This is probably beyond me so forget it :)
florinandrei
13th August 2008, 09:27
So what would be the lowest common denominator for profiles like PSP, iPod, iPhone, etc? Assuming I want to encode once and play it everywhere. Of course, it would have to be playable on bigger devices such as the PS3, but I assume that's more or less guaranteed, right?
Atak_Snajpera
13th August 2008, 12:08
@Sharktooth
PSP profile does not need VBV buffer Size and Max bitrate. PSP supports files even at 25Mbps (720x480) without problems. I would also increase b-frames numbers to 3.
AppleTV according to official website does not support files above 5Mbps (http://www.apple.com/appletv/specs.html)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.