OBS branch with AMD VCE support.

jackun

Developer
Hey Jackun,

I think you also develop the OpenEncodeVFW right? I have installed a generic version of VWF codec and that worked fine on Dxtory. And then installed yours but can't get Dxtory to recognize that. I am trying to compare and see if the same stutters occur on Dxtory when recording at high FPS.

KaziQ

See if it even installed. Check system32/syswow64 if there is openencodevfw.dll Other than that you installed 32 bit vc++2013 runtimes too, right?


Last week I did another test with mantle 720p@60 if i remember correctly. Plot may have too many samples. Anyway, there's this pulsing (6000x1000 PNG)
 
Last edited:

KaziQ

New Member
See if it even installed. Check system32/syswow64 if there is openencodevfw.dll Other than that you installed 32 bit vc++2013 runtimes too, right?


Last week I did another test with mantle 720p@60 if i remember correctly. Plot may have too many samples. Anyway, there's this pulsing (6000x1000 PNG)

Yep, all installed (even the VS 2013 itself) and the OPENENCODE.INF and OPENENCODEVFW.DLL are present in both folders.

KaziQ
 
Last edited:

AndersE

New Member
Does it matter how I extract the zip and how I launch it? Everything is working amazingly, good recording results and all VCE settings etc are there. Except one thing that doesn't work as normally, and that is starting/stopping recording with a hotkey. I have to click manually with the mouse now to record, and stop. Once you have unzipped you can just launch the software without any installation, using the shortcut that is brought. I tested uninstalling everything and then just unzip this version (2014-11-04 64-bit), launching as admin etc, but does not work. There is no installation guide anywhere. saying like you better uninstall your previous OBS for instance, and then launch this through the new shortcut, so I'm simply wondering if I may be doing this incorrectly somehow, to get this bug with the hotkey for start and stop recording. Anybody else experiences this bug? Did not try 32-bit or older versions..and the problem isn't as major to get me doing that.
 

jackun

Developer
..Except one thing that doesn't work as normally, and that is starting/stopping recording with a hotkey. ...

Works for me. See if vanilla OBS works. What key are you assigning? Maybe some other app or game itself is blocking/"consuming" it. Nothing special about install, just unpack and run.


@KaziQ hmm, then see if registry key(s) exist(s)
  • HKLM\SYSTEM\CurrentControlSet\Control\MediaResources\icm\VIDC.H264
  • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Drivers32, VIDC.H264
  • HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32, VIDC.H264
 
Last edited:

KaziQ

New Member
Works for me. See if vanilla OBS works. What key are you assigning? Maybe some other app or game itself is blocking/"consuming" it. Nothing special about install, just unpack and run.


@KaziQ hmm, then see if registry key(s) exist(s)
  • HKLM\SYSTEM\CurrentControlSet\Control\MediaResources\icm\VIDC.H264
  • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Drivers32, VIDC.H264
  • HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32, VIDC.H264

Checked, and they are all present. Fascinating.

KaziQ
 

sneaky4oe

Member
Need assistance.
I decided to stream with ffmpeg encoding from OBS OpenCL stream to Twitch at Windows 8.

A bat for encoding:
Code:
bin\ffmpeg -i rtmp://localhost/stream/1234 -vcodec libx264 -preset faster -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -b:v 1600k -maxrate 1600k -bufsize 3200k -s 960x540 -sws_flags lanczos -acodec copy -f flv  rtmp://live-fra.twitch.tv/app/*****************
pause
works fine, but when scenes switch in the game (fast rotations, loading screens), I sometimes get huge spikes with bitrate up to 40 mbit/s with "high encoding..." red message. There shouldn't be such huge bitrate jumps imo (and they don't happen while not encoding). Any advices?
It's really sad to see how my stream lags at both twitch and normal streaming websites sometimes.

Also, encoded stream lags as well...
 
Last edited:

tbob18

New Member
would you screenshot your settings and post logs to github via the help menu? What game are you streaming as well. The setting from all tabs I.e. And vce, encoding, video, advanced, exc

I have tried a bunch of games including 2d games which aren't demanding at all. Always 60fps, no drops. The recording always stutters at some point though, it can take as long as 30s before it stutters.

I have attached the settings I've had the best luck with (it usually taking 20-30s before it stutters at all), so far bitrate (I've only tried up to 50000kb/s) has had no discernible impact on performance.

