Log in

View Full Version : Converting FRAPS YV12 like Handbrake?


aufkrawall
16th August 2012, 16:54
Hello,
does anybody know how Handbrake converts FRAPS YV12 to x264 I420?
It looks almost (~as good as) identical to the original:
Original:
http://www.abload.de/thumb/origfrapsyv12l0j0w.png (http://www.abload.de/image.php?img=origfrapsyv12l0j0w.png)

Handbrake crf 0:
http://www.abload.de/thumb/hbyv12f6k4y.png (http://www.abload.de/image.php?img=hbyv12f6k4y.png)

With AviSynth it always fails, there's a much bigger difference in colors:
http://www.abload.de/thumb/yv12meguip0jqp.png (http://www.abload.de/image.php?img=yv12meguip0jqp.png)

Any idea how the Avisynth script should look like?

Bloax
16th August 2012, 19:49
I can't even see a difference (in colors, the logs closer to the camera are an itsy bitsy bit less focused in the third one), and I thought I was good at this.

aufkrawall
16th August 2012, 20:35
Flowers have slight color change and overall sharpness is reduced (look at the ferns).

TheFluff
19th October 2012, 12:06
FFMS2 uses libswscale and provides functionality for converting colorspaces and resizing using it rather than with Avisynth's own resizers, if that's what you really want.

aufkrawall
19th October 2012, 12:32
Is there a good doc for converting colorspaces with SWScale?

TheFluff
19th October 2012, 13:51
Is there a good doc for converting colorspaces with SWScale?

From the FFMS2 user documentation:
SWScale
SWScale(clip, int width = -1, int height = -1, string resizer = "BICUBIC", string colorspace = "")
An image resizing and colorspace conversion filter. Does nothing special; it's almost always a better idea to just use Avisynth's builtins instead. Might potentially be useful for testing or odd experiments just because it does things in a different way from Avisynth. See the relevant arguments to FFVideoSource for details.
To spare you from having to look up the arguments to FFVideoSource:
yv12_clip.swscale(colorspace="RGB32")
will convert yv12_clip from YV12 to RGB32. Passing -1 as width or height (the defaults) will leave them as they are. swscale() without any arguments at all is just a pretty slow no-op.