Question / Help Encoding Quality - Worse than it should be?

It seems that the Encoding Quality, or maybe Image Quality, is worse than it should be.

It's far more Blurry than what's to be expected, i have compared it to worse quality and it still loses.


I use Extremely high bitrates to make it Transparent more or less, but it's Always blurry, and that's even with about 80mbit bitrate, and with that high bitrate it should be far more than enough to keep it from being that blurry, even if you use UltraFast.


I have also compared it to x264vfw, and even that beats it on the same settings by far.


I am starting to wonder if the image is blurry to begin with, perhaps OBS fails on capture or something.

If i can help with this through testing, just tell!

Thanks
 
I guess this should do, see now that 2 options fail, but they don't really matter from what i can see.


Here is an Example, may not be very easy to see, but i notice it quite a lot.

file.php
 

Attachments

  • 2014-03-05-1439-39.log
    21.2 KB · Views: 54
  • OBS - Blurry Image.png
    435.1 KB · Views: 51

Jack0r

The Helping Squad
You should probably at least offer the used encoding settings for both videos, you can extract them with Media Info.
Or if possible upload us two example videos of the exact same input for a good comparison :)
 
Sure thing

OBS:

Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=0

Other:

Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=2 / lookahead_threads=2 / sliced_threads=1 / slices=2 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=12.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00


I just deleted the original video from the screenshot so i looked at another which should have the same settings, or at least, extremely similar (I rarely change it).


As you can see, both are CRF 12, which should give it extremely much leap ahead in terms of Bitrate, so even with bad quality settings, the bitrate should easily compensate it.

The quality between "Other" and OBS looks like CRF 10 and CRF 18 or something, which is far from what i expect.
 

R1CH

Forum Admin
Developer
I don't think you can expect the same quality when important x264 quality features like cabac, good motion estimation, deblocking and sub motion estimation are disabled on OBS but not on the other encoder.

This also looks more like a colorspace issue than encoding, what are you source formats on the input and output on the other encoder? Keep in mind OBS will always output 4:2:0.
 
Very True, but the blurr is to extreme to really be an "encoding" issue, except if i had extremely high deblocking or something.

I think the same, or at least that something goes wrong with the image before reaching the actual encoder.

Source formats?

If you mean what i capture, it must be RGB32, as it's PC?

Both of them are YV12 (4:2:0), and i expect colored areas to become somewhat blurry (at least on small stuff, like lines/text).


EDIT:

It seems to only occur ingame, at least on this game (League of Legends), not Desktop Capture for example, which means it must be something wrong going on with the capture itself.
 

Jack0r

The Helping Squad
I would do the following:
remove all the crap from your custom x264 encoder settings except for crf=12
switch to ultrafast preset (for your CPU)
set your bitrate to 1000 and keep the buffer on 0

Then please do a test recording with obs again :) Oh and could you explain, how did you create the other video, recorded with what software? re-encoded with another?!
 
Done, and it still looks blurry, it must be some kind of Conversion thing, as it looks like it has been resized with Billinear or something, but i don't do anything like that, i do 1:1 capture, so that can't be it either.

