obsproject / obs-amd-encoder

AMD Advanced Media Framework Encoder Plugin for Open Broadcaster Studio
https://obsproject.com/forum/threads/amd-advanced-media-framework-encoder-plugin-for-obs-studio.52305/
GNU General Public License v2.0
457 stars 87 forks source link

h265 can't do 360FPS, although the H265 says it could do +400 #325

Closed AMDJona closed 5 years ago

AMDJona commented 6 years ago

Hey. First off all thanks for improving this plugin more and more. Finally H265 works, before it was always stuck at "stopping recording" , that is fixed now. I can record 1080 60 aswell as 720 240, but 360FPS isn't working. Keeps getting encoding overloaded errors.

This is my obs log:

14:53:39.246: CPU Name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
14:53:39.246: CPU Speed: 4008MHz
14:53:39.246: Physical Cores: 4, Logical Cores: 8
14:53:39.246: Physical Memory: 16322MB Total, 13088MB Free
14:53:39.246: Windows Version: 10.0 Build 17134 (revision: 112; 64-bit)
14:53:39.246: Running as administrator: true
14:53:39.246: Aero is Enabled (Aero is always on for windows 8 and above)
14:53:39.246: Windows 10 Gaming Features:
14:53:39.246:   Game Bar: Off
14:53:39.246:   Game DVR: Off
14:53:39.246:   Game DVR Background Recording: Off
14:53:39.247: Sec. Software Status:
14:53:39.248:   Windows Defender Antivirus: enabled (AV)
14:53:39.248:   Windows-Firewall: enabled (FW)
14:53:39.248:   Windows Defender Antivirus: enabled (ASW)
14:53:39.248: Portable mode: false
14:53:39.322: OBS 21.1.2 (64bit, windows)
14:53:39.322: ---------------------------------
14:53:39.323: ---------------------------------
14:53:39.323: audio settings reset:
14:53:39.323:   samples per sec: 44100
14:53:39.323:   speakers:        2
14:53:39.324: ---------------------------------
14:53:39.324: Initializing D3D11...
14:53:39.324: Available Video Adapters: 
14:53:39.325:   Adapter 1: Radeon RX 580 Series
14:53:39.325:     Dedicated VRAM: 4237361152
14:53:39.325:     Shared VRAM:    4262858752
14:53:39.325:     output 1: pos={0, 0}, size={1920, 1080}, attached=true
14:53:39.325:     output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
14:53:39.325:     output 3: pos={1920, 0}, size={1920, 1080}, attached=true
14:53:39.326: Loading up D3D11 on adapter Radeon RX 580 Series (0)
14:53:39.347: D3D11 loaded successfully, feature level used: 45056
14:53:39.849: ---------------------------------
14:53:39.849: video settings reset:
14:53:39.849:   base resolution:   1280x720
14:53:39.849:   output resolution: 1280x720
14:53:39.849:   downscale filter:  Bilinear
14:53:39.849:   fps:               360/1
14:53:39.849:   format:            NV12
14:53:39.849:   YUV mode:          601/Partial
14:53:39.850: Audio monitoring device:
14:53:39.850:   name: Standard
14:53:39.850:   id: default
14:53:39.850: ---------------------------------
14:53:39.851: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
14:53:39.852: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
14:53:40.099: [AMF] Version 2.3.3 loaded (Compiled: 1.4.7.0, Runtime: 1.4.7.0, Library: 1;4;7;0;18.10;201805161434;CL#1555789).
14:53:40.244: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
14:53:40.244: LoadLibrary failed for '../../obs-plugins/64bit/libEGL.dll': (null) (127)
14:53:40.244: Module '../../obs-plugins/64bit/libEGL.dll' not loaded
14:53:40.244: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
14:53:40.245: [browser_source: 'Version: 1.31.0']
14:53:40.247: LoadLibrary failed for 'nvEncodeAPI64.dll': (null) (126)
14:53:40.506: VLC found, VLC video source enabled
14:53:40.509: No blackmagic support
14:53:40.511: ---------------------------------
14:53:40.511:   Loaded Modules:
14:53:40.511:     win-wasapi.dll
14:53:40.511:     win-mf.dll
14:53:40.511:     win-dshow.dll
14:53:40.511:     win-decklink.dll
14:53:40.511:     win-capture.dll
14:53:40.511:     vlc-video.dll
14:53:40.511:     text-freetype2.dll
14:53:40.511:     rtmp-services.dll
14:53:40.511:     obs-x264.dll
14:53:40.511:     obs-vst.dll
14:53:40.511:     obs-transitions.dll
14:53:40.511:     obs-text.dll
14:53:40.511:     obs-qsv11.dll
14:53:40.511:     obs-outputs.dll
14:53:40.511:     obs-filters.dll
14:53:40.511:     obs-ffmpeg.dll
14:53:40.511:     obs-browser.dll
14:53:40.511:     image-source.dll
14:53:40.511:     frontend-tools.dll
14:53:40.511:     enc-amf.dll
14:53:40.511:     coreaudio-encoder.dll
14:53:40.511: ---------------------------------
14:53:40.511: ==== Startup complete ===============================================
14:53:40.511: Service '' not found
14:53:40.513: All scene data cleared
14:53:40.513: ------------------------------------------------
14:53:40.547: WASAPI: Device 'Kopfhörer (2- Razer Kraken 7.1 Chroma)' initialized
14:53:40.547: [WASAPISource::TryInitialize]:[Mikrofon (SC450USB                 )] Failed to activate client context: 88890004
14:53:40.547: [WASAPISource::WASAPISource] Device '{0.0.1.00000000}.{17edccbb-0b80-47ce-b312-b8d50c93b52f}' not found.  Waiting for device
14:53:40.836: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds
14:53:40.952: Switched to scene 'Recording'
14:53:40.952: ------------------------------------------------
14:53:40.952: Loaded scenes:
14:53:40.952: - scene 'Szene':
14:53:40.952:     - source: 'Bildschirmaufnahme' (monitor_capture)
14:53:40.952: - scene 'Recording':
14:53:40.952:     - source: 'Spielaufnahme' (game_capture)
14:53:40.952: - scene 'osu':
14:53:40.952:     - source: 'Spielaufnahme 2' (game_capture)
14:53:40.952: ------------------------------------------------
14:53:48.042: User switched to scene 'osu'
14:53:48.654: User switched to scene 'Szene'
14:53:50.897: [AMF] [H265]<Id: 7> Encoder Parameters:
14:53:50.897: [AMF] [H265]<Id: 7>   Backend:
14:53:50.897: [AMF] [H265]<Id: 7>     Video API: Direct3D 11
14:53:50.897: [AMF] [H265]<Id: 7>     Video Adapter: Radeon RX 580 Series (VEN_1002/DEV_67df/SUB_5171043/REV_00e7)
14:53:50.897: [AMF] [H265]<Id: 7>     OpenCL: Not Supported
14:53:50.897: [AMF] [H265]<Id: 7>       Transfer: Disabled
14:53:50.897: [AMF] [H265]<Id: 7>       Conversion: Disabled
14:53:50.897: [AMF] [H265]<Id: 7>     Multi-Threading: Disabled
14:53:50.897: [AMF] [H265]<Id: 7>     Queue Size: 8
14:53:50.897: [AMF] [H265]<Id: 7>   Frame:
14:53:50.897: [AMF] [H265]<Id: 7>     Format: NV12 601 Partial
14:53:50.897: [AMF] [H265]<Id: 7>     Resolution: 1280x720
14:53:50.897: [AMF] [H265]<Id: 7>     Frame Rate: 360/1
14:53:50.897: [AMF] [H265]<Id: 7>     Aspect Ratio: 1:1
14:53:50.897: [AMF] [H265]<Id: 7>   Static:
14:53:50.897: [AMF] [H265]<Id: 7>     Usage: Transcoding
14:53:50.897: [AMF] [H265]<Id: 7>     Quality Preset: Speed
14:53:50.897: [AMF] [H265]<Id: 7>     Profile: Main 5.1
14:53:50.898: [AMF] [H265]<Id: 7>     Tier: Main
14:53:50.898: [AMF] [H265]<Id: 7>     Coding Type: Automatic
14:53:50.898: [AMF] [H265]<Id: 7>     Max. Reference Frames: 1
14:53:50.898: [AMF] [H265]<Id: 7>     Max. Long-Term Reference Frames: 0
14:53:50.898: [AMF] [H265]<Id: 7>   Rate Control:
14:53:50.898: [AMF] [H265]<Id: 7>     Method: Constant Bitrate
14:53:50.898: [AMF] [H265]<Id: 7>     Pre-Pass Mode: Disabled
14:53:50.898: [AMF] [H265]<Id: 7>     QP:
14:53:50.898: [AMF] [H265]<Id: 7>       Ranges:
14:53:50.898: [AMF] [H265]<Id: 7>         I-Frame: 18 - 51
14:53:50.898: [AMF] [H265]<Id: 7>         P-Frame: 18 - 51
14:53:50.898: [AMF] [H265]<Id: 7>       Fixed:
14:53:50.898: [AMF] [H265]<Id: 7>         I-Frame: 26
14:53:50.898: [AMF] [H265]<Id: 7>         P-Frame: 26
14:53:50.898: [AMF] [H265]<Id: 7>     Bitrate:
14:53:50.898: [AMF] [H265]<Id: 7>       Target: 50000000 bit/s
14:53:50.898: [AMF] [H265]<Id: 7>       Peak: 50000000 bit/s
14:53:50.898: [AMF] [H265]<Id: 7>     Flags:
14:53:50.898: [AMF] [H265]<Id: 7>       Filler Data: Enabled
14:53:50.898: [AMF] [H265]<Id: 7>       Frame Skipping: Disabled
14:53:50.898: [AMF] [H265]<Id: 7>         Period: 0 Frames
14:53:50.898: [AMF] [H265]<Id: 7>         Behaviour: Skip every Nth frame
14:53:50.898: [AMF] [H265]<Id: 7>       Variance Based Adaptive Quantization: Disabled
14:53:50.898: [AMF] [H265]<Id: 7>       Enforce Hypothetical Reference Decoder: Enabled
14:53:50.898: [AMF] [H265]<Id: 7>     Video Buffering Verfier:
14:53:50.898: [AMF] [H265]<Id: 7>       Buffer Size: 20000000 bits
14:53:50.898: [AMF] [H265]<Id: 7>       Initial Fullness: 100 %
14:53:50.898: [AMF] [H265]<Id: 7>     Max. Access Unit Size: 0
14:53:50.898: [AMF] [H265]<Id: 7>   Picture Control:
14:53:50.898: [AMF] [H265]<Id: 7>     Period:
14:53:50.898: [AMF] [H265]<Id: 7>       IDR: 2 GOPs
14:53:50.898: [AMF] [H265]<Id: 7>       I: 0 Frames
14:53:50.898: [AMF] [H265]<Id: 7>       P: 0 Frames
14:53:50.898: [AMF] [H265]<Id: 7>       B: 0 Frames
14:53:50.898: [AMF] [H265]<Id: 7>     GOP:
14:53:50.898: [AMF] [H265]<Id: 7>       Type: Fixed
14:53:50.898: [AMF] [H265]<Id: 7>       Size: 360
14:53:50.898: [AMF] [H265]<Id: 7>       Size Range: 0 - 16
14:53:50.898: [AMF] [H265]<Id: 7>       Alignment: Enabled
14:53:50.898: [AMF] [H265]<Id: 7>     Deblocking Filter: Enabled
14:53:50.898: [AMF] [H265]<Id: 7>     Motion Estimation: Quarter, Half
14:53:50.898: [AMF] [H265]<Id: 7>   Experimental:
14:53:50.898: [AMF] [H265]<Id: 7>     Input Queue: 16
14:53:50.898: ---------------------------------
14:53:50.898: [FFmpeg aac encoder: 'Track1'] bitrate: 160, channels: 2, channel_layout: 3
14:53:50.898: 
14:53:50.903: ==== Recording Start ===============================================
14:53:50.903: [ffmpeg muxer: 'adv_file_output'] Writing file 'D:/Desktop/2018-07-06 14-53-50.mp4'...
14:53:50.925: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.930: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.935: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.940: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.945: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.950: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.954: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.959: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.964: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.964: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.964: [AMF] <Id: 7> Initial Frame Latency is 39231407 nanoseconds.
14:53:50.965: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.965: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.965: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.966: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.966: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.967: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.968: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.970: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.972: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.973: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.973: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.975: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.975: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.976: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.977: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.979: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.979: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.979: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.981: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.981: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.981: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.983: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.985: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.986: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.986: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.988: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.988: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.989: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:53:50.991: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:53:50.991: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:53:50.991: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.244: Last log entry repeated for 27942 more lines
14:54:18.244: [ffmpeg muxer: 'adv_file_output'] Output of file 'D:/Desktop/2018-07-06 14-53-50.mp4' stopped
14:54:18.244: Output 'adv_file_output': stopping
14:54:18.244: Output 'adv_file_output': Total frames output: 7446
14:54:18.244: Output 'adv_file_output': Total drawn frames: 9842
14:54:18.244: ==== Recording Stop ================================================
14:54:18.245: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.245: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.246: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.246: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.247: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.247: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.249: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.251: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.251: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.252: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.254: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.254: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.254: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.256: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.258: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.258: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.258: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.260: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.260: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.260: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.262: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.264: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.264: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.264: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.266: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.268: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.269: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.269: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:18.271: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_OK (code 0).
14:54:18.271: [AMF] <Id: 7> [Main/Submit] SubmitInput returned AMF_OK (code 0).
14:54:18.271: [AMF] <Id: 7> [Main/Query] QueryOutput returned AMF_REPEAT (code 24).
14:54:19.878: Last log entry repeated for 1677 more lines
14:54:19.878: Video stopped, number of skipped frames due to encoding lag: 8140/8289 (98.2%)
14:54:26.446: ==== Shutting down ==================================================
14:54:26.453: Switched to scene '(null)'
14:54:26.453: WASAPI: Device 'Kopfhörer (2- Razer Kraken 7.1 Chroma)' Terminated
14:54:26.456: All scene data cleared
14:54:26.456: ------------------------------------------------
14:54:26.484: Freeing OBS context data
14:54:26.504: [Scripting] Total detached callbacks: 0
14:54:26.560: == Profiler Results =============================
14:54:26.560: run_program_init: 1885.12 ms
14:54:26.560:  ┣OBSApp::AppInit: 8.945 ms
14:54:26.560:  ┃ ┗OBSApp::InitLocale: 1.399 ms
14:54:26.560:  ┗OBSApp::OBSInit: 1871.36 ms
14:54:26.560:    ┣obs_startup: 2.088 ms
14:54:26.560:    ┗OBSBasic::OBSInit: 1660.62 ms
14:54:26.560:      ┣OBSBasic::InitBasicConfig: 0.273 ms
14:54:26.560:      ┣OBSBasic::ResetAudio: 0.113 ms
14:54:26.560:      ┣OBSBasic::ResetVideo: 526.849 ms
14:54:26.560:      ┣OBSBasic::InitOBSCallbacks: 0.004 ms
14:54:26.560:      ┣OBSBasic::InitHotkeys: 0.031 ms
14:54:26.560:      ┣obs_load_all_modules: 660.906 ms
14:54:26.560:      ┃ ┣obs_init_module(coreaudio-encoder.dll): 0.534 ms
14:54:26.560:      ┃ ┣obs_init_module(enc-amf.dll): 382.001 ms
14:54:26.560:      ┃ ┣obs_init_module(frontend-tools.dll): 2.402 ms
14:54:26.560:      ┃ ┣obs_init_module(image-source.dll): 0.003 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-browser.dll): 0.043 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-ffmpeg.dll): 0.462 ms
14:54:26.560:      ┃ ┃ ┗nvenc_check: 0.453 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-filters.dll): 0.014 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-outputs.dll): 0.004 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-qsv11.dll): 252.935 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-text.dll): 0.158 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-transitions.dll): 0.009 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-vst.dll): 0.001 ms
14:54:26.560:      ┃ ┣obs_init_module(obs-x264.dll): 0.001 ms
14:54:26.560:      ┃ ┣obs_init_module(rtmp-services.dll): 0.011 ms
14:54:26.560:      ┃ ┣obs_init_module(text-freetype2.dll): 0.038 ms
14:54:26.560:      ┃ ┣obs_init_module(vlc-video.dll): 0.801 ms
14:54:26.560:      ┃ ┣obs_init_module(win-capture.dll): 0.044 ms
14:54:26.560:      ┃ ┣obs_init_module(win-decklink.dll): 1.647 ms
14:54:26.560:      ┃ ┣obs_init_module(win-dshow.dll): 0.652 ms
14:54:26.560:      ┃ ┣obs_init_module(win-mf.dll): 0 ms
14:54:26.560:      ┃ ┣obs_init_module(win-wasapi.dll): 0.004 ms
14:54:26.560:      ┃ ┗reset_win32_symbol_paths: 0.053 ms
14:54:26.560:      ┣OBSBasic::ResetOutputs: 0.306 ms
14:54:26.560:      ┣OBSBasic::CreateHotkeys: 0.139 ms
14:54:26.560:      ┣OBSBasic::InitService: 0.911 ms
14:54:26.560:      ┣OBSBasic::InitPrimitives: 0.097 ms
14:54:26.560:      ┗OBSBasic::Load: 440.09 ms
14:54:26.560: obs_hotkey_thread(25 ms): min=0.002 ms, median=0.004 ms, max=3.146 ms, 99th percentile=0.039 ms, 100% below 25 ms
14:54:26.560: audio_thread(Audio): min=0 ms, median=0.243 ms, max=1.404 ms, 99th percentile=0.44 ms
14:54:26.560:  ┗receive_audio: min=0.002 ms, median=0.241 ms, max=0.766 ms, 99th percentile=0.426 ms, 0.606414 calls per parent call
14:54:26.560:    ┣buffer_audio: min=0 ms, median=0.001 ms, max=0.007 ms, 99th percentile=0.002 ms
14:54:26.560:    ┗do_encode: min=0.023 ms, median=0.239 ms, max=0.764 ms, 99th percentile=0.424 ms
14:54:26.560:      ┗encode(Track1): min=0.021 ms, median=0.221 ms, max=0.762 ms, 99th percentile=0.403 ms
14:54:26.560: obs_graphics_thread(2.77778 ms): min=0.062 ms, median=0.174 ms, max=400.616 ms, 99th percentile=1.174 ms, 99.964% below 2.778 ms
14:54:26.560:  ┣tick_sources: min=0 ms, median=0.022 ms, max=400.19 ms, 99th percentile=0.152 ms
14:54:26.560:  ┣output_frame: min=0.052 ms, median=0.118 ms, max=3.855 ms, 99th percentile=1.158 ms
14:54:26.560:  ┃ ┣gs_context(video->graphics): min=0.041 ms, median=0.084 ms, max=3.855 ms, 99th percentile=1.043 ms
14:54:26.560:  ┃ ┃ ┣render_video: min=0.012 ms, median=0.03 ms, max=2.907 ms, 99th percentile=0.081 ms
14:54:26.560:  ┃ ┃ ┃ ┣render_main_texture: min=0.001 ms, median=0.015 ms, max=0.262 ms, 99th percentile=0.044 ms
14:54:26.560:  ┃ ┃ ┃ ┣render_output_texture: min=0.002 ms, median=0.005 ms, max=0.169 ms, 99th percentile=0.022 ms
14:54:26.560:  ┃ ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.005 ms, max=0.054 ms, 99th percentile=0.013 ms
14:54:26.560:  ┃ ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.004 ms, max=2.877 ms, 99th percentile=0.03 ms
14:54:26.560:  ┃ ┃ ┣download_frame: min=0 ms, median=0.003 ms, max=3.188 ms, 99th percentile=0.997 ms
14:54:26.560:  ┃ ┃ ┗gs_flush: min=0.009 ms, median=0.049 ms, max=3.672 ms, 99th percentile=0.118 ms
14:54:26.560:  ┃ ┗output_video_data: min=0 ms, median=0.001 ms, max=0.735 ms, 99th percentile=0.229 ms
14:54:26.560:  ┗render_displays: min=0 ms, median=0 ms, max=0.027 ms, 99th percentile=0.001 ms
14:54:26.560: video_thread(video): min=0 ms, median=0.001 ms, max=2021.06 ms, 99th percentile=48.865 ms
14:54:26.560:  ┗receive_video: min=0 ms, median=3.978 ms, max=14.492 ms, 99th percentile=5.013 ms, 1.30289 calls per parent call
14:54:26.560:    ┗do_encode: min=0.863 ms, median=3.977 ms, max=14.491 ms, 99th percentile=5.013 ms
14:54:26.560:      ┗encode(recording_h264): min=0.862 ms, median=3.962 ms, max=6.397 ms, 99th percentile=4.99 ms
14:54:26.560: =================================================
14:54:26.560: == Profiler Time Between Calls ==================
14:54:26.560: obs_hotkey_thread(25 ms): min=25.167 ms, median=25.931 ms, max=28.927 ms, 5.21691% within ±2% of 25 ms (0% lower, 94.7831% higher)
14:54:26.560: obs_graphics_thread(2.77778 ms): min=0.285 ms, median=2.778 ms, max=400.622 ms, 99.8017% within ±2% of 2.778 ms (0.102145% lower, 0.0961365% higher)
14:54:26.560: =================================================
14:54:26.587: Number of memory leaks: 1

