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
Sharktooth
13th April 2009, 22:33
Take a look here (http://forum.doom9.org/showthread.php?p=1197444#post1197444)...
already fixed it.
@djesteban: HQ presets are definatly resource demanding. however you have a quad core CPU. ensure all four cores are running at about 100% load, otherwise there is something slowing down the encoding process.
there could be several causes:
1 - slow decoder (the source must be decoded prior to being encoded, so if the decoder is slow it cant feed frames as fast as the encoder needs)
2 - complex avisynth script (the script requires too many cpu cycles so, again, the encoder cant be fed as fast as it can encode)
3 - the encoder is not running multithreaded (ensure the Threads option is set to Auto in the preset config window).
djesteban
13th April 2009, 23:32
already fixed it.
@djesteban: HQ presets are definatly resource demanding. however you have a quad core CPU. ensure all four cores are running at about 100% load, otherwise there is something slowing down the encoding process.
there could be several causes:
1 - slow decoder (the source must be decoded prior to being encoded, so if the decoder is slow it cant feed frames as fast as the encoder needs)
2 - complex avisynth script (the script requires too many cpu cycles so, again, the encoder cant be fed as fast as it can encode)
3 - the encoder is not running multithreaded (ensure the Threads option is set to Auto in the preset config window).
1- When you say decoded, do you mean that the protection as been removed? If so, the source that I am using is from a blu-ray image file (.ISO) that I did that is fully decrypted. I am mounting the image an pointing my AVS script from this image (see my script below). If this is not what you meant by decode, can you give me more insight?
2- This is my avs script... I would say that it is fairly simple:
DirectShowSource("J:\BDMV\STREAM\00000.m2ts", fps=23.976, audio=false)
#deinterlace
#crop
#resize
#denoise
Maybe it doesn't like M2TS files? Should it be a TS?
3- Encoder should be running multithreaded... it is set to 0 (auto), though, I have noticed that the CPU usage never go above 65%... when it is not encoding, there's nothing else taking CPU power. I have no anti virus or anything of this kind of ressource hugger. How can I make it so it takes full power?
Thank you in advance!
Inspector.Gadget
13th April 2009, 23:47
Why use DSS with an M2TS file? If it's MPEG-2 or H.264, consider using DGIndex or DGAVCIndex. If it's VC-1, consider paying the license fee and grabbing DGVC1DecNV.
Sharktooth
14th April 2009, 00:15
1 - when i said decoded i didnt mean decrypted... i meant decoded. your source, once decrypted will contain a mpeg-2, mpeg-4 AVC (aka h.264) or VC-1 video stream. those needs decoding to be re-encoded.
2 - read Inspector.Gadget's post.
djesteban
14th April 2009, 05:59
Thanks Sharktooth and Inspector.Gadget for your help... still have a couple of questions:
- If I use DGAVCDec as a decoder, will it decode from a .m2ts file directly, or is it best to demux the .264 stream first?
- Does anyone have a good avs template example or a tutorial on how to use avs script with DGAVCIndex, because it seems that I can't create one with the AviSynth script creator that comes as a part of meGUI.
Should I use something like this as a template for DGAVCIndex? :
loadplugin("...\DGAVCDecode.dll")
loadplugin("...\Decomb.dll")
avcsource("__vid__")
fielddeinterlace()
I guess this is a very basic example, but is there anything else I would like to append this? Also, I see that there's a fielddeinterlace function... if my source is progressive, should I remove that line? Also, is the decomb.dll needed? Where can I get information about the different function to use in an AviSynth script that will be use in combination with DGAVCDecode.
Thank you in advance again!!!
Sharktooth
14th April 2009, 14:09
all info are available in the DGAVCDec thread.
rack04
14th April 2009, 14:32
Thanks Sharktooth and Inspector.Gadget for your help... still have a couple of questions:
- If I use DGAVCDec as a decoder, will it decode from a .m2ts file directly, or is it best to demux the .264 stream first?
- Does anyone have a good avs template example or a tutorial on how to use avs script with DGAVCIndex, because it seems that I can't create one with the AviSynth script creator that comes as a part of meGUI.
Should I use something like this as a template for DGAVCIndex? :
loadplugin("...\DGAVCDecode.dll")
loadplugin("...\Decomb.dll")
avcsource("__vid__")
fielddeinterlace()
I guess this is a very basic example, but is there anything else I would like to append this? Also, I see that there's a fielddeinterlace function... if my source is progressive, should I remove that line? Also, is the decomb.dll needed? Where can I get information about the different function to use in an AviSynth script that will be use in combination with DGAVCDecode.
Thank you in advance again!!!
If you're working with a Blu-ray source then I would process with eac3to to handle audio overlaps due to seemless branching and then index with DGAVCIndex. I have had no problems using DGAVCDec with MeGUI. Do you have the path configured properly? Do you have DGAVCDecode.dll in the avisynth plugin folder? You would really need to know if your source is progressive or interlaced before you could even begin working with a template. I would consentrate on getting DGAVCDec working with MeGUI first.
Sharktooth
14th April 2009, 14:54
he should since megui auto-downloads dgavcdec from the auto-update server.
djesteban
14th April 2009, 16:32
If you're working with a Blu-ray source then I would process with eac3to to handle audio overlaps due to seemless branching and then index with DGAVCIndex. I have had no problems using DGAVCDec with MeGUI. Do you have the path configured properly? Do you have DGAVCDecode.dll in the avisynth plugin folder? You would really need to know if your source is progressive or interlaced before you could even begin working with a template. I would consentrate on getting DGAVCDec working with MeGUI first.
Hi rack04, is there an advantage using eac3to to demux audio/video track instead of working with tsMuxer?... or do they do the exact same thing?
Thanks
rack04
14th April 2009, 16:35
Hi rack04, is there an advantage using eac3to to demux audio/video track instead of working with tsMuxer?... or do they do the exact same thing?
Thanks
This would be better asked in the eac3to thread so we don't clutter up this thread.
djesteban
14th April 2009, 18:47
rack04
Cool, that's what I did
Also.... why is this thread not stickied...? it should!!!
yesgrey
28th April 2009, 20:30
The "Unrestricted 1pass const. quality" profiles all give the same quality?
From my understanding, since all use CRF 18, they should give the same quality, and the difference between them being related only to the size of the file created.
I've run a quick test to see the results, here they are:
-Unrestricted 1pass const. quality fast: 35651kB
-Unrestricted 1pass const. quality balanced: 41383kB
-Unrestricted 1pass const. quality HQ: 40575kB
-Unrestricted 1pass const. quality EQ: 40319kB
So, except the fast profile, all others seem to confirm my assumption. Am I right, or in fact the "higher quality" profiles are for high quality instead of higher compression?
nurbs
28th April 2009, 21:19
crf only gives you constant quality for a certain set of settings. You change the settings and the meaning of crf changes. Slower settings will always give you better quality for a certain bitrate, but in crf mode the file will not necessarily end up smaller.
Eric B
2nd May 2009, 16:34
I've looked at the differences in the presets between DXVA HQ (SD & HD), Xbox360, BluRay, HDDVD and AVCHD. By removing the common parameters and the bitrate, and reordering the parameters, we get (supposed ordered by decoding complexity):
DXVA SD HQ --level 3.1 --ref 8 --bframes 3 --trellis 2 --vbv-bufsize 14000 --vbv-maxrate 17500 --deblock -1:-1
DXVA HD HQ --level 4.1 --ref 4 --bframes 3 --trellis 2 --vbv-bufsize 50000 --vbv-maxrate 50000 --deblock -1:-1
BluRay --level 4.1 --ref 3 --bframes 3 --trellis 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --ipratio 1.1 --pbratio 1.1 --qcomp 0.5 --nal-hrd --sar 1:1 --keyint 24 --min-keyint 2 --deblock -1:-1
AVCHD --level 4.1 --ref 3 --bframes 3 --trellis 1 --vbv-bufsize 16500 --vbv-maxrate 16500 --ipratio 1.1 --pbratio 1.1 --qcomp 0.5 --nal-hrd --sar 1:1 --keyint 24 --min-keyint 2
HD-DVD --level 4.1 --ref 3 --bframes 2 --trellis 2 --vbv-bufsize 14475 --vbv-maxrate 24000 --ipratio 1.1 --pbratio 1.1 --qcomp 0.5 --nal-hrd --keyint 14 --min-keyint 2 --deblock -1:-1
Xbox360/PS3 --level 4.1 --ref 3 --bframes 3 --trellis 2 --vbv-bufsize 24000 --vbv-maxrate 24000 --ipratio 1.1 --pbratio 1.1 --qcomp 0.5 --merange 12
I am wondering what are the key parameters in the settings which will prevent to make a video encoded in one preset to be readable in HW of other preset (e.g. a DXVA video in a XBox360 or Blue-Ray player).
The bufsize and maxrate are clearly important settings. Is the ref (references frames) also a critical point? I mean, will a blue-ray/AVCHD player read a video encored with the DXVA SD profile with 8 reference frames?
The settings are explained in http://mewiki.project357.com/wiki/X264_Settings but the consequence are not always clear...
Thank you for the further explanations!
--vbv-maxrate depends on profile and level
--ref depends on level and resolution of the video (all reference frames have to fit into the decoded picture buffer of the hardware player for the stream to be playable)
some hardware wants --nal-hrd and a specific maximum keyframe interval
Take a look at the wikipedia article about Mpeg4 AVC. The limitations of the profiles and levels are explained there. Often when I read about people having hardware compatibility problems here on the forum it seems to be too many reference frames.
Eric B
4th May 2009, 13:14
I've read again the part about --ref in mewiki, which confirms your saying: --ref 4 or 3 is related to the resolution: within level 4.1, the max being 4 for 1080p and 9 for 720p.
I've tested many videos (DVD rip in DXVA-SD profile, or HD samples in h264 (Divx7 HD or Apple Mov)) in a Panasonic BD-35 blue ray player and a Xbox360.
1) In the BD35, once muxed in AVCHD, almost all the video are correctly decoded. The pb is that AVCHD standard does not allow "free" resolution and AR: you get strange black bands below the video (with 720x432 video) or no video at all (Terminator Salvation Trailer, 1280x528). Moreover, AVCHD requires AC3 track, which could take a big part of the file once only the video is recompressed to h264. On the other side, you gain the better upscaling of blue-ray player.
2) in the Xbox360, the AVCHD is not recognized, but the files are:
2a. the mov files are read, but because of a high bitrate (peak of 40 Mbits in the BBC-in-the-blue sample), some frames are dropped / video decoding freezes....
2b. I've just tested 2 videos in mp4 container: one DVDRip in x264 DXVA SD + AAC LC, and ElephantsDream in video in Divx7 HD + AAC LC + subtitles. None were readable, despite a update of the xbox. A pb of mp4 container?
EDIT: as mentioned below, they had indeed 5.1 AAC, preventing the playback.
2c. the wmv-hd files were ok (ms samples in VC1/WMA3 5.1)
2b. I've just tested 2 videos in mp4 container: one DVDRip in x264 DXVA SD + AAC LC, and ElephantsDream in video in Divx7 HD + AAC LC + subtitles. None were readable, despite a update of the xbox. A pb of mp4 container?
The xbox360 doesn't play files with 5.1 aac tracks. That might be the problem.
Eric B
4th May 2009, 16:19
yes, you re right, I have to test again with stereo aac along avc video in mp4 container, or 5.1 ac3 in avi file (ac3 in mp4 is not std compliant, so I doubt it will work)
ac3 in mp4 is not std compliant, so I doubt it will work Has been standardised half a year or so ago. Still not much hardware support, definitly not on the xbox360 or ps3.
Puffin617
5th May 2009, 11:20
Hi there,
Thanx alot for all your good work - it is much appreciated...
I've got a Nokia N96 but I'm not sure what the x264 settings are for this device...
I've looked all over the net but I can't find any specs relating to the H.264 specs on this phone...
Which of your "device" profiles would be the most appropriate?
Regards,
Barend
The phone supports maximum 640*480 resolution @ 30 fps. I don't know which device preset is appropriate, but it should handle more than the baseline presets offer. Try encoding some 5 minute clips with the other device presets and see if the phone plays them.
rack04
12th May 2009, 17:56
Maybe this is intentional but should "Unrestricted 1pass Const. Quality Balanced" have -bframes 16?
Sharktooth
13th May 2009, 14:08
@rack04: yes.
Sharktooth
13th May 2009, 14:10
Hi there,
Thanx alot for all your good work - it is much appreciated...
I've got a Nokia N96 but I'm not sure what the x264 settings are for this device...
I've looked all over the net but I can't find any specs relating to the H.264 specs on this phone...
Which of your "device" profiles would be the most appropriate?
Regards,
Barend
It should work with Level 1.3 preset for PDAs and cellphones.
SacredCultivator
13th May 2009, 16:29
Just wondering, for the DXVA presets, that wouldn't include let's say XBOX/PS3's would it? As I'm just sorta messing around with some settings, Single Pass (As I don't mind the variable Size Outputs). As previously been using the Unrestricted Presets but some users are reporting 'a bad atom', which made me sorta look into settings but not 100% sure what settings affect the Hardware Compatibility issue.
---
EDIT:
Main difference I see between my current settings and the DXVA or even the PS3/XBOX360 profiles are the AVC Level (I use Unrestricted, whereas the others are 4.1) and under the Macroblock Options I had p4x4 enabled and the presets don't.
Oh and naother is b-pyramid was enabled for me and disabled for the other 2 presets.
Apart from those 3 differences do the other settings conflict with compatibility issues?
As my b-frame mode is Spatial because I don't use 2-pass (which Auto would be the recommended value)
(I don't use any CQM's)
And the issue of the bad atom, which is related to a 64-bit bit time code, would simply adding "assumefps(23.97)" or assumefps(29.97) as the last line fix the issue?
Arshad07
13th May 2009, 16:59
I have a Nokia 5800 Xpress Music, but i cant seem to find a profile to encode my videos so that it can play on the phone. I tried everything, including the iPOD/iPhone/cellphones profiles. But none work. :( Any help please
Thanks
nurbs
13th May 2009, 17:05
@SacredCultivator:
p4x4 won't break compatibility with hardware players (definitly works with PS3), but it only helps at low resolutions. If you do DVD resolutions or higher I would deactivate it.
b-pyramid used to cause problems but seems to work now (tested only 720p on DXVA, ps3 and wd-tv).
A (explicitly specified) level of 4.1 or lower is definitly needed for PS3 and I think for DXVA as well, but it's generally a good idea to always specify a level, else x264 will guess a level that fits your settings.
b-frame mode doesn't matter for playback.
No idea what you mean with bad atom, but the PS3 for instance won't play files > 4GB (which use 64-bit timestamps).
@Arshad07:
Maybe it's the resolution. The phone only supports 320*240 @ 30fps.
SacredCultivator
13th May 2009, 17:11
Thanks nurbs for the explanations.
Just a few things I wanted to comment.
yeah minimum resolutions I deal with are 640x480 (I dunno if you'd count that as low resolutions)
I guess I'll enable b-pyramid then since it doesn't cause any problems now. {But I guess it still has some problems given taht the presets for the DXVA / PS3|360 still has it disabled)
And the bad atom seemed to give some itunes/quicktime users problem because of the 64-bit timestamps. And adding "assumefps(23.97)" seems to have been a workaround for that mentioned in another thread. But definitely none of the files I work with are over 4GB's
Arshad07
13th May 2009, 17:41
@Arshad07:
Maybe it's the resolution. The phone only supports 320*240 @ 30fps.
I did that, still doesnt work :(
Sharktooth
13th May 2009, 18:54
http://forum.doom9.org/showpost.php?p=1284920&postcount=724
... if it doesnt try with 1.2 or 1.1 ...
Arshad07
13th May 2009, 23:05
http://forum.doom9.org/showpost.php?p=1284920&postcount=724
... if it doesnt try with 1.2 or 1.1 ...
Works like a charm with the 1.3. Cheers mate! :)
juGGaKNot
15th May 2009, 06:45
DOWNLOAD (http://mirror05.x264.nl/Sharktooth/MeGUI/profiles/MeGUI-x264_generic_profiles_v85.zip)
(mirror (http://www.webalice.it/f.corriga/megui/MeGUI-x264_generic_profiles_v85.zip))
Ver.84
Changelog:
DOWNLOAD (http://mirror05.x264.nl/Sharktooth/MeGUI/profiles/MeGUI-x264_generic_profiles_v85.zip)
(mirror (http://www.webalice.it/f.corriga/megui/MeGUI-x264_generic_profiles_v85.zip))
Ver.85
Changelog:
Edit it :)
Sharktooth
15th May 2009, 12:35
done. thanx.
Chainmax
7th June 2009, 21:49
http://forum.doom9.org/showpost.php?p=1284920&postcount=724
... if it doesnt try with 1.2 or 1.1 ...
Hmm...that limits the resolution choices to ~QVGA max, right? Do you reckon if it can handle that it might be able to playback VGA-sized Xvid at max settings?
loretta80
8th June 2009, 21:30
Hi, there.
Is there already a preset for PNA's like the TomTom Go series? I have got a 920T with tomplayer (tomplayer dot net)mplayer based and here is the commandline the builder suggests:
mencoder -audio-preload 0.8 -delay 0.1 -af volnorm -srate 22050 -oac mp3lame -lameopts mode=3:cbr:br=96 -subfont-autoscale 3 -subcp latin1 -noodml -vf scale=480:272,crop=480:272 -sws 9 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vmax_b_frames=0:vbitrate=720 -ffourcc XVID -o outfile infile
Maybe the framerate have to be adjusted to 10fps for PNA's with lower than 400Mhz and 12fps for higher ones.
BTW. there is a newer version of MEncoder svn rev 29312 - 05/18/2009
Visor
11th June 2009, 00:32
Hello,
I've tried encoding a couple of movies using Xoloco's 'Standalone-Blu-ray' presets (one using normal preset and the other using the 'fast' preset) and both produced videos that have a brightness (gamma?) push that is way too high. It's not so noticable in daytime scenes, but dark scenes look very washed out. The brightness jump occurs both on my PC (using MPC & CoreAVC) and on my Sony BDP-S350 player (after I mux the .mkv into an AVCHD using TSMuxer).
I've made no adjustment to the presets, and I used the default settings in MeGUI to make the avs file:
DirectShowSource("E:\Movie.mkv", fps=23.976, audio=false, convertfps=true)
#deinterlace
#crop
#resize
#denoise
I have allowed MeGUI to download all the latest updates. x264 is currently Jeeb's patched build 1162. Any idea what the issue could be? Is there something in either MeGUI, the Blu-ray presets, or the AVS file that I need to change in order to prevent the brightness push?
Thanks a bunch,
Visor
Sharktooth
11th June 2009, 13:35
this is NOT the place to discuss 3rd party presets for megui.
@loretta80: no tomtom presets yet. i'll see if i get more info to create one. thanx anyway for your suggestions.
Visor
15th June 2009, 22:47
this is NOT the place to discuss 3rd party presets for megui.
My apologies, the reason why I posted here was because the Standalone-Blu-ray presets are listed on the first post of this thread. I didn't see a separate thread for 3rd party presets... maybe you could forward me the link?
At any rate, I found the answer (http://forum.doom9.org/showthread.php?p=761756#post761756) to this issue, which turned out not to be preset-related after all, but instead AviSynth-related. I needed to add the following statement to my .avs file:
ColorYUV(levels="TV->PC")
Cheers,
Visor
Dark Eiri
18th June 2009, 01:32
The Xbox360 / PS3 profiles are still set to 3 ref-frames? I can play 4 ref-frames on the Xbox360 flawlessly, wouldn't be better to update it?
Sharktooth
18th June 2009, 02:56
3 or 4 refs do not make much of a difference.
djesteban
26th June 2009, 03:10
Ok, I am confused as to which one is better between:
Unrestricted 2pass HQ or Unrestricted 2pass Extra Quality
Thanks in advance
Sharktooth
26th June 2009, 03:19
Extra Q. is slower so it compresses more ("better"... better for what?)
djesteban
26th June 2009, 04:30
Extra Q. is slower so it compresses more ("better"... better for what?)
Yeah... I guess I should've been more precise. Better in terms of picture quality... I mean which one will give me good quality between those two settings
m3mbran3
26th June 2009, 13:05
Yeah... I guess I should've been more precise. Better in terms of picture quality... I mean which one will give me good quality between those two settings
extra quality
I think there's a little error in the AppleTV preset, B-frame mode is set to none.
I don't have an AppleTV, but reading up about it it does indeed handle cabac, even if the spec's from Apple says it can't. When using cabac there's some limitations on the bitrate though, and it's not completely clear how it's related. On the handbrake forum they are investigating that to some extent, but but I can't find anything that justifies changing your preset, not yet anyway.
Adub
14th July 2009, 17:58
I have to wonder, are these presets, and thus MeGUI, ever going to take advantage of the new --preset and --tune flags recently added to x264?
j8ee
14th July 2009, 20:01
Well, the presets themself are no "advantage" in megui's case, as they are only useful when using it on the commandline so you don't have to decide so much yourself. Sharktooth's presets already do that. Nothing in the encoders capabilities are changed with the inbuilt presets. They can however give suggestions to tweak the megui presets a little, as the x264 developers are clever guys and undoubtedly can justify the settings for their presets.
Adub
15th July 2009, 16:52
I understand that, however, what about the --tune flag?
j8ee
15th July 2009, 17:06
Exactly the same. I intended to use the term presets in a general way, for covering all of the added switches.
Sharktooth
16th July 2009, 13:21
I have to wonder, are these presets, and thus MeGUI, ever going to take advantage of the new --preset and --tune flags recently added to x264?
yes. im already working on it.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.