The other software is Dxtory, and the Encoding is done by x264vfw (Which actually should be worse then x264 itself, as it's modified to work with .Avi, sort of a hackish way).

Also, it looks blurry on the Preview as well (1:1 of course), which also shows that it's probably some Conversion error (as i doubt the Preview shows the encoded picture).


Log:

17:39:59: =====Stream Start: 2014-03-05, 17:39:59===============================================
17:39:59: Multithreaded optimizations: On
17:39:59: Base resolution: 1920x1200
17:39:59: Output resolution: 1920x1200
17:39:59: ------------------------------------------
17:39:59: Loading up D3D10 on AMD Radeon HD 6900 Series (Adapter 1)...
17:39:59: ------------------------------------------
17:39:59: Audio Format: 48000hz
17:39:59: Playback device Default
17:39:59: ------------------------------------------
17:39:59: Using desktop audio input: Speakers (Sound Blaster ZxR)
17:39:59: ------------------------------------------
17:39:59: Using auxilary audio input: Microphone (Samson C03U )
17:39:59: ------------------------------------------
17:39:59: Audio Encoding: AAC
17:39:59: bitrate: 320
17:39:59: Using graphics capture
17:39:59: Scene buffering time set to 700
17:39:59: Using custom x264 settings: "crf=12"
17:39:59: x264: VBV maxrate specified, but no bufsize, ignored
17:39:59: ------------------------------------------
17:39:59: Video Encoding: x264
17:39:59: fps: 30
17:39:59: width: 1920, height: 1200
17:39:59: preset: ultrafast
17:39:59: profile: high
17:39:59: keyint: 250
17:39:59: CBR: no
17:39:59: CFR: yes
17:39:59: max bitrate: 1000
17:39:59: buffer size: 0
17:39:59: quality: 20
17:39:59: ------------------------------------------
17:40:00: SharedTexCapture hooked
17:40:36: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:40:36: New Scene
17:40:36: Using graphics capture
17:40:45: SharedTexCapture hooked
17:42:05: Total frames encoded: 3773, total frames duplicated: 14 (0.37%)
17:42:05: Total frames rendered: 3775, number of late frames: 2 (0.05%) (it's okay for some frames to be late)
17:42:05:
17:42:05: Profiler time results:
17:42:05:
17:42:05: ==============================================================
17:42:05: video thread frame - [100%] [avg time: 2.189 ms] [children: 5.94%] [unaccounted: 94.1%]
17:42:05: | scene->Preprocess - [1.05%] [avg time: 0.023 ms]
17:42:05: | GPU download and conversion - [4.89%] [avg time: 0.107 ms] [children: 4.39%] [unaccounted: 0.503%]
17:42:05: | | flush - [3.97%] [avg time: 0.087 ms]
17:42:05: | | CopyResource - [0.228%] [avg time: 0.005 ms]
17:42:05: | | conversion to 4:2:0 - [0.183%] [avg time: 0.004 ms]
17:42:05: Convert444Threads - [100%] [avg time: 1.079 ms] [children: 99.6%] [unaccounted: 0.371%]
17:42:05: | Convert444toNV12 - [99.6%] [avg time: 1.075 ms]
17:42:05: encoder thread frame - [100%] [avg time: 1.2 ms] [children: 3.83%] [unaccounted: 96.2%]
17:42:05: | sending stuff out - [3.83%] [avg time: 0.046 ms]
17:42:05: ==============================================================
17:42:05:
17:42:05:
17:42:05: Profiler CPU results:
17:42:05:
17:42:05: ==============================================================
17:42:05: video thread frame - [cpu time: avg 1.119 ms, total 4227.63 ms] [avg calls per frame: 1]
17:42:05: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
17:42:05: | GPU download and conversion - [cpu time: avg 0.028 ms, total 109.201 ms] [avg calls per frame: 1]
17:42:05: | | flush - [cpu time: avg 0.024 ms, total 93.601 ms] [avg calls per frame: 1]
17:42:05: | | CopyResource - [cpu time: avg 0.004 ms, total 15.6 ms] [avg calls per frame: 1]
17:42:05: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
17:42:05: Convert444Threads - [cpu time: avg 1.081 ms, total 8112.05 ms] [avg calls per frame: 2]
17:42:05: | Convert444toNV12 - [cpu time: avg 1.081 ms, total 8112.05 ms] [avg calls per frame: 2]
17:42:05: encoder thread frame - [cpu time: avg 0.964 ms, total 3619.22 ms] [avg calls per frame: 1]
17:42:05: | sending stuff out - [cpu time: avg 0.016 ms, total 62.401 ms] [avg calls per frame: 1]
17:42:05: ==============================================================
17:42:05:
17:42:05: =====Stream End: 2014-03-05, 17:42:05=================================================
17:43:56: CLR host plugin instance deleted; removing dynamically loaded localization strings
17:43:56: Memory Leaks Were Detected.
17:43:56:
 

Boildown

Active Member
The media infos you first posted don't match your recent OBS log. The first time, you ran OBS in constant quality mode (at a setting of 0, whatever that does, qp=0) instead of CRF=12, and you used Ultra Fast preset. While on the other encoder, you used Very Fast preset (or its equivalent) and actually did use CRF of 12. Not a fair comparison.

If you want a more fair test, follow this guide to configuring OBS:
http://obsproject.com/forum/viewtopic.php?f=18&t=2972

And post a new OBS log file for the same video you're comparing:
http://obsproject.com/forum/viewtopic.php?f=5&t=97

And post the Media Info information from both videos. And make the videos at least five minutes long of high action sequences (even better if they're the exact same input video). Or just upload both video files to a file sharing site somewhere.
 
I tried many settings at first, until i noticed that i could actually run in CRF mode, which i prefer.

I then changed to CRF 12.

The "Other" should also be Ultra Fast though, as Very Fast doesn't keep up with the framerate (1920x1200).
It's impossible for me to do Very Fast on that.

Here is a recording, tried to do very similar, but you can see immediately how blurry OBS is, it looks far different from the original and the other encoded.

If it's possible to do a screenshot i can do that, as i doubt it's the Encoding that's wrong.

EDIT:

Here is 2 screenshots from OBS and Original - Non is encoded or modified in anyway, just a simple screenshot.
I printed the Game, and i Printed the Preview Window of OBS (1:1 fullscreen).

file.php

file.php


Tell yourself which of them is the "blurriest";P
 

Attachments

  • OBS - CRF 12 Test.torrent
    17.6 KB · Views: 11
  • OBS(Non-Encoded) - Test LoL.png
    126.2 KB · Views: 8
  • Original - Test LoL.png
    153.4 KB · Views: 12

Lain

Forum Admin
Lain
Forum Moderator
Developer
I think I have discovered what's going on. This actually isn't blur, I'm almost totally positive now that this is a YUV color space conversion issue that gives it the appearance of being blurred, not because it actually is blurred, but because of brightness range and gamma correction.

1.) Chroma in OBS is being subsampled in center of the 4x4 block, which isn't correct/accurate, though this doesn't have a big of an effect on the image. I actually replaced the UV color channels to check to see if it was affecting it and there was almost no visible change. I'm going to have it properly sample to the left by one pixel in OBS studio, but OBS1 is stuck this way. Still, not particularly the issue, and doesn't really matter for most cases (especially not in this case)

2.) Brightness range is off, this is the primary issue almost for sure, it's affecting both the color and the sharpness of the image. I think it might also be color correction that you might have enabled on your system. OBS outputs in partial range, and I think that's affecting the output. I might have to do some more extensive tests/comparisons to see what's going on here.

I say this because colors were all slightly off as well. The colors themselves are correct, but because of the brightness issue, you immediately see a difference between the two. The colors ended up coming out a bit faded looking as well, losing some sense of vibrance. Thus because of that it seems like it's affecting the "sharpness" of the image as well. I will do some experiments on this in the future to make sure it's working correctly

So basically, it's a matter of YUV conversion at this point. I'm not the most knowledgeable when it comes to YUV <-> RGB conversion, or what x264 expects, so I'm not entirely surprised that this happened.

I could be wrong, but I'm pretty sure this is what's going on.
 

R1CH

Forum Admin
Developer
This might be a display driver issue, perhaps you have digital enhancements or output level adjustments active? The preview in OBS should be an exact match of what you see as the preview shows the scene before any chroma subsampling and encoding.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If that's the preview window you're referring to then the preview window represents your EXACT color 1:1, unmodified. OBS does NOT modify your image post-capture. It grabs the frame from the game as-is, unmodified, directly from the game's internal buffer. The exact data created by the game.

I thought we were talking about x264 encoded output? Is it the preview window, or is it the encoded output? Two completely different things.

The only possible thing it does not do is apply gamma correction you may have, which is the only thing that could possibly be going on, which would explain the color levels.
 
Okay much has been written, but i will say answer what i can, and from what i can tell, it's like this.

Window capture in OBS = Identical in the preview Window, it looks 100% the same from what i can see (haven't really done much of a test, but i am fairly sure).

In game (LoL) OBS = Blurry, Less Bright or whatever on Preview Windows, Meaning OBS is NOT capturing/showing what's actually being displayed for some reason, some modification is going on Before reaching x264.

I have No idea what, and i don't have any "enhancements" etc activated as i prefer to have "as-is" image.

I don't the Gamma Correction you are talking about, is my display/driver/windows doing some kind of correction while OBS ignores that?

Cause i can say that Dxtory captures the ingame buffer aswell, and ignores Gamma settings and everything, (so if i have very dark ingame, it won't be the same in the capture as it ignores any changes), and it looks much sharper and clearer (Or rather, identical to what i see).

Something must be going wrong somehow.


Can't someone please test with LoL?
I am not sure if it's just LoL or not though, but at least that's what's wrong for me, and should be easy to test, just set up a custom battle with bots or something.

Hope this can be solved/cured, the application is excellent:)
 

R1CH

Forum Admin
Developer
Are you sure your source is fitting the scene 100%? Right click it and make sure 'stretch to screen' is disabled in properties, then select 'Fit to scene'.
 

Joshatdot

New Member
I just tried this on my system, Local Recording (Preview only), LoL .. not sure if this helps.

Windows 7 Pro x64 SP1
Open Broadcaster Software v0.612b - 32bit

Video Encoding: x264
fps: 30
width: 1920, height: 1080
preset: veryfast
profile: main
keyint: 60
CBR: yes
CFR: no
max bitrate: 2400
buffer size: 2400

AMD Phenom(tm) II X4 925 Processor
GeForce GTS 450

Ingame Snapshot
https://dl.dropboxusercontent.com/u/475 ... Ingame.png

OBS 1:1 Preview
https://dl.dropboxusercontent.com/u/475 ... review.png
 
I am sure it's fitting the screen, i play at fullscreen and everything, and i never stretch it as i dislike such things.

Joshatdot, yours looks like what i expect, only different is some settings, and that you have 16:9 while i have 16:10 (not sure if that matters though).

EDIT:

Hmm i made have solved it, it seems to look the same now.

Not sure how though, i changed video settings to default, then back again in LoL, and now it seems to work;S
I know that i have used SweetFX before, and perhaps that was lingering around, not sure, if so, is it possible to capture that instead of the ingame buffer?

I am pretty sure that normally this isn't supported, but i doubt it's impossible. But then again, not sure how hard it is to implement such things.
 
Top