This is my h265 performance test

ResultsH265.zip

Specs: 6700k RX 580 Windows 10 64bit 16gb ddr4 OBS 21.1.2 64 bit

Xaymar commented 6 years ago

If you are trying to record 1920x1080 360 FPS, your test shows that at best you'll manage 198.5 FPS. For 1280x720, you should manage 404 FPS at best. This is with a GPU test that only tests raw encoding performance, nothing else. In reality you are bound by a lot of factors.

  1. OBS Studio (and any libobs based software like Streamlabs OBS) does not support encoding directly on the GPU. Instead, libobs first downloads the frame from the GPU to RAM, then the plugin uploads from RAM to GPU again. This leads to a significant bottleneck called PCI-e 3.0, Chipset, RAM and CPU.
  2. Encoding requires VRAM throughput, which will be affected by games and OBS rendering. The test you used does not use a lot of VRAM (<1kb). This is the GPU VRAM bottleneck, which you can't get rid of without Vega or later.
  3. Finally, conflicting resources. While gaming a lot more tasks are required to keep the game running, and also to keep a recording running well. There is not only the GPU->RAM->GPU->RAM overhead, but also the game, file reading/writing/streaming, network, physics and tons more.

Like always, the "performance test" is a benchmark. It does not apply to real world and only shows the potentially best encoding performance with a ridiculously simple 3D scene. Seriously, open up one of the resulting .h264 and .h265 files in VLC and take a look at just how simple that scene is.

