View Full Version : Fraps, h264 and YV12.
Ghostlamer
21st May 2015, 21:05
Hello, i recorded a video using fraps, then encoded in x264, checked colors through Virtual Dub, compared the original and final versions, no problems found.
But when i made screenshots through the potplayer and others(mpc hc), then i had differences in colors, but if open file through the avisynth script via Virtual Dub, the colors are the same.
Original h264 vs Potplayer captured screenshot (NV12/YV12/YUY2):
http://screenshotcomparison.com/comparison/128101
Virtual Dub via avs script vs Original h264:
http://screenshotcomparison.com/comparison/128112
Original file:
https://cloud.mail.ru/public/BEXL/iemCCG5Hw
Asmodian
21st May 2015, 21:30
BT.601 v.s. BT.709.
Please post your x264 command line and your Avisynth script. Also what options did you use when when capturing?
If you captured Fraps as RGB adding this to your Avisynth script should fix it:
ConvertToYV12(matrix="rec709")
Ghostlamer
21st May 2015, 22:04
I dont use fraps lossless RGB capture.
And ConvertToYV12(matrix="rec709"), then i add this --colorprim bt709 --transfer bt709 --colormatrix bt709 and it works with Madshi Video Renderer(potplayer) and evr custom.
http://screenshotcomparison.com/comparison/128122
Thanks.
raffriff42
22nd May 2015, 01:58
This answer may seem a little long, but believe me, it is actually way too short!
Not all video renderers honor the 709 flag by default, or don't do the right thing with it. Sad but true.
You can either flag the video properly and hope the viewer sees it correctly, or choose a selected render target (eg YouTube) and work backwards, trying to get a good result mainly on that target, "sacrificing" the others.
There are many complicating factors you have not mentioned, such as which decoder you are using (Fraps' default codec always converts YV12 to RGB, but FFmpeg-derived decoders do not),
what options you have set under Video, Color Depth, and
whether you use any Filters that force RGB<->YUV
In my tests, using MPC+MadVR, MPC+Haali and YouTube+Flash as target renderers, I have gotten good color fidelity with: source = Fraps YUV
open with default Fraps decoder (Vdub open AVI or AviSynth+AviSource)
video mode = Fast Recompress
Video Filters = none (no filters allowed in Fast Recompress)
Color Depth = (N/A in Fast Recompress)
x264vfw flags = --colorprim bt709 --transfer bt709 --colormatrix bt709There are many other ways to get an equivalent result, but this is the least complicated.
Finally, note that when previewing YUV (but not RGB) video in VirtualDub, Rec609 is assumed; Rec709 will have bright greens and dull reds. Once the video is encoded (depending on the renderer as I said) the video should be OK.
Ghostlamer
22nd May 2015, 11:17
raffriff42, thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.