OBS branch with AMD VCE support.

dping

Active Member
anyone figured out the settings so that the bitrate doesn't spike? It sometimes spikes to 10k-20k.


I think one guy suggested using a lower speed/quality%, but that only mitigates the spikes. I think the spikes are the reason why I am having stutter and quality (blockiness) problems on my online stream. Because local files don't care about bitrate spikes as much.

To answer your question it is because "fixed quantizer values" that is uses Current formula is 40 - (quality * 5) / 2 so, no, its not fixed.
 

RifleEyez

Member
Its funny, I was watching my RAM usage while recording both MFT and OpenCL during my tests above and it never went above 250MB in RAM. but then again, I was testing/recording at 720p at 30/48/60fps not 1080p@60fps where the memory issues are. If you are recording for youtube, then keep it at 1080p@30fps with 08-10 or 7-20 and you should be fine.

^ this is from my understanding, and I wasn't exactly something I was testing, but my local recordings looked great at 720p@ 48 or 60fps. EDIT: I would say I had very little to no blockage on my local recordings. I will upload for contrast to my streamed recordings when get a chance. my wife has been quite angry with me and all the time I've spent testing on this.


I was recording on 64bit Version 0.63b (the 8/10 one IIRC) @ 30 FPS, 1080p using MFT with a high quality VCE settings I copied that either jackun or another user suggested (as I only local record so bitrate/hdd space doesn't matter) and within 21 minutes of recording my OBS was using 3,500,000k. That's double what my game was using. Any ideas? I have 16gb of RAM, so I'm not sure if this particularly matters - but I'm presuming it will keep rising? Any ideas why or what I can change?

Any again, any ideas on the best settings for local recording if bitrate/file size isn't an issue? Does disabling custom VCE settings also disable the Quality Vs Speed/Max Ref Frames and CABAC portion, or just the top half? Does low latency mode make a difference? As you can tell - total noob :)

Thanks!
 
Last edited:

dping

Active Member
I was recording on 64bit Version 0.63b (the 8/10 one IIRC) @ 30 FPS, 1080p using MFT with a high quality VCE settings I copied that either jackun or another user suggested (as I only local record so bitrate/hdd space doesn't matter) and within 21 minutes of recording my OBS was using 3,500,000k. That's double what my game was using. Any ideas? I have 16gb of RAM, so I'm not sure if this particularly matters - but I'm presuming it will keep rising? Any ideas why or what I can change?

Any again, any ideas on the best settings for local recording if bitrate/file size isn't an issue? Does disabling custom VCE settings also disable the Quality Vs Speed/Max Ref Frames and CABAC portion, or just the top half? Does low latency mode make a difference? As you can tell - total noob :)

Thanks!
Sorry, I didn't record for as long as you did, but I will watch it next time. Just for reference, what bitrate are you using and what is the bitrate show in the OBS window say after 21 minutes of recording? I cant answer but hopefully someone can :D

EDIT:Really my only thought is that maybe after 21 minutes the RAM is filling with a buffer of video that is waiting to be written to the HDD. this is just a wild guess though
 

Scyna

New Member
i guess I'll wait until the bitrate problem is fixed and more info on the custom settings is release to continue testing.
 

jackun

Developer
Does disabling custom VCE settings also disable the Quality Vs Speed/Max Ref Frames and CABAC portion, or just the top half? Does low latency mode make a difference? As you can tell - total noob :)

Thanks!

Yes, all of it. Only OCL device index is still used.

Something is leaking in MFT :S
 

jackun

Developer
i guess I'll wait until the bitrate problem is fixed and more info on the custom settings is release to continue testing.

It should be the the leaky bucket buffering method.

And from this:

The bit rate for any stream encoded by one of the Windows Media Audio and Video codecs is not constant. Constant bit rate (CBR) encoding is, therefore, a somewhat misleading term. The distinguishing feature of a CBR-encoded stream is a small buffer window, which limits the variation of sample sizes.

Talks about WMA and WMV codecs, but probably is appropriate for MFT H264 encoders too.
So maybe if messing with buffer sizes, MFT might be able to reduce peaks. But OVE probably not because AMD driver keeps overridding buffer values.
 

Fawkes

Member
hey guys to make some things clear for you i have put some time into testing:

OpenCL
  • 720p 60fps
  • 720p 30fps
  • 1080p 60fps
  • 1080p 30fps
MFT
  • 720p 60fps
  • 720p 30fps
  • 1080p 30fps
and all the settings are in the file.
to check the results download this zip
https://drive.google.com/file/d/0B-YSW6I2t0y3aEpJWjlnS2RvcWs/edit?usp=sharing
everything is in there.

let me know if you find it usefull or if i did all this for nothing..
i use 7850 @ 1000/1250MHz and a q6600 @3.4ghz
 

dping

Active Member
Yes, all of it. Only OCL device index is still used.

Something is leaking in MFT :S

Changing the IDR period from 1 to any divisor of the FPS affects OCL's quality even with custom settings unchecked.


I played with every almost every settings for almost 4 hours last night and finally decided to go back to MFT since I could fine tune the quality and adjust the huge window that VCE calls CBR. :)

