OBS branch with AMD VCE support.

dping

Active Member
Think this would be easier for you sir :)!

post.png
your GOP needs to be either 30, 60 or 120 (with 60fps) preferably 60 or 120, check this after changing to ensure that the higher GOP doesn't affect the stream

Try disable D3D interop and change AMF engine type to "host" and check the stats again.
 
Here's a quick test: Google drive (download the videos, don't use the embedded viewer)

I wasn't entirely thinking, so I forgot to change the resolution down when recording the source, but it's letterboxed so cropping down to 1080p for VCE1/2 tests shouldn't be a very major issue.

The screenshots are from frame 350, and the VCE ones look fairly bad (possibly because of differences in keyframe placement as I didn't give any settings for that) -- in motion it seems fairly good, clearly better than ultrafast, possibly a little worse than superfast.

A bit confused as the "lossless" looks crap as well, are google drive doing some re-encoding?

As for the snapshots, damn the difference is huge.
If possible try do something like "CRF" (if VCE has something similar), that gives both a similar bitrate.
Usually that gives much higher quality than setting a bitrate in one pass.

EDIT: Forget that, didn't notice the Lossless clip was from youtube, the snapshot was fine;P

EDIT2: noticed that x264 isn't rly 60fps, this makes the test a bit unfair as it will save bitrate when it has to duplicate frames.

i think 30fps would be better for both, so they get 100% of the frames.

(I must save even though i think VCE looks crap compared to x264 in these tests at least, it looks quite fluid in motion anyhow:))

EDIT 3: Which GPU was this test made on? (285?)
 
Last edited:

Kobata

Member
A bit confused as the "lossless" looks crap as well, are google drive doing some re-encoding?

That's why I said to actually download them, I didn't expect google to throw up a youtube player while uploading there. When the player's open, there should be a download button at the top. Since the originals are 1920x1200, they're probably all re-encoded as the player isn't offering anything above 1080p

As for the snapshots, damn the difference is huge.
If possible try do something like "CRF" (if VCE has something similar), that gives both a similar bitrate.
Usually that gives much higher quality than setting a bitrate in one pass.