Edit: TL;DR: Your GPU might be capable of it, but you are being bottlenecked by the rest of the hardware and software running on your system. Solutions don't exist yet.

AMDJona commented 6 years ago

Okay thanks. OFC I knew that the benchmark wouldn't be like any real world, but i also triedrecording Desktop and Minecraft, none of them even worked at 720P 300FPS. Also as seen in the above mentioned log, i recordet in 1280x720

I can also see that it isn't a CPU Ram or HDD problem... Thanks for your help

Xaymar commented 6 years ago

To explain a bit further, a 360 FPS 1280x720 NV12 data stream is 480mb/s VRAM, PCI-e, CPU and RAM bandwidth usage, plus an additional 480mb/s VRAM, PCI-e, CPU and RAM bandwidth usage for the upload, plus an additional 480mb/s (or higher) VRAM bandwidth usage for encode, plus whatever bandwidth is used to store the encoder state in VRAM and RAM, plus whatever bandwidth ends up used by the final encoded bitstream, which takes VRAM, PCI-e, CPU and RAM bandwidth, only to then be pushed to ffmpeg-mux which takes additional CPU and RAM bandwidth and then finally be pushed to disk which takes additional CPU, RAM and Chipset bandwidth. That is anywhere from 1440mb/s to several gb/s, it doesn't sound like a lot but it's a huge bottleneck as this requires synchronization between CPU and GPU.