Edit: Test Video (use in Chrome for full 60fps)
Some games have much more stutter, as this example shows. On this map my i7 maxed at 18% (16% without video capture), and GPU maxed at 65% (55% without video capture). FPS never dropped below 60 as you can see in the corner.

Edit2: Interestingly standard x264 is much smoother overall at the same bitrate.. Obviously it uses way more cpu though.

Sorry, forgot. Here is the log:
https://gist.github.com/665cbabb79e5bf4da89b
https://gist.github.com/665cbabb79e5bf4da89b
I think it has to do with duplicated frames. It does not happen at 30fps. But I always get duplicated frames at 60fps, even at 800x600 and 1000kb/s.

Edit3:
Or not.... Just recorded some and there were no duplicated frames but it still stutters quite often.
 

Attachments

  • Image1.jpg
    Image1.jpg
    61.6 KB · Views: 60
  • Image2.jpg
    Image2.jpg
    52.2 KB · Views: 54
  • Image3.jpg
    Image3.jpg
    56.1 KB · Views: 48
  • Image4.jpg
    Image4.jpg
    51.1 KB · Views: 47
  • Image5.jpg
    Image5.jpg
    84.9 KB · Views: 55
  • Image6.jpg
    Image6.jpg
    121 KB · Views: 853
Last edited:

dping

Active Member
I have tried a bunch of games including 2d games...


1080@60fps is still experimental since the encoder time is high, in your case 12ms average

Set your key interval to 2 in Advanced settings

Scene buffering time set to 5000...why 5000, set it to 400 or 700 if you are having audio video sync issues.
Using D3D10 interop...check disable DX10 interop for testing, I bet this fixes it,

Bitrate Max: 100000000...I'm guessing you have checked OpenCL for NV12 conversion, try AMF and set the AMF settings to speed at the top, this should be fine since your bitrate is high. open CL seems to spike up bitrate really high when its used (i.e. 100Mb/s in your case), usually a little over double your set bitrate at the highest
Make sure you restart OBS after you change to AMF

total frames duplicated: 840 (10.54%)
...this is fine and usually duplicates frames while on a static screen. this is fine.

dx10 uses GPU video... so might impede performance, this is from personal experience.

Enable Custom settings in VCE:

AMF settings to speed at the top

In VCE settings try setting CAVLC i.e. disable/uncheck CABAC. CABAC is usually more efficient but tends to use up more processing time.

Lastly, I have my OBS set to above normal in process priority (under advanced tab), not sure if it helps but it seems to. No worries, it doesn't use much CPU anyway, but setting this will ensure that is has the bandwidth it needs IMO
 
Last edited:

tbob18

New Member
1080@60fps is still experimental since the encoder time is high, in your case 12ms average

Set your key interval to 2 in Advanced settings

Scene buffering time set to 5000...why 5000, set it to 400 or 700 if you are having audio video sync issues.
Using D3D10 interop...check disable DX10 interop for testing, I bet this fixes it,

dx10 uses GPU video... so might impede performance, this is from personal experience.

Bitrate Max: 100000000...I'm guessing you have checked OpenCL for NV12 conversion, try AMF and set the AMF settings to speed at the top, this should be fine since your bitrate is high. open CL seems to spike up bitrate really high when its used (i.e. 100Mb/s in your case), usually a little over double your set bitrate at the highest
Make sure you restart OBS after you change to AMF

total frames duplicated: 840 (10.54%)
...this is fine and usually duplicates frames while on a static screen. this is fine.


In VCE settings try setting CABAC CAVLC i.e. disable CABAC. it is usually more efficient but tends to use up more processing time.

Lastly, I have my OBS set to above normal in process priority (under advanced tab), not sure if it helps but it seems to. No worries, it doesn't use much CPU anyway, but setting this will ensure that is has the bandwidth it needs IMO

Thanks for the tips, I was just playing around with the buffer. I set it to back.
I think you might have too many zeros there though. :)

I set it to 100,000 and your other settings and did help a bit but the recordings can still get quite choppy, it looks like how a game would look at ~35fps when it stutters for a second or so even though it never actually drops any frames in the encoder or while playing it back.

I did get AMF to work finally, it would freeze after a few seconds before. Seems to work now, it definitely did help some.
 

dping

Active Member
Thanks for the tips, I was just playing around with the buffer. I set it to back.
I think you might have too many zeros there though. :)

I set it to 100,000 and your other settings and did help a bit but the recordings can still get quite choppy, it looks like how a game would look at ~35fps when it stutters for a second or so even though it never actually drops any frames in the encoder or while playing it back.

