OBS branch with AMD VCE support.

jackun

Developer
Is it possible to have the VCE use the APU instead of the GPU? It kind of makes my APU's VCE useless since my card is VCE unsupported.
My card is a R7 240 and my APU is a A10-58k

I tried it before with my APU only and it works fine but now with the GPU on, it can't.
Oh, yeah, I should add a device list. But it should use the first VCE supported device anyway, so it doesn't, hm?
 

icycrash

New Member
Oh, yeah, I should add a device list. But it should use the first VCE supported device anyway, so it doesn't, hm?
DXtory has the option to witch device to use VCE on and with my 5800k it crashes when i'm using my 260x to render the game.
 

jackun

Developer
@Wishdream ,@icycrash
Try these then: obsvce_2014-07-23_devidx 32bit, 64bit.

There is "Device index" box in "VCE Settings". Check the log which device is selected with what index. If it crashes trying to get device's name, add "LogUsedDev=0" under "VCE Settings" to your profile ini (OpenCL calls should return error codes, but sometimes they crash instead :( ).
 

jackun

Developer
DXtory has the option to witch device to use VCE on and with my 5800k it crashes when i'm using my 260x to render the game.

Currently OVE/OpenCL context and memory buffers should be created on the device with VCE as same device id is used for both. But otherwise it could maybe crash if GPU has the buffers and APU's VCE tries to access them or vice versa. Have to check, maybe OCL allows buffers to be passed around devices.
 

icycrash

New Member
Currently OVE/OpenCL context and memory buffers should be created on the device with VCE as same device id is used for both. But otherwise it could maybe crash if GPU has the buffers and APU's VCE tries to access them or vice versa. Have to check, maybe OCL allows buffers to be passed around devices.
I didn't mess with it much because I didn't see a noticeable performance hit using my 260x
 

Corinarh

New Member
Is it normal i'm getting 20-25 fps drop while i'm using obs with ace??? i have more fps on x264 than vce which is strange... amd gaming evolve just lower my fps by 0-4 however game dvr can't keep smooth 60fps

can you put there your obs settings? should i record/stream by using game capture or just window?

i have 7850 2gb asus @1050mhzCore
 
Last edited:

jackun

Developer
Is it normal i'm getting 20-25 fps drop while i'm using obs with ace??? i have more fps on x264 than vce which is strange... amd gaming evolve just lower my fps by 0-4 however game dvr can't keep smooth 60fps

can you put there your obs settings? should i record/stream by using game capture or just window?

i have 7850 2gb asus @1050mhzCore

20-25fps doesn't say much as going from 200 to 180 fps is just 0.555ms and 60 to 30fps is 16ms. So if you have OpenCL colorspace conversion enabled, look at the log (file) to see how long it spends time there.

But i'd have to check if OBS even blocks the game from rendering while it is processing the frame from 'game capture'.
 

Corinarh

New Member
20-25fps doesn't say much as going from 200 to 180 fps is just 0.555ms and 60 to 30fps is 16ms. So if you have OpenCL colorspace conversion enabled, look at the log (file) to see how long it spends time there.

But i'd have to check if OBS even blocks the game from rendering while it is processing the frame from 'game capture'.

however 20-30 fps says much if you are playing at 70-80 fps and you are getting close to 60 fps or if it sometimes drop to 40sec for half a sec or constantly lowering my fps to 40