The encoder program I was using for VCE only offers CBR/VBR/constrained qp (latency constrained vbr is supported by the hardware, but I'd need to find a different frontend to use that). I'm not sure exactly what x264's --crf does, but it is a separate option there from --qp.

EDIT2: noticed that x264 isn't rly 60fps, this makes the test a bit unfair as it will save bitrate when it has to duplicate frames.

i think 30fps would be better for both, so they get 100% of the frames.
All the encodes come from the same source file, which should be 60 fps, if it isn't, that's just because the uncompressed source recording had issues keeping up (It's nearly 2GB for 9 seconds, although I was writing it to an SSD)

EDIT 3: Which GPU was this test made on? (285?)
Yes, an R9 285 -- which should be somewhat obvious as it's the only one that can handle anything above 1920x1080 in encode.
 
Last edited:
That's why I said to actually download them, I didn't expect google to throw up a youtube player while uploading there. When the player's open, there should be a download button at the top. Since the originals are 1920x1200, they're probably all re-encoded as the player isn't offering anything above 1080p

Yeah noticed the Youtube thing after i wrote that and downloaded and looked for myself.

The encoder program I was using for VCE only offers CBR/VBR/constrained qp (latency constrained vbr is supported by the hardware, but I'd need to find a different frontend to use that). I'm not sure exactly what x264's --crf does, but it is a separate option there from --qp.

Hmm okay, well if you don't have sometihng similar to CRF/QP in itself currently, those tests will indeed have to do:)

All the encodes come from the same source file, which should be 60 fps, if it isn't, that's just because the uncompressed source recording had issues keeping up (It's nearly 2GB for 9 seconds, although I was writing it to an SSD)

Wait, you had an uncompressed source which you played while encoding to x264/AMD VCE?
If so, are you sure x264 actually is able to handle encoding 60 fps at that resolution? (i can't do 60fps, but then again a bit of an old system).
Cause x264 had more duplicated frames (i think?) compared to AMD VCE.


Yes, an R9 285 -- which should be somewhat obvious as it's the only one that can handle anything above 1920x1080 in encode.
Ah my bad, i do know that 285 is supposely much faster and supports 1080p+ resolutions. (You got any idea is Quality is better, or is it just speed?).

But can Encode at above 1080p with VCE, without the scale down?
I didn't get if the encodings you did was scaled down cause of OBS itself or something else.

Cause i know that VCE was limited to 1080p before (as all hardware were locked at that except 285).

Hope i got all this right;P
 

Kobata

Member
Wait, you had an uncompressed source which you played while encoding to x264/AMD VCE?
If so, are you sure x264 actually is able to handle encoding 60 fps at that resolution? (i can't do 60fps, but then again a bit of an old system).
Cause x264 had more duplicated frames (i think?) compared to AMD VCE.
I did all the encodes separately, using settings as close to what OBS would most likely use as I could (x264 in onepass mode, VCE in low latency) -- for tests like this OBS itself isn't amazingly good. (And OBS-VCE likes to freeze the graphics drivers unless I have it in very specific settings, for some reason -- the separate VCE encoder worked fine though)

The x264 encodes were slower than realtime, around 15-30fps depending on the preset.
 

dping

Active Member
I did all the encodes separately, using settings as close to what OBS would most likely use as I could (x264 in onepass mode, VCE in low latency) -- for tests like this OBS itself isn't amazingly good. (And OBS-VCE likes to freeze the graphics drivers unless I have it in very specific settings, for some reason -- the separate VCE encoder worked fine though)

The x264 encodes were slower than realtime, around 15-30fps depending on the preset.
fyi, low latency drops settings way down, 1 reference frame, etc.
 
I did all the encodes separately, using settings as close to what OBS would most likely use as I could (x264 in onepass mode, VCE in low latency) -- for tests like this OBS itself isn't amazingly good. (And OBS-VCE likes to freeze the graphics drivers unless I have it in very specific settings, for some reason -- the separate VCE encoder worked fine though)

The x264 encodes were slower than realtime, around 15-30fps depending on the preset.

Hmm, then x264 is unfair in this test.
If possible try do similar encoding but with 30fps.

Scary that your Driver freezes, but damn have i been there.
OpenCL for me some years ago liked to totally freeze my card so was so afraid of it;P
(Was on Dolphin Emulator). Hope it's solvable through drivers.
285 has had a lot of issues so wouldn't surprise me if they just messed tihngs up (We all know how AMD is about their drivers;P).

Much appreciated for taking your time.
 

khades

Member
Here's a quick test: Google drive (download the videos, don't use the embedded viewer)

I wasn't entirely thinking, so I forgot to change the resolution down when recording the source, but it's letterboxed so cropping down to 1080p for VCE1/2 tests shouldn't be a very major issue.

The screenshots are from frame 350, and the VCE ones look fairly bad (possibly because of differences in keyframe placement as I didn't give any settings for that) -- in motion it seems fairly good, clearly better than ultrafast, possibly a little worse than superfast.

can you make the same thing for low bitrates, 2kbit\s for 720p30fps and 3.5kbit\s for 1080p 30fps?
 

Kobata

Member
can you make the same thing for low bitrates, 2kbit\s for 720p30fps and 3.5kbit\s for 1080p 30fps?
I figured out how to do this somewhat better/easier (and switched to using one of the AMF sample encoders for better control options), so sure -- added two new folders with down-fps/cropped to 16:9 (and scaled for 720p) along with text files for the encode fps and the AMF options set.

I'm pretty sure the encoder I was using for the first test VCE versions was basically ignoring half the settings I gave it entirely, anyway.
 
i apologize i feel like i don't belong here intruding on your hard work, but i love your hard work and am trying to use it.. so i am wondering how exactly i download this software. ive never used github before but i downloaded, made an account and all that jazz and synced the project, but i dont know how to, or even if you can run the software from github, any help would be appreciated, and again im sorry for taking up your time.

Turtle
 

dping

Active Member
i apologize i feel like i don't belong here intruding on your hard work, but i love your hard work and am trying to use it.. so i am wondering how exactly i download this software. ive never used github before but i downloaded, made an account and all that jazz and synced the project, but i dont know how to, or even if you can run the software from github, any help would be appreciated, and again im sorry for taking up your time.

Turtle
you dont need github directly, that is just where the raw project is in this case. jackun has compiled version organized by newest build and bitness (32bit/64bit), the second thing you'll need is MS VC++ 2013 runtimes. download AND install based on what version of OBS you are using. if you are usings 32bit because of other plugins, then install the VC++ 32bit, etc. I typically just install both.

the last thing you'll need is 7zip to extract the installation. extract the OBS release with 7zip and pur it somewhere (I use my desktop) but you can just as easily just make a folder on the c drive. once its there, either run it from that location or make a shortcut on the desktop.
 
I figured out how to do this somewhat better/easier (and switched to using one of the AMF sample encoders for better control options), so sure -- added two new folders with down-fps/cropped to 16:9 (and scaled for 720p) along with text files for the encode fps and the AMF options set.

I'm pretty sure the encoder I was using for the first test VCE versions was basically ignoring half the settings I gave it entirely, anyway.

Interesting results now.
1080p looks like a total mess for both, hard to say which one is better as the Codec itself just don't have enough bits to play around with.
At 720p i must say that VCE looks better than superfast (looking at snapshots here).
There are some differences, but i think the overall quality is better in VCE.

And this is also with no B-Frames which generally should increase quality as well (not sure how much though).

I asked before but are you able to do encodings above 1080p, or is the Software locked to it?

EDIT:

Okay in motion VCE really drops quality:S
 

Kobata

Member
Interesting results now.
And this is also with no B-Frames which generally should increase quality as well (not sure how much though).

I asked before but are you able to do encodings above 1080p, or is the Software locked to it?

B-frames should give better quality at the same bitrate, but like many things how much of a difference it makes will depend on how good the encoder is at making decisions. For what it's worth, x264 has them enabled by default on every preset but ultrafast (superfast uses up to 3, which is the maximum that VCE can do if it wasn't freezing for me).

Most of the easily available software for game capture using VCE currently assumes the maximum is 1920x1080 -- The gaming evolved app, MSI afterburner, and OBS-VCE will prevent going above that, instead of checking what the hardware maximum is. It should be possible to edit the OBS code to use that info, if I knew where the check was though. (It's 4096x2160 aka 4k for the 285/VCE3).
 
B-frames should give better quality at the same bitrate, but like many things how much of a difference it makes will depend on how good the encoder is at making decisions. For what it's worth, x264 has them enabled by default on every preset but ultrafast (superfast uses up to 3, which is the maximum that VCE can do if it wasn't freezing for me).

Most of the easily available software for game capture using VCE currently assumes the maximum is 1920x1080 -- The gaming evolved app, MSI afterburner, and OBS-VCE will prevent going above that, instead of checking what the hardware maximum is. It should be possible to edit the OBS code to use that info, if I knew where the check was though. (It's 4096x2160 aka 4k for the 285/VCE3).

Yeah really frustrating that you can't use it, but it will hopefully work with driver/software updates.

As i guessed, damn limit. Though i was afraid it was limited in the Encoder itself (some hard-locked code by AMD).
Really weird limit though, i mean why do they use a "dummy limit".

Does jackun know of anything?

EDIT:

Perhaps you can hardcode your resolution (just as a test).
Not sure where the resolution is set though, as i am guessing it's taken from OBS to the VCE.

mConfigCtrl.width = mWidth;
mConfigCtrl.height = mHeight;

Perhaps this?
But i guess it depends also if the where it does the check if it's above 1080p or not.
 
Last edited:

Kobata

Member
Yeah really frustrating that you can't use it, but it will hopefully work with driver/software updates.

As i guessed, damn limit. Though i was afraid it was limited in the Encoder itself (some hard-locked code by AMD).
Really weird limit though, i mean why do they use a "dummy limit".

Does jackun know of anything?

I figured out where it was and hacked together a PR for using the AMF claimed limits. (It's not the best way, but it works... well enough mostly.)
 

khades

Member
So you say you cant use bframes now?For a b-frames-less quality is nice, if b-frames would be enabled semistatic part at start would be much more detalised.

I think i would encode file with haswell quicksync for the same low-bitrate settings
 
I figured out where it was and hacked together a PR for using the AMF claimed limits. (It's not the best way, but it works... well enough mostly.)

Holy, that wasn't a bit of code you added, couldn't figure out any of that.
Do you have the ability to push higher quality (i saw something about 285 using higher profile in h264).
Or perhaps that's just with bitrate (no real clue what all that, 3.1, 5.1 profiles mean;P).

Can you try a recording with 1920x1200 as that seems to be your native resolution (as is mine)?
 

khades

Member
I figured out how to do this somewhat better/easier (and switched to using one of the AMF sample encoders for better control options), so sure -- added two new folders with down-fps/cropped to 16:9 (and scaled for 720p) along with text files for the encode fps and the AMF options set.

I'm pretty sure the encoder I was using for the first test VCE versions was basically ignoring half the settings I gave it entirely, anyway.
What encoder software did you used? handbrake seem to ignore my quicksync settings
 

Kobata

Member
Holy, that wasn't a bit of code you added, couldn't figure out any of that.
Do you have the ability to push higher quality (i saw something about 285 using higher profile in h264).
Or perhaps that's just with bitrate (no real clue what all that, 3.1, 5.1 profiles mean;P).

Can you try a recording with 1920x1200 as that seems to be your native resolution (as is mine)?
Levels are more about resolution & framerate than quality (although they also have a specified max bitrate) -- OBS has been setting it to 4.1 which is supposed to max at 720p60/1080p30. My 285 needs to have it set to 5.0 at least for 1920x1200, since before messing with that part it'd just cause a vague error. (Added: From looking at a few of the older logs here, it seems like even older ones allow higher levels -- it probably just doesn't do much other than maybe basic resolution checking, since 1080p60 should require 4.2, but OBS has always been setting it to 4.1.)

What encoder software did you used? handbrake seem to ignore my quicksync settings
I'm not really sure what works well with quicksync, since I have an older i7 before that was added. VCE on the new ones was done with a slightly modified version of an AMD sample. x264 was just done with command-line, since the VCE sample needed to have raw video input anyway.
 
Last edited:
Top