I did get AMF to work finally, it would freeze after a few seconds before. Seems to work now, it definitely did help some.

No mang, I didn't mean set it to 100000000bits (aka 10Mb/s), I meant that what your logs were stating since using OVE with OpenCL to NV12 convert seems to raise the max bitrate no matter what you try and do. I wouldn't set it higher than 50Mb/s (aka 50,000,000bits)

You might even try and use VBR or at least turn off CBR padding since that uses up more HDD space than you need to. VBR you'll have to play with the Quality preset to make sure you get the target size.


EDIT: also use DX9 in the AMF settings, and be sure and uncheck DX10 interop
 

jackun

Developer
1080@60fps is still experimental since the encoder time is high, in your case 12ms average...

Hmm, actually if one would introduce a frame or two 'lag' to OVE too to try and spread that 12ms encode time over 2+ frames maybe random spikes have less effect. Would the math check out? :P
 

dping

Active Member
Hmm, actually if one would introduce a frame or two 'lag' to OVE too to try and spread that 12ms encode time over 2+ frames maybe random spikes have less effect. Would the math check out? :P
The average being 12ms, I could assume that some encoded frames are much higher. Are we talking about scene buffering? I dont know if buffering more frames would do that but its worth a shot. the only reason why I say that the average of the next frames would have the same 12ms per...

Maybe lowering the GOP to half or even 1/4th of the fps would help?
his GOP is currently 120, maybe to high. @tbob18, try and lower the gop to 30 (1/2 the fps).
 

jackun

Developer
x264 has some 20 frame "lag" before it starts to return any data back to OBS. I'll have to check if OVE API even allows for this. AMF seems to have some 7-10 frame input queue, but I haven't specifically checked.
 

dping

Active Member
x264 has some 20 frame "lag" before it starts to return any data back to OBS. I'll have to check if OVE API even allows for this. AMF seems to have some 7-10 frame input queue, but I haven't specifically checked.


Very interesting, I think if this works, could solve the lag spikes, bitbitrate spikes, and possibly allow us to push VCE to its max advertised bandwidth.

EDIT:

http://developer.amd.com/wordpress/media/2013/06/1007_final.pdf

does this help?
 
Last edited:

tbob18

New Member
No mang, I didn't mean set it to 100000000bits (aka 10Mb/s), I meant that what your logs were stating since using OVE with OpenCL to NV12 convert seems to raise the max bitrate no matter what you try and do. I wouldn't set it higher than 50Mb/s (aka 50,000,000bits)

You might even try and use VBR or at least turn off CBR padding since that uses up more HDD space than you need to. VBR you'll have to play with the Quality preset to make sure you get the target size.


EDIT: also use DX9 in the AMF settings, and be sure and uncheck DX10 interop

I see what you're saying. :)

VBR seems to help a bit, around 8 seems to be a good balance.

I tried DX9 and unchecking DX10 (both separately and together), it seems to make things worse..

I set the GOP to 30, now I'm getting somewhere. This helped a LOT, the stutters are much less noticable. Setting the IDR period to 0 helped a bit as well. It does still stutter, but it is much better. :)

Another thing, with CBR padding checked and a bitrate of about 40,000 or over causes the video to freeze while using AMF for me. VBR or CBR without padding works fine though, but VBR at 8 seems to stutter less and looks better than CBR in general.
 
Last edited:

dping

Active Member
I see what you're saying. :)

VBR seems to help a bit, around 8 seems to be a good balance.

I tried DX9 and unchecking DX10 (both separately and together), it seems to make things worse..

I set the GOP to 30, now I'm getting somewhere. This helped a LOT, the stutters are much less noticable. Setting the IDR period to 0 helped a bit as well. It does still stutter, but it is much better. :)

Another thing, with CBR padding checked and a bitrate of about 40,000 or over causes the video to freeze while using AMF for me. VBR or CBR without padding works fine though, but VBR at 8 seems to stutter less and looks better than CBR in general..
IDR set to 0 is the same as setting the key frames to 2 (aka 2 seconds= 120 frames), at least with the most recent build. IF you have an older build, setting it to 0 disables IDR which isn't good if you are trying to make seek points for videos, youtube or even watching local. IDR is what makes videos seekable and resets the encoding during a scene changes.
 

dping

