[patch] x264 psyrdo .05

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Locked
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

[patch] x264 psyrdo .05

Post by dynaflash »

If anyone is interested in playing with psyrdo .05 here is a patch for HB:
http://handbrake.pastebin.ca/1072595

Info on it can be found here http://forum.doom9.org/showthread.php?t=138293
In my limited testing I have to say psyrdo is awesome and I personally look forward to it going into the x264 repo.
Note to those that do not read the whole thread. psyrdo does not work well at all with trellis=1 so x264 will warn you and set trellis=0. trellis=2 works great reportedly though. Haven't tested it myself.
Last edited by dynaflash on Tue Jul 15, 2008 6:43 pm, edited 1 time in total.
Reason: Change post title
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

I'm compiling post-patch now. Reading through the linked thread, it would seem that using trellis=2 is now a good idea for all encodes with psyrdo, even CQ ones, which goes against the handbrake documentation (http://trac.handbrake.fr/wiki/x264Options). When using psyrdo, should I consider the documentation re trellis out of date, then?

edit: to be precise, I'm finding a discrepancy where the documentation says that trellis=2 should only be used "for a 2nd pass," since CQ mode doesn't use a 2nd pass.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: [patch] x264 psyrdo .05

Post by dynaflash »

No, current convention still applies. CRF or CQ now should use trellis=0 if you have applied the psyrdo patch. In fact x264 will overrride trellis=1 to trellis=0 in any event. trellis=2 still does *not* apply to cq/crf in x264.
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

Okay, thanks for the clarification. I'll have some comparison shots soon.
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

I'm actually seeing next to no difference between my psyrdo and normal x264 encodes. If anything, using the lobby gunfight scene from The Matrix, the normal x264 is slightly (very very slightly) sharper.

I'm using a patched (and plain) svn1569.

I used the following settings:

CRF 65%
Anamorphic loose

psyrdo:

Code: Select all

ref=6:mixed-refs=1:bframes=9:bime=1:brdo=1:me=umh:subq=6:trellis=0:analyse=all:no-fast-pskip=1:direct=auto:no-dct-decimate=1:merange=24:vbv-maxrate=4900:vbv-bufsize=3500:weightb=1:8x8dct=1:b-pyramid=1
plain:

Code: Select all

ref=6:mixed-refs=1:bframes=9:bime=1:brdo=1:me=umh:subq=6:trellis=1:analyse=all:no-fast-pskip=1:direct=auto:no-dct-decimate=1:merange=24:vbv-maxrate=4900:vbv-bufsize=3500:weightb=1:8x8dct=1:b-pyramid=1
Example shots:

psyrdo:
Image

plain:
Image

Are there only certain kinds of scenes where psyrdo has a great effect? Maybe I'm just using the wrong footage...
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: [patch] x264 psyrdo .05

Post by Ritsuka »

You should compare the same frame…
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: [patch] x264 psyrdo .05

Post by refulgentis »

I've been using psyrdo since it came out...you will really really notice in movies with grain, but generally has a positive effect on all frames. That being said, it looks like those frames you have are too "in motion" to really notice an effect from just a still frame, based on my experience (it could be only I don't have an eye trained enough for it).
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