In my testing, a 3000 Kbit stream could get as high as 9000 Kbit instead of adjusting the quality down during dramatic scene changes. It seems IDR is one of the key factors in that, but its pretty close to a light switch when it comes to sticking to the bitrate. It either stick to the bitrate and looks crappy all around or it looks flawless and bitrate is through the roof :/ Where's the middle ground?

I played with Max reference frames for a while, but honestly settled back to the default of 3 (1-4 was range I played with).

Playing with quality/speed was interesting, but in the end, I couldn't figure out how it was trading Q vs S.
With MFT the quality/speed, could you go into more details on what that adjusts?

EDIT: is this: http://slhck.info/articles/crf article valid in what you are using in a sense?
 
Last edited:

dping

Active Member
hello to all, what are the best settings for the custom VCE settings so i can get best quallity in stream at 720p i play bf4 in 720p with 10000 upload and streaming on twitch.tv http://www.twitch.tv/kockisch_gaming

I wouldn't use more than 3200bitrate/buffer, use OpenCL (framerate must be 30 or 60fps), dont set reference frames higher than 5. when I tested this yesterday, with a custom unchecked I used IDR period of 30 and reference frame of 3-4. during motion, the higest bitrate was still around 9000k at max. so that is what I would choose. The only reason it was a problem for me, is my upload is only 6200k so yeah, it looked great for me until I started dropping frames cuz my upload sucks :)
 

dping