Active Member
So something I've been testing with is AMD overdrive and OCCT (burnin tester for CPU/GPU/PSU). those two combined showed that the stock, overdrive (stock) settings were causing my video card to show errors after 30 seconds!, and also, after a short period, the video card would throttle itself to lower the power consumption. This is not ideal for gaming unless I am on a laptop and on battery power.
I checked enable overdrive, underclocked my GPU from 1100MHz to 1000MHz and all the sudden I'm stable, no errors for hours! Second, I did notice that overtime, as my GPU got warm even underclocked, my FPS would go down from 150fps slowly stepping down to 120fps. after some research, I realized that the video card will never get to its full wattage use when the power slider is set to 0%. I checked online and EVERYONE recommended that you can SAFELY set the slider to 20% since this is just allowing the video cards to use what wattage is needs. After that, a steady 150fps.

TL;DR I say all that to us having random issues with studdering, driver crashing, and general bad performance over time along with other issues. I will attach screen shots here shortly to show what I did and the results.

Stay tuned
Before tweaking:
JEA4403.jpg


After Tweaking:
U4vhePX.jpg
 
Last edited:

tbob18

New Member
So something I've been testing with is AMD overdrive and OCCT (burnin tester for CPU/GPU/PSU). those two combined showed that the stock, overdrive (stock) settings were causing my video card to show errors after 30 seconds!, and also, after a short period, the video card would throttle itself to lower the power consumption. This is not ideal for gaming unless I am on a laptop and on battery power.
I checked enable overdrive, underclocked my GPU from 1100MHz to 1000MHz and all the sudden I'm stable, no errors for hours! Second, I did notice that overtime, as my GPU got warm even underclocked, my FPS would go down from 150fps slowly stepping down to 120fps. after some research, I realized that the video card will never get to its full wattage use when the power slider is set to 0%. I checked online and EVERYONE recommended that you can SAFELY set the slider to 20% since this is just allowing the video cards to use what wattage is needs. After that, a steady 150fps.

TL;DR I say all that to us having random issues with studdering, driver crashing, and general bad performance over time along with other issues. I will attach screen shots here shortly to show what I did and the results.

Stay tuned
Before tweaking:
JEA4403.jpg


After Tweaking:
U4vhePX.jpg
Interesting find. I don't seem to have any errors with OCCT, temps max out around 65c on the GPU. I get about 123-124fps at those settings, it never drops below 123fps. I let it run for about 20min without any errors.

I tried +20% but I didn't see any difference, also tried -20% but again, no difference, same fps,, no errors and GPU stays at 65c. I also tried OBS with +20% and -20% and didn't notice any difference (still stutters).

Probably a YMMV kind of thing, worth a try though.

Edit: Now here is something interesting.. I closed Firefox and tried again, now with it at 0% it sticks around 115-117fps.. If I set it to 20% it will go back up to 123-124fps. If I open Firefox up again, then it can be at 0% and OCCT runs at full speed.

Quite strange. I will go ahead and leave it at 20%.

Edit2:
I did get VCE to work at 1080p 80fps properly, now the preview looks perfectly smooth, however, when I play it back it skips frames all over the place.. Probably due to vsync.
 
Last edited:

dping

Active Member
Interesting find. I don't seem to have any errors with OCCT, temps max out around 65c on the GPU. I get about 123-124fps at those settings, it never drops below 123fps. I let it run for about 20min without any errors.

I tried +20% but I didn't see any difference, also tried -20% but again, no difference, same fps,, no errors and GPU stays at 65c. I also tried OBS with +20% and -20% and didn't notice any difference (still stutters).

Probably a YMMV kind of thing, worth a try though.

Edit: Now here is something interesting.. I closed Firefox and tried again, now with it at 0% it sticks around 115-117fps.. If I set it to 20% it will go back up to 123-124fps. If I open Firefox up again, then it can be at 0% and OCCT runs at full speed.

Quite strange. I will go ahead and leave it at 20%.

Edit2:
I did get VCE to work at 1080p 80fps properly, now the preview looks perfectly smooth, however, when I play it back it skips frames all over the place.. Probably due to vsync.

No need to use preview inmy opinion, just check your video output after record

vsync is useless for actual gaming (aside from removing screen tearing), unless you like having input lag in most games. I would disable it since the capture method has nothing to do with your in game fps; it will pick the samples it needs from the game/window.

Anyway, how does 1080@60fps look from your video? can you provide samples on youtube? also, just curious, what card are you using?
 
Top