my last log when i was recording borderlands 2 (i was using vce mft instead OpenCL i'll check opencl soon)

Code:
13:19:06: No Intel graphics adapter visible in QSVHelper.exe, Optimus problem?
13:19:06: Failed loading CUDA dll
13:19:06: VCE encoding with MFT.
13:21:04: Open Broadcaster Software v0.625b - 64bit ( ^ω^)
13:21:04: -------------------------------
13:21:04: CPU Name: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
13:21:04: CPU Speed: 3300MHz
13:21:04: Physical Memory: 8153MB Total, 3756MB Free
13:21:04: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
13:21:04: monitor 1: pos={0, 0}, size={1920, 1080}
13:21:04: Windows Version: 6.2 Build 9200
13:21:04: Aero is Enabled
13:21:04: -------------------------------
13:21:04: OBS Modules:
13:21:04: Base Address Module
13:21:04: 0000000015500000 OBS.exe
13:21:04: 0000000038AF0000 OBSApi.dll
13:21:04: 0000000039820000 DShowPlugin.dll
13:21:04: 000000003DD90000 GraphicsCapture.dll
13:21:04: 000000003ABB0000 NoiseGate.dll
13:21:04: 00000000398C0000 PSVPlugin.dll
13:21:04: ------------------------------------------
13:21:04: Adapter 1
13:21:04: Video Adapter: AMD Radeon HD 7800 Series
13:21:04: Video Adapter Dedicated Video Memory: 2128781312
13:21:04: Video Adapter Shared System Memory: 4026531840
13:21:04: Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
13:21:04: =====Stream Start: 2014-07-23, 13:21:04===============================================
13:21:04: Multithreaded optimizations: On
13:21:04: Base resolution: 1920x1080
13:21:04: Output resolution: 1920x1080
13:21:04: ------------------------------------------
13:21:04: Loading up D3D10 on AMD Radeon HD 7800 Series (Adapter 1)...
13:21:05: ------------------------------------------
13:21:05: Audio Format: 48000 Hz
13:21:05: ------------------------------------------
13:21:05: Audio Channels: 2 Ch
13:21:05: Playback device {0.0.0.00000000}.{4cb460ec-94fd-4f2d-924a-bfcfe9ba6e3e}
13:21:05: ------------------------------------------
13:21:05: Using desktop audio input: Speakers (Realtek High Definition Audio)
13:21:05: Global Audio time adjust: 0
13:21:05: ------------------------------------------
13:21:05: Using auxilary audio input: Microphone (Realtek High Definition Audio)
13:21:05: Mic time offset: 0
13:21:05: ------------------------------------------
13:21:05: Audio Encoding: AAC
13:21:05: bitrate: 128
13:21:05: Using graphics capture
13:21:05: Trying to hook process: Borderlands2.exe
13:21:05: Scene buffering time set to 700
13:21:05: VCE encoding with MFT.
13:21:05: Selected AMD HW Encoder to encode the stream
13:21:05: SharedTexCapture hooked
13:25:39: Capture window 0x002805CC invalid or changing, terminating capture
13:25:40: Total frames encoded: 16453, total frames duplicated: 727 (4.42%)
13:25:40: Number of frames skipped due to encoder lag: 10 (0.06%)
13:25:40: Total frames rendered: 16316, number of late frames: 113 (0.69%) (it's okay for some frames to be late)
13:25:40:
13:25:40: Profiler time results:
13:25:40:
13:25:40: ==============================================================
13:25:40: video thread frame - [100%] [avg time: 1.699 ms] [children: 63.9%] [unaccounted: 36.1%]
13:25:40: | scene->Preprocess - [0.0589%] [avg time: 0.001 ms]
13:25:40: | GPU download and conversion - [63.9%] [avg time: 1.085 ms] [children: 50.9%] [unaccounted: 13%]
13:25:40: | | flush - [34%] [avg time: 0.577 ms]
13:25:40: | | CopyResource - [0.765%] [avg time: 0.013 ms]
13:25:40: | | conversion to 4:2:0 - [16.1%] [avg time: 0.274 ms]
13:25:40: Convert444Threads - [100%] [avg time: 1.029 ms] [children: 99.5%] [unaccounted: 0.486%]
13:25:40: | Convert444toNV12 - [99.5%] [avg time: 1.024 ms]
13:25:40: encoder thread frame - [100%] [avg time: 5.557 ms] [children: 99.4%] [unaccounted: 0.612%]
13:25:40: | Encode - [99.4%] [avg time: 5.523 ms] [children: 92.4%] [unaccounted: 7.04%]
13:25:40: | | ProcessInput - [91.8%] [avg time: 5.099 ms]
13:25:40: | | Drain - [0.594%] [avg time: 0.033 ms] [children: 0.288%] [unaccounted: 0.306%]
13:25:40: | | | ProcessOutput - [0.288%] [avg time: 0.016 ms] [children: 0.198%] [unaccounted: 0.09%]
13:25:40: | | | | ProcessBitstream - [0.198%] [avg time: 0.011 ms]
13:25:40: ==============================================================
13:25:40:
13:25:40:
13:25:40: Profiler CPU results:
13:25:40:
13:25:40: ==============================================================
13:25:40: video thread frame - [cpu time: avg 0.21 ms, total 3437.5 ms] [avg calls per frame: 1]
13:25:40: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
13:25:40: | GPU download and conversion - [cpu time: avg 0.037 ms, total 609.375 ms] [avg calls per frame: 1]
13:25:40: | | flush - [cpu time: avg 0.026 ms, total 437.5 ms] [avg calls per frame: 1]
13:25:40: | | CopyResource - [cpu time: avg 0.006 ms, total 109.375 ms] [avg calls per frame: 1]
13:25:40: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
13:25:40: Convert444Threads - [cpu time: avg 0.886 ms, total 28828.1 ms] [avg calls per frame: 2]
13:25:40: | Convert444toNV12 - [cpu time: avg 0.884 ms, total 28781.3 ms] [avg calls per frame: 2]
13:25:40: encoder thread frame - [cpu time: avg 4.285 ms, total 70312.5 ms] [avg calls per frame: 1]
13:25:40: | Encode - [cpu time: avg 4.27 ms, total 70078.1 ms] [avg calls per frame: 1]
13:25:40: | | ProcessInput - [cpu time: avg 4.218 ms, total 69218.8 ms] [avg calls per frame: 1]
13:25:40: | | Drain - [cpu time: avg 0.031 ms, total 515.625 ms] [avg calls per frame: 1]
13:25:40: | | | ProcessOutput - [cpu time: avg 0.015 ms, total 515.625 ms] [avg calls per frame: 2]
13:25:40: | | | | ProcessBitstream - [cpu time: avg 0.021 ms, total 359.375 ms] [avg calls per frame: 1]
13:25:40: ==============================================================
13:25:40:
13:25:40: =====Stream End: 2014-07-23, 13:25:40=================================================


Last game capture log:
2014-07-23, 13:21:05: we're booting up:
13:21:05: CaptureThread: attached to process Borderlands2.exe
13:21:05: D3D9 Present
13:21:05: (half life scientist) everything.. seems to be in order
13:21:05: D3D9EndScene called
13:21:05: D3DPRESENT_PARAMETERS {
13:21:05: BackBufferWidth: 1920
13:21:05: BackBufferHeight: 1080
13:21:05: BackBufferFormat: D3DFMT_A8R8G8B8
13:21:05: BackBufferCount: 1
13:21:05: MultiSampleType: D3DMULTISAMPLE_NONE
13:21:05: MultiSampleQuality: 0
13:21:05: SwapEffect: D3DSWAPEFFECT_COPY
13:21:05: hDeviceWindow: 2622924
13:21:05: Windowed: true
13:21:05: EnableAutoDepthStencil: false
13:21:05: AutoDepthStencilFormat: D3DFMT_UNKNOWN
13:21:05: Flags: D3DPRESENTFLAG_LOCKABLE_BACKBUFFER
13:21:05: FullScreen_RefreshRateInHz: 0
13:21:05: PresentationInterval: 2147483648
13:21:05: };
13:21:05: successfully set up d3d9 hooks
13:21:05: D3D9Present called
13:21:05: DoD3D9GPUHook: success
13:21:05: D3DSURFACE_DESC {
13:21:05: Format: D3DFMT_A8R8G8B8
13:21:05: Type: D3DRTYPE_SURFACE
13:21:05: Usage: D3DUSAGE_RENDERTARGET
13:21:05: Pool: D3DPOOL_DEFAULT
13:21:05: MultiSampleType: D3DMULTISAMPLE_NONE
13:21:05: MultiSampleQuality: 0
13:21:05: Width: 1920
13:21:05: Height: 1080
13:21:05: };
13:21:05: successfully capturing d3d9 frames via GPU

13:25:50: Memory Leaks Were Detected.
13:25:50:
[/SPOILER]
 
Anytime I use Media foundation or use vce custom settings I get lost frames and hitching video. If I just check use Encoder: AMD VCE and check Use OpenCL its fine. Trying to stream 720p@30fps 3500bitrate for twitch using MFT. Anyone find a setup that works? Is there any explanation of what all the custom settings are. Tried lots of combinations but no love. For now just using the x264 encoder settings(cpu) then once its working good only changing to AMD VCE and checking Opencl for NV12 to offload the cpu (i5@4.2ghz 2500k). Same issue with x64 and x86 versions of obs vce

i5@4.2ghz
16gb memory
asus p67 motherboard
amd 7950 stock clock
Win 8.1

Having no crashes with newest build 7/20 :)
 

Woolba

New Member
I can't seem to get MFT working. Tried current 32-bit and 64-bit as well as some older versions. Running OBS normally it will record the first second then freeze the video, however the audio will still continue playing. Running as admin I get "Encoder initialization failed!" for almost every game I've tried bar Guild Wars 2 and Rift. If I run one of those games then switch to a game that resulted in the previous error it somehow manages to record it fine.

OpenCL seems to work for all the games I've tried, however it can't seem to remain at 60fps for a lot of them, that's why I wanted to try MFT, but it's just not wanting to cooperate with me.

Edit: Actually, if I start recording with the game minimized then maximize it, it will recording fine (as admin). I guess I'll have to work with that unless someone knows what's up.

Edit2: When using MFT after a couple of minutes in video playback everything will start jittering like crazy for a minute or so (tested this a bit more and it hasn't happened since. Maybe I just got unlucky during the first couple of tests). Also, memory usage will keep climbing until OBS crashes (only on the latest version), but I believe that part is already a known bug.

Guess I'll have to stick with opencl for the time being.
 
Last edited:

Fawkes

Member
i did not notice anything funny in ram usage but after 1 hour (and 3 minutes) of streaming my steam became really twitchy.
and i couldn't see it in the obs preview. how come? can someone explain?
here is video http://www.twitch.tv/truefawkes/b/551087936
skip to 1 hour and 3 minutes to see what i-am talking about

EDIT:
i use mft and max bitrate is 3300kbs i use cbr and cbr padding
 

Wishdream

New Member
Oh, yeah, I should add a device list. But it should use the first VCE supported device anyway, so it doesn't, hm?
I'm pretty sure that my APU which is the A10-58k supports AMD VCE 1.0. It works just fine before.

@Wishdream ,@icycrash
Try these then: obsvce_2014-07-23_devidx 32bit, 64bit.

There is "Device index" box in "VCE Settings". Check the log which device is selected with what index. If it crashes trying to get device's name, add "LogUsedDev=0" under "VCE Settings" to your profile ini (OpenCL calls should return error codes, but sometimes they crash instead :( ).

Well, I tried. Can't seem to pin down what the device is nor the name. Checked the logs and this appears each and every time.

UPDATE 1:
Oh wait... OpenCL? That means I shouldn't use the Media Foundation right?

Well I used OpenCL. It works. Problem is... I have to set it to my APU at the Video Settings than my GPU.
Device 1 (Devastator) comes out when I do. Otherwise, it crashes.

UPDATE 2:
Now I switched it back to my GPU and then used custom settings to set it to device 1 and now it works?!
After that, I turned off custom settings and now keeps on using device 1.

I'm guessing the device isn't really bound to the custom setting checkbox at this point.

Working well as it should be! Test Stream on here with Taikojiro stress test: http://www.twitch.tv/influxwishdream/b/551184541
 
Last edited:

Fawkes

Member
This is exactly what I was experiencing when I was testing out the local recording. Glad you got it captured online.
yes but it kind of sucks since i didnt know it myself. and just kept on streaming for another half hour ;p
this needs to be fixed but until that happends i'll just restart my stream every hour
 
Top