Active Member
I was recording on 64bit Version 0.63b (the 8/10 one IIRC) @ 30 FPS, 1080p using MFT with a high quality VCE settings I copied that either jackun or another user suggested (as I only local record so bitrate/hdd space doesn't matter) and within 21 minutes of recording my OBS was using 3,500,000k. That's double what my game was using. Any ideas? I have 16gb of RAM, so I'm not sure if this particularly matters - but I'm presuming it will keep rising? Any ideas why or what I can change?

Any again, any ideas on the best settings for local recording if bitrate/file size isn't an issue? Does disabling custom VCE settings also disable the Quality Vs Speed/Max Ref Frames and CABAC portion, or just the top half? Does low latency mode make a difference? As you can tell - total noob :)

Thanks!


BTW, Jackun is definitely working on a fix for the ram filling issue.

https://github.com/jackun/OBS/commit/6bf971b84af333fd2d3e57cb7f393b817ca66f01

I don't want to spy to much, but I'm excited to read the code about what is changing/fixes.
 

dping

Active Member
@jackun I had some suggestions for you, but understand that I am still learning about VCE, x264 and encoding A/V

Suggestions:
1. could be have a default button in the VCE window that would revert changes?
2. maybe as we get past the beta, could you grey out the boxes on VCE that are disabled when custom is unchecked
3.maybe add in a bin-to-hex calc in the bottom right for disabling different prediction modes - i'm interested in playing with these but I'm really lazy to do conversions between tests.
suggestions https://github.com/obstschale/NSC
4. OBS monitors CPU usage when its to high, could we get a usage monitor of the VCE decoder to know when we've maxed it out?


Questions:
Is there a reason max reference frames are maxed out @ 5 when using OCL? shouldn't it be 16 like in MFT?
 

OliverMD

Member
Suggestions:
2. maybe as we get past the beta, could you grey out the boxes on VCE that are disabled when custom is unchecked
4. OBS monitors CPU usage when its to high, could we get a usage monitor of the VCE decoder to know when we've maxed it out?
Is there a reason max reference frames are maxed out @ 5 when using OCL? shouldn't it be 16 like in MFT?
Yes please add that. I would expect in the Final version (when it gets added to the main branch) the VCE Custom settings will be gone and replaced by presets like with Quick Sync and Nvidia NVENC for easy use anyway.

Might be an issue regarding of how OCL works, might not be able to do more than 5 ref frames. I read that everything above 3-5 is "stupid" anyway but who knows.
 

sneaky4oe

Member
  • Wait you could record 1080p@60FPS with OpenCL? I thought CL wasn't able to record 60fps at 1080p for some reason but MFT was if you turn down quality under 50.
I tested your settings for MFT, and found them bugging the same test in CS Source on my videocard.


This is recorded with LiveGamerHD, so you see exactly what I saw (but with 2x lesser FPS). Those bugs are not visible at stream for me (or I didn't notice them because of lags at my stream).

check out:
texture bugs at 0:17
bugs at water wall 0:28
It's smoothness is lesser that with OpenCL.

With OpenCL there're no such bugs, overall smoothness is awesome, but the video quality is worse.
HD7870
 
Last edited:

jackun

Developer
check out:
texture bugs at 0:17
bugs at water wall 0:28
It's smoothness is lesser that with OpenCL.

Ugh, i think OBS was reusing the same buffer for 2+ frames simultaneously with MFT, oops. Should fixed in this build. Also added some OpenCL warmup routine to OVE version. Shouldn't show the 'high CPU usage' message now when just starting to capture.

Test build of test build of test build....
E: Eh, fixed QP doesn't want to give PPS NAL after warmup -> crash.

But still, encode time at 1080p@60 is cutting so close to 16.(6) ms that OBS sometimes skips few frames, MFT especially, durr.
 
Last edited:

jackun

Developer
Suggestions:
1. could be have a default button in the VCE window that would revert changes?
2. maybe as we get past the beta, could you grey out the boxes on VCE that are disabled when custom is unchecked
3.maybe add in a bin-to-hex calc in the bottom right for disabling different prediction modes - i'm interested in playing with these but I'm really lazy to do conversions between tests.
suggestions https://github.com/obstschale/NSC
4. OBS monitors CPU usage when its to high, could we get a usage monitor of the VCE decoder to know when we've maxed it out?

Is there a reason max reference frames are maxed out @ 5 when using OCL? shouldn't it be 16 like in MFT?
Dunno, i can't even set it over 4 with MFT and Cat 14.4.

1. yes, next build probably,
2. I think most controls are covered now
3. calc.exe hehe. Also, bin-to-dec.
4. hmm, don't know.

Playing with quality/speed was interesting, but in the end, I couldn't figure out how it was trading Q vs S.
With MFT the quality/speed, could you go into more details on what that adjusts?

EDIT: is this: http://slhck.info/articles/crf article valid in what you are using in a sense?

No, it is this. Pretty much a "black box", only AMD knows what it does (or could decompile some DLLs, but even then...)
 
Last edited:
Top