Unfortunately libOBS / OBS Studio is currently far from the most efficient for high framerate recording. It should manage 120 fps at 1920x1080p RGBA with ease as long as you use a software encoder, but there is just way too much overhead with hardware encoders. I know for a fact that with a ThreadRipper 1950X and a 1080 Ti, the best resolution I can encode at with NVENC is 2560x1440 RGBX with barely over 60 fps. Anything higher than that and I end up skipping frames hardcore.

An Option you could try is using OpenCL. It has slightly higher encode latency, but can deal with bottlenecks much better than DirectX 11 can. You should be able to see than option under View Mode Advanced.

AMDJona commented 6 years ago

Thanks for your explanation! So Overclocking the VRam and Ram should also help it a bit I guess... Im pretty much fine since 1080P 120FPS recording works, which is the most important for me (Got a 144hz Screen) I only got one question left. How does Shadowplay for example record 4K 60 with a GTX 1060? Are you really shure your 1080 TI can't handle more?

Also thanks a lot for helping me and doing this AMF encoder project at all!

btw If there is any way I can help Improve this plugin, let me know

Xaymar commented 6 years ago

I only got one question left. How does Shadowplay for example record 4K 60 with a GTX 1060? Are you really shure your 1080 TI can't handle more?

I don't know what the actual limits of a Pascal based GPU are, but the Nvidia slides are actually pretty accurate on this: https://developer.nvidia.com/nvidia-video-codec-sdk . Basically a Pascal/Volta card is currently the fastest there is in terms of hardware encoding and also provides the best quality, which has been confirmed by a lot of people.

Roph commented 6 years ago

Shadowplay and Relive don't have the overhead that going through OBS incurs. I'm on an older FX / PCIe 2.0 system with an RX 580, and I can't stream pubg using OBS for example. Just lags to hell and back.

But with Relive, I can stream pubg no problem.

Xaymar commented 6 years ago

There is ongoing work to reduce the OBS overhead for GPU encoders, however it is still some distance out.

Xaymar commented 5 years ago

Closing due to inactivity.