Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
14th December 2009, 11:02 | #1 | Link |
Registered User
Join Date: Nov 2007
Posts: 240
|
Please critique my x264 settings!
OK seeing as there's no 'right' and 'wrong' I'm looking for some areas where I can improve the efficiency of my encoding, while maintaining device compatibility, and I'm looking for some suggestions from people who know better than I.
Some background: I have a long background with compression technologies, having been involved with companies like Macrovision, Fast, Quadrant, DPS, Darim, Optibase, Sonic Foundry, Canopus, Pioneer. I would have considered myself an expert in MPEG2 and early MPEG4 compression, however I don't have the time professionally to keep up those skills for present methods. Currently I work with products from Viewcast but the needs for realtime compression are very different to what I am trying to achieve here. My aim is to create nearly lossless results from fairly poor broadcast MPEG2, for playback either on DXVA or PS3/Xbox360. Primarily I playback on 7MCE, but I often take files to a friend's house who has a PS3. I also have a PSP so I'd like to understand what settings I might have to change to use that (apart from resolution), or whether I can do a one-size-fits-all profile. Contrary to the above I do store a lot of TV so I want to get the files as small as possible while maintaining the quality. Hence quality-based 3-pass encoding. SD encodes I do at 720 width, HD encodes at 960 width. I've used deblocking 1:1 because the source material seems overly sharp, and I feel 1:1 delivers a very watchable picture. My GUI is Xvid4PSP which isn't as well known as the others, and also doesn't support the standard preset system. What I am hoping for is whether changes to things like ref frames or other more complex settings might give me more efficiency without terrible time penalties, and most importantly maintaining compatibility. I'm encoding on a Q6600, I can't wait until I can afford an i7. So the challenge, give me some feedback. I'm very happy with the results I'm getting. Typically my files are half the size of a "scene" rip with equivalent quality. Please tell me: 1. Anything you suggest that might realise smaller files 2. Anything I'm using that might be overkill, ie not worth the tradeoff time vs filesize 3. Anything else of relevance? Code:
video codec: x264 video cli: --pass 1 --crf 24.0 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 --pass 3 --crf 24.0 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 --pass 2 --crf 24.0 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 |
14th December 2009, 11:09 | #2 | Link | ||
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
2. Use the presets and dump everything in bold. The presets are your friend. 3. I have no idea why you are lowering qcomp--and I doubt you do either. For deblocking, why not run a preprocessing filter, like fft3dfilter or dfttest? x264's deblocking is not meant to fix a crappy source. 4. You said "near lossless"; crf 24 is hardly that, though perhaps with your crappy source you could get away with it. 5. The VBV settings don't at all match the level you're using. Why did you pick 24 megabit? Quote:
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 14th December 2009 at 11:12. |
||
14th December 2009, 11:23 | #3 | Link |
Registered User
Join Date: Nov 2007
Posts: 240
|
Actually I should clarify, these are not actually x264 command lines, its the way my GUI stores the settings. Xvid4PSP uses its own presets and doesn't have the normal presets you see with Staxrip or MeGUI.
I might go and pull out the command lines once I've started an encode, that might be clearer. |
14th December 2009, 11:35 | #5 | Link |
Registered User
Join Date: Nov 2007
Posts: 240
|
Well actually looks like those ARE the command lines.
That whole thing is made by Xvid4PSP, I have changed certain things but nothing I didn't understand, so I can't say why some things are set If I use those presets are they just single pass presets, I would still have to manually manage the multiple passes? I'm not so sure on this stuff, this is why I need a GUI. |
14th December 2009, 11:41 | #6 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
14th December 2009, 11:48 | #7 | Link | |
Registered User
Join Date: Nov 2007
Posts: 240
|
Quote:
I couldn't get the same result out of StaxRip, and I couldn't get a result at all out of MeGUI. I'm sure Xvid4PSP is out of date re the presets but I am getting good results out of it now. But perhaps its time to revisit StaxRip. |
|
14th December 2009, 12:02 | #9 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
What's the point of asking for a critique of your settings if you're just going to throw them in the bin and use some other unrelated preset from Xvid4PSP anyways? Seriously, I don't understand the point of this thread. The settings you posted won't even work. Therefore, if they are working, you're not using those settings.
Also, I'm just going to make a little guess here, but I'm pretty sure I know more about x264 than the Xvid4PSP developers. Just a hunch. |
14th December 2009, 12:08 | #10 | Link | |
Registered User
Join Date: Nov 2007
Posts: 240
|
Quote:
I have no doubt you know a whole lot more than anybody, but I'm not sufficiently expert to use the command lines on their own at the moment, I need a GUI to glue it all together for me. So I'm hoping that with Staxrip I can sort all the rest, and get a working command line that DOES make sense so I can improve what I am doing. I'm only using Xvid4PSP because its very easy to use, and whatever the go is with the strange command line, it is giving me a result. However it sounds as if I may be able to get the same or better result, quicker using x264 more closely to how its meant to be used. This is the whole output of a job in progress with Xvid4PSP if it makes anything clearer: Code:
TASK ------------------------------ Format: MP4 PS3 or XBOX360 Duration: 01:47:13:560 (160839) VideoDecoder: MPEG2Source Resolution: 1440x1080 > 720x400 VCodecPreset: Custom VEncodingMode: ThreePassQuality VideoCodec: MPEG2 > x264 VideoBitrate: 11980 > Q24.0 Framerate: 25.000 SourceType: PROGRESSIVE FieldOrder: UNKNOWN AudioDecoder: bassAudioSource AEncodingPreset: AAC-HE ABR 64k AudioCodec: AC3 > AAC AudioBitrate: 384 > 64 Samplerate: 48000 Channels: 2 SCRIPT ------------------------------ import("C:\Program Files (x86)\Winnydows\XviD4PSP5\dlls\AviSynth\functions\AudioFunctions.avs") import("C:\Program Files (x86)\Winnydows\XviD4PSP5\dlls\AviSynth\functions\VideoFunctions.avs") loadplugin("C:\Program Files (x86)\Winnydows\XviD4PSP5\apps\DGMPGDec\DGDecode.dll") loadplugin("C:\Program Files (x86)\Winnydows\XviD4PSP5\dlls\AviSynth\plugins\bass\bassAudio.dll") video = MPEG2Source("C:\Encode\MOVIE- Mr - Mrs Smith - Nine Digital HD (2009-12-08 20-20).index\MOVIE- Mr - Mrs Smith - Nine Digital HD (2009-12-08 20-20).d2v",cpu=0,info=3) audio = bassAudioSource("C:\Encode\MOVIE- Mr - Mrs Smith - Nine Digital HD (2009-12-08 20-20).index\MOVIE- Mr - Mrs Smith - Nine Digital HD (2009-12-08 20-20) T80 2_0ch 384Kbps DELAY 0ms.ac3") AudioDub(video, audio) AutoYV12() Spline16Resize(720, 400) VIDEO ENCODING ------------------------------ Encoding video to: C:\Temp\0098.264 x264 Q24.0 720x400 25.000fps (160839 frames) ...first pass... x264.exe: --pass 1 --crf 24.0 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 --sar 1:1 --stats "C:\Temp\0098.log" --output "C:\Temp\0098.264" "C:\Temp\0098.avs" x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 x264 [info]: cabac=1 ref=1 deblock=1:1:1 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=0.0:0.0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 chroma_qp_offset=0 threads=6 nr=0 decimate=1 mbaff=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=2 b_bias=0 direct=3 wpredb=1 wpredp=2 keyint=250 keyint_min=25 scenecut=40 rc_lookahead=60 rc=crf mbtree=1 crf=24.0000 qcomp=0.50 qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=24000 vbv_bufsize=24000 ip_ratio=1.40 aq=1:1.00 x264 [info]: profile Main, level 4.1 Best bitrate for Q24.0: 456kbps ...second pass... x264.exe: --pass 3 --bitrate 456 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 --stats "C:\Temp\0098.log" --sar 1:1 --output NUL "C:\Temp\0098.avs" x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 x264 [info]: cabac=1 ref=3 deblock=1:1:1 analyse=0x3:0x133 me=esa subme=9 psy=1 psy_rd=1.0:0.0 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 chroma_qp_offset=-2 threads=6 nr=0 decimate=1 mbaff=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=2 b_bias=0 direct=3 wpredb=1 wpredp=2 keyint=250 keyint_min=25 scenecut=40 rc_lookahead=0 rc=2pass mbtree=1 bitrate=456 ratetol=1.0 qcomp=0.50 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 vbv_maxrate=24000 vbv_bufsize=24000 ip_ratio=1.40 aq=1:1.00 x264 [info]: profile High, level 4.1 ...last pass... x264.exe: --pass 2 --bitrate 456 --level 4.1 --deblock 1:1 --direct auto --b-adapt 2 --trellis 2 --qcomp 0.5 --vbv-bufsize 24000 --vbv-maxrate 24000 --partitions all --subme 9 --me esa --rc-lookahead 60 --stats "C:\Temp\0098.log" --sar 1:1 --output "C:\Temp\0098.264" "C:\Temp\0098.avs" x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 x264 [info]: cabac=1 ref=3 deblock=1:1:1 analyse=0x3:0x133 me=esa subme=9 psy=1 psy_rd=1.0:0.0 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 chroma_qp_offset=-2 threads=6 nr=0 decimate=1 mbaff=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=2 b_bias=0 direct=3 wpredb=1 wpredp=2 keyint=250 keyint_min=25 scenecut=40 rc_lookahead=0 rc=2pass mbtree=1 bitrate=456 ratetol=1.0 qcomp=0.50 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 vbv_maxrate=24000 vbv_bufsize=24000 ip_ratio=1.40 aq=1:1.00 x264 [info]: profile High, level 4.1 |
|
14th December 2009, 12:11 | #12 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
You've gone out of your way to change the settings from the (rather reasonable) defaults of Xvid4PSP to include a pointless exercise in 3-pass encoding. What's stopping you from changing them back? I'm completely confused at this point. I gave you suggestions, many of which are equally applicable regardless of what GUI you use. Yet you haven't implemented a single one of them--nor given me a good reason why you haven't--despite the fact that you started this thread for the express purpose of asking for suggestions. I give up. |
|
14th December 2009, 12:14 | #13 | Link | |
Registered User
Join Date: Nov 2007
Posts: 240
|
Quote:
3-pass encoding is in the drop down boxes so I used it, and have been for some time. I'm just hesitant to go in and change the command line settings because I don't understand very much of it at all. When you said above "dump the settings in bold" did you mean ad the bolded settings to presets and then try that? I do really appreciate your help, and I'm sorry if I seem dumb! |
|
14th December 2009, 12:16 | #14 | Link | |||
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
Quote:
Quote:
|
|||
14th December 2009, 12:18 | #15 | Link | |
Registered User
Join Date: Nov 2007
Posts: 240
|
Quote:
Funny that I posted there so you would see it and was expecting others to help me here :P So 2-pass and remove the stuff in bold, check. |
|
14th December 2009, 12:34 | #18 | Link |
Registered User
Join Date: Nov 2007
Posts: 240
|
Got the message regarding multiple passes.
So how does this look: --preset veryslow --tune animation --crf 24.0 --level 4.1 --deblock 1:1 I found out that Xvid4PSP can save custom command lines so this could be a lot easier than I thought. Last edited by Mixer73; 14th December 2009 at 12:50. |
14th December 2009, 13:50 | #20 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Mixer73, you can type "x264.exe --fullhelp" for a complete list of all presets/tunes and the parameters they actually set.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
Thread Tools | Search this Thread |
Display Modes | |
|
|