I find it really difficult to get to the exact same frame in vlc (maybe I just haven't looked hard enough), so I've been trying to get as close as possible. Point taken re motion. I'll go find a different source, maybe one with a still camera looking at a lot of trees or something.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: [patch] x264 psyrdo .05

Post by rhester »

As stated many times on doom9 by the author, psychovisual effects will almost always result in worse results when comparing one still frame to another but will invariably look better in motion. This is why SSIM is not a good indication of quality with such effects.

Rodney
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

rhester wrote:As stated many times on doom9 by the author, psychovisual effects will almost always result in worse results when comparing one still frame to another but will invariably look better in motion. This is why SSIM is not a good indication of quality with such effects.

Rodney
Is there any easier/more exact way to test the effect of psyrdo than encoding the clip with and without the psychovisual effects and trying to remember what one looks like as you watch the other?
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: [patch] x264 psyrdo .05

Post by dynaflash »

probably not. I mean, the whole point is you perceive a better picture and can tell watching the movie. Frankly if its so little you cannot tell watching the output, then it probably doesn't make much difference to you. As you can tell reading the doom9 thread, peoples opinions and preceptions vary.
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: [patch] x264 psyrdo .05

Post by refulgentis »

jzietman wrote:
rhester wrote:As stated many times on doom9 by the author, psychovisual effects will almost always result in worse results when comparing one still frame to another but will invariably look better in motion. This is why SSIM is not a good indication of quality with such effects.

Rodney
Is there any easier/more exact way to test the effect of psyrdo than encoding the clip with and without the psychovisual effects and trying to remember what one looks like as you watch the other?
I have a script set up to encode x seconds into the material for 10 seconds then mux it into an mp4 (using mencoder and mp4box). Then, I open both in quicktime and press command + enter (play all), they correspond pretty directly and its easy to make a decision then.
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: [patch] x264 psyrdo .05

Post by jzietman »

Any way to make that script work for the (old) mp4box mac binary available (needs to be run using the terminal)? Otherwise I could just encode two chapters and play all in quicktime like you do. Longer source = more tedious comparison, but it work still work.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: [patch] x264 psyrdo .05

Post by dynaflash »

tbh, all of this is probably a matter of semantics. As every indication is that psy-rdo *will* go into the x264 repo at some point and in some way shape or form. At which time of course HB will be using it. Dark_Shikari that patches author (as well as the awesome VAQ which we now enjoy) is still reportedly playing around with it. Consider this a "Sneak Peak" . I only posted the patch so that HB users could play with it in order to get an idea of what is likely coming in x264.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: [patch] x264 psyrdo .05

Post by cvk_b »

dynaflash wrote:Consider this a "Sneak Peak" . I only posted the patch so that HB users could play with it in order to get an idea of what is likely coming in x264.
Thanks. I like it.
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: [patch] x264 psyrdo .05

Post by refulgentis »

jzietman wrote:Any way to make that script work for the (old) mp4box mac binary available (needs to be run using the terminal)? Otherwise I could just encode two chapters and play all in quicktime like you do. Longer source = more tedious comparison, but it work still work.
Actually, you don't even need to box it necessarily, now that I look at my script, just open one .264 file with VLC, another with mplayer, and hope you click them closely enough. If you don't like that, the old mp4box binary will handle it fine (I assume you know how to use it).

Script I use:

Code: Select all

mencoder "$1"  -of rawvideo -vf harddup -oac faac -ovc x264 -x264encopts crf=23:bframes=3:subq=5:me=umh:threads=4:level=31:ref=3:vbv-maxrate=4500:vbv-bufsize=2000:keyint=240:min-keyint=24 -ss "$2" -endpos "$3" -o "$1"-sample.264
Takes 3 arguments: $1 (file name), $2 (start position specified in mm:ss), $3 (duration specified in mm:ss). Will output a file in the same directory as your source, with the same name as your source appended with -sample.264. Rename that sample (nopsy or psy depending on what you did initially), specify no-psy in mencoders x264encopts line, then generate another sample with the same $1, $2, $3 values.

This *should* work, the only caveats being I'm not sure mencoder accepts *all* arguments that x264 does (I remember when psy first came out I couldn't specify the new arguments to mencoder through x264encopts), and I haven't used this script in a while so I'm not sure I'm explaining everything correctly :-P.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: [patch] x264 psyrdo .05

Post by jbrjake »

Okay, really guys. This is a thread about psyrdo, in the HB dev forum, not a mencoder and mp4box tutorial repository.

Everything anyone needs to know about it is located in the doom9 thread dynaflash linked to above, and Dark_Shikari's official explanation on his blog.

*LOCKING*
Locked