# FFmpeg Encoders for OBS Studio



## Xaymar (Jul 9, 2019)

Xaymar submitted a new resource:

FFmpeg Encoders for OBS Studio - Get all the power of FFmpeg without using a custom output!



> This plugin adds all FFmpeg encoders to the normal OBS Studio recording and streaming options, as long as the OBS Studio bundled FFmpeg version was built with them enabled. Record with Apple ProRes, VP9, or any codec that FFmpeg supports!
> 
> *Encoders with a proper UI:*
> 
> ...



Read more about this resource...


----------



## Xaymar (Jul 22, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

v0.2.0pre2: NVidia NVENC HEVC Encoder and more



> The need to write a class for each encoder is no more, as with this update all encoders now use the new generic encoder implementation! With this, all possible video and audio encoders are now being registered to obs-studio and should be available in Advanced Output Mode.
> *Changelog*
> *0.2.0pre2*
> 
> *Improved frame conversion/copy speed by increasing the memory alignment to 32 bytes. On AMD Ryzen this results in halved CPU usage, while on Intel...*



Read the rest of this update entry...


----------



## Xaymar (Jul 24, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

v0.2.0pre3: NVidia H.264 Encoder and more



> *Changelog*
> *0.2.0pre3*
> 
> *Added support for NVidia's NVENC H.264/AVC Encoder.* This encoder is on average ~0.1-0.2% less CPU expensive than the OBS Studio included version, however will still affect performance more than the included hardware version.
> ...



Read the rest of this update entry...


----------



## Xaymar (Aug 11, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

Version 0.2.0: NVENC H.264/AVC Streaming and H.265/HEVC Recording



> *Changelog*
> *0.2.0*
> 
> The old Apple ProRes encoder has been completely replaced by the new implementation, which is up to 50% faster on various CPUs.
> ...



Read the rest of this update entry...


----------



## Xaymar (Aug 11, 2019)

Version 0.2.0 and up require OBS Studio v24.x due to a change to the dependencies2017.zip which is used by the AppVeyor CI to build for Windows. There is an alternative build for those wishing to stay on OBS Studio v23.x and older here: https://ci.appveyor.com/project/Xaymar/obs-ffmpeg-encoder/builds/26614052/artifacts


----------



## GelmoSan (Aug 11, 2019)

Hello @Xaymar ,

You said the following previously in the changelog:


> Added support for NVidia's NVENC H.264/AVC Encoder. This encoder is on average ~0.1-0.2% less CPU expensive than the OBS Studio included version, however *will still affect performance more than the included hardware version*.



Can you clarify this? Are you saying that we should continue using "NVIDIA HVENC H.264 (new)" until this is further developed? Do you have any tests of the performance difference on resource usage and/or gameplay? How does the output quality compare to the above preset with similar settings and same bitrate?

Sorry for all the questions; I'm hoping to gain a better understanding of this plugin so I can make an informed decision about usage.


----------



## Xaymar (Aug 11, 2019)

GelmoSan said:


> Can you clarify this? Are you saying that we should continue using "NVIDIA HVENC H.264 (new)" until this is further developed?


It's simple. The current plugin uses the software path for the NVENC encoders, as I don't yet have enough knowledge on FFmpeg to make a full on-Hardware encoder a possibility. Therefore it has the same GPU load cost as using the non "(new)" encoder, although at slightly lower CPU cost.



GelmoSan said:


> Do you have any tests of the performance difference on resource usage and/or gameplay? How does the output quality compare to the above preset with similar settings and same bitrate?


The quality primarily depends on the settings you choose, but on Turing this plugin allows the use of settings that rival x264 slow in certain cases and usually is better than x264 medium, at some cost of GPU usage. You can check out my quality tests here, they even include the settings required to get the resulting quality: https://xaymar.com/ves/


----------



## walterav1984 (Aug 15, 2019)

Hello @Xaymar, thank you for having a workaround for this prores bug report for windows users. Would you also consider a Linux (Ubuntu 18.04/19.04 amd64) version of your gui/extension in the near future? 

Have had success with building obs-project 23.x in ubuntu 19.04 before for premature decklink gui support in the past, meaning that I could try to build some git patches if you have any?


----------



## Xaymar (Aug 15, 2019)

walterav1984 said:


> Hello @Xaymar, thank you for having a workaround for this prores bug report for windows users. Would you also consider a Linux (Ubuntu 18.04/19.04 amd64) version of your gui/extension in the near future?



If someone manages to implement Linux support to the AppVeyor build script, then yes. However I personally have no interest in Linux, so I myself will not bother to deal with it for the near future.


----------



## walterav1984 (Aug 16, 2019)

Its understandable Linux support is not in your interest, however is it possible to abstract your ffmpeg cli syntax/arguments for your optimized prores presets so other multi-platform obs-studio users might benefit from your insights?

If my understanding is right, obs-studio needs to talk to a external ffmpeg binary otherwise bug 1245 spoils the performance?


----------



## Xaymar (Aug 16, 2019)

walterav1984 said:


> Its understandable Linux support is not in your interest, however is it possible to abstract your ffmpeg cli syntax/arguments for your optimized prores presets so other multi-platform obs-studio users might benefit from your insights?
> 
> If my understanding is right, obs-studio needs to talk to a external ffmpeg binary otherwise bug 1245 spoils the performance?



A button to import and export things from/to an ffmpeg command line is planned, but not high priority right now. There are also no optimized ProRes presets, the gains and improvements are simply in how the plugin handles the FFmpeg library. The plugin also just uses the "external ffmpeg binary" to do things, it just does things correctly.


----------



## walterav1984 (Aug 21, 2019)

While not having tried earlier versions of your plugin yet, I installed OBS-Studio 24.0.0rc1 and tried your 0.2.0.0 github .exe installer(also tried manual zip install, which requires 24.x) but no obs-ffmpeg-encoder plugin/export menu option shows up after starting OBS-Studio 24.0.0rc1. I also don't see any "Plugins" dock/toolbar either which is I guess would hold your config panel for setting up your obs-ffmpeg-encoder.

However the OBS log shows "obs-ffmpeg-encoder.dll" loaded, do I miss some config steps, external libs/dependencies or something obvious?


```
08:51:29.943: CPU Name: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
08:51:29.943: CPU Speed: 3691MHz
08:51:29.943: Physical Cores: 2, Logical Cores: 4
08:51:29.943: Physical Memory: 16230MB Total, 13429MB Free
08:51:29.943: Windows Version: 10.0 Build 18362 (revision: 239; 64-bit)
08:51:29.943: Running as administrator: false
08:51:29.943: Aero is Enabled (Aero is always on for windows 8 and above)
08:51:29.943: Windows 10 Gaming Features:
08:51:29.943:     Game DVR: On
08:51:29.945: Sec. Software Status:
08:51:29.946:     Windows Defender Antivirus: enabled (AV)
08:51:29.946:     Windows Firewall: enabled (FW)
08:51:29.946: Current Date/Time: 2019-08-21, 08:51:29
08:51:29.946: Browser Hardware Acceleration: true
08:51:29.946: Portable mode: false
08:51:30.351: OBS 24.0.0-rc1 (64-bit, windows)
08:51:30.351: ---------------------------------
08:51:30.367: ---------------------------------
08:51:30.367: audio settings reset:
08:51:30.367:     samples per sec: 48000
08:51:30.367:     speakers:        2
08:51:30.368: ---------------------------------
08:51:30.368: Initializing D3D11...
08:51:30.368: Available Video Adapters:
08:51:30.370:     Adapter 0: Intel(R) HD Graphics 4400
08:51:30.370:       Dedicated VRAM: 117964800
08:51:30.370:       Shared VRAM:    2147483648
08:51:30.370:       output 0: pos={0, 0}, size={1680, 1050}, attached=true
08:51:30.370:       output 1: pos={1680, -31}, size={1920, 1080}, attached=true
08:51:30.372: Loading up D3D11 on adapter Intel(R) HD Graphics 4400 (0)
08:51:30.378: D3D11 loaded successfully, feature level used: 45056
08:51:30.973: ---------------------------------
08:51:30.973: video settings reset:
08:51:30.973:     base resolution:   1920x1080
08:51:30.973:     output resolution: 1920x1080
08:51:30.973:     downscale filter:  Lanczos
08:51:30.973:     fps:               50/1
08:51:30.973:     format:            NV12
08:51:30.973:     YUV mode:          709/Partial
08:51:30.973: NV12 texture support not available
08:51:30.974: Audio monitoring device:
08:51:30.974:     name: Default
08:51:30.974:     id: default
08:51:30.975: ---------------------------------
08:51:30.983: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
08:51:30.985: Failed to load 'en-US' text for module: 'decklink-ouput-ui.dll'
08:51:31.026: [AMF] AMF Test failed due to one or more errors.
08:51:31.026: Failed to initialize module 'enc-amf.dll'
08:51:31.059: [obs-browser]: Version 2.6.1
08:51:31.059: [obs-browser]: Blacklisted device detected, disabling browser source hardware acceleration.
08:51:31.115: Couldn't find VLC installation, VLC video source disabled
08:51:31.165: ---------------------------------
08:51:31.165:   Loaded Modules:
08:51:31.165:     win-wasapi.dll
08:51:31.165:     win-mf.dll
08:51:31.165:     win-dshow.dll
08:51:31.165:     win-decklink.dll
08:51:31.165:     win-capture.dll
08:51:31.165:     vlc-video.dll
08:51:31.165:     text-freetype2.dll
08:51:31.165:     rtmp-services.dll
08:51:31.165:     obs-x264.dll
08:51:31.165:     obs-vst.dll
08:51:31.165:     obs-transitions.dll
08:51:31.165:     obs-text.dll
08:51:31.165:     obs-qsv11.dll
08:51:31.165:     obs-outputs.dll
08:51:31.165:     obs-filters.dll
08:51:31.165:     obs-ffmpeg.dll
08:51:31.165:     obs-ffmpeg-encoder.dll
08:51:31.165:     obs-browser.dll
08:51:31.165:     image-source.dll
08:51:31.165:     frontend-tools.dll
08:51:31.165:     enc-amf.dll
08:51:31.165:     decklink-ouput-ui.dll
08:51:31.165:     coreaudio-encoder.dll
08:51:31.165: ---------------------------------
08:51:31.166: ==== Startup complete ===============================================
08:51:31.166: Service '' not found
08:51:31.169: All scene data cleared
08:51:31.169: ------------------------------------------------
08:51:31.222: WASAPI: Device 'Luidsprekers (Blackmagic DeckLink Duo 2 (3) Audio)' initialized
08:51:31.251: WASAPI: Device 'Lijningang (Blackmagic DeckLink Duo 2 (3) Audio)' initialized
08:51:31.252: Switched to scene 'ScÃ¨ne'
08:51:31.252: ------------------------------------------------
08:51:31.252: Loaded scenes:
08:51:31.252: - scene 'ScÃ¨ne':
08:51:31.252:     - source: 'Color Source' (color_source)
08:51:31.252: ------------------------------------------------
08:51:31.268: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Mic/Aux)
08:51:31.268:
```


----------



## Xaymar (Aug 22, 2019)

walterav1984 said:


> While not having tried earlier versions of your plugin yet, I installed OBS-Studio 24.0.0rc1 and tried your 0.2.0.0 github .exe installer(also tried manual zip install, which requires 24.x) but no obs-ffmpeg-encoder plugin/export menu option shows up after starting OBS-Studio 24.0.0rc1. I also don't see any "Plugins" dock/toolbar either which is I guess would hold your config panel for setting up your obs-ffmpeg-encoder.
> 
> However the OBS log shows "obs-ffmpeg-encoder.dll" loaded, do I miss some config steps, external libs/dependencies or something obvious?



The encoders are part of the the encoder drop down in OBS and do not add anything other than that. Take a look at Settings -> Output.


----------



## walterav1984 (Aug 23, 2019)

Found it! So for others make sure the advanced recording -Type is set to "Standard" instead of "Custom Output(FFmpeg)" otherwise you won't see Xaymar's extra encoders!

OBS-Studio: Settings > Output  -Output Mode "Advanced" > Recording -Type "Standard" -Encoder "Apple ProRes (prores_aw)" .

Thanks


----------



## Erick Smith (Aug 24, 2019)

Xaymar said:


> Xaymar submitted a new resource:
> 
> FFmpeg Encoders for OBS Studio - Get all the power of FFmpeg without using a custom output!
> 
> ...



I guess Smart Screen is blocking this as a download, but it can still be downloaded.  Outstanding job with all of the encoding!!!


----------



## Krede (Aug 24, 2019)

@Erick Smith Have you solved the problem with the lags in the preview? I have two monitors (Optix mag37c AOC 144Hz and 60Hz) CRU does not help. I don't know how to put


----------



## Erick Smith (Aug 26, 2019)

In short, lags in the preview could be a number of things, but my eye has been on the Desktop Composite and the GPU has to work to scale a copy of the video over to OBS.  In the past, I used SLi to improve performance, but it's not preferred.


----------



## Xaymar (Sep 4, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

Version 0.3.0pre1: Support for OBS Studio v24.0.0-rc2



> *Changelog*
> *0.3.0pre1*
> 
> Updated libobs to v24.0.0-rc2.
> Fixed a crash when using software rescaling by moving initialization to the encode call.



Read the rest of this update entry...


----------



## walterav1984 (Sep 4, 2019)

Testing with the 0.2 version on a older Intel i3 I noticed the CPU load would almost triple when going 1080i25 to 1080p50.  Altering the preset from prores HQ to prores Standard or LT can also save another 10/20%. 

@Xaymar would it possible to record the audio in your prores preset to LPCM and not AAC codec to prevent more CPU load? 
For example a default final cut x prores master export shows the following audio properties.

ffprobe:
pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)

quicktime:
lpcm 24bit little endian signed 48000 stereo LR

vlc:
DVD LPCM Audio (lpcm) 32bit


----------



## Xaymar (Sep 5, 2019)

walterav1984 said:


> Testing with the 0.2 version on a older Intel i3 I noticed the CPU load would almost triple when going 1080i25 to 1080p50.  Altering the preset from prores HQ to prores Standard or LT can also save another 10/20%.



Going from 1080 Interlaced 25fps to 1080p50 is equivalent to going from 540p25 to 1080p50, which is roughly quadruple the workload. Though I'm not sure how you managed Interlaced output in OBS.



walterav1984 said:


> @Xaymar would it possible to record the audio in your prores preset to LPCM and not AAC codec to prevent more CPU load? For example a default final cut x prores master export shows the following audio properties.



No, this would be an OBS feature that needs to be implemented.


----------



## DukeNukem (Sep 14, 2019)

having problems with hevc recordings.


Spoiler: log





```
03:13:22.777: CPU Name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
03:13:22.777: CPU Speed: 4008MHz
03:13:22.777: Physical Cores: 4, Logical Cores: 8
03:13:22.777: Physical Memory: 16276MB Total, 11294MB Free
03:13:22.777: Windows Version: 6.1 Build 7601 (revision: 23864; 64-bit)
03:13:22.777: Running as administrator: false
03:13:22.777: Aero is Enabled
03:13:22.777: Current Date/Time: 2019-09-14, 03:13:22
03:13:22.777: Browser Hardware Acceleration: false
03:13:22.777: Portable mode: false
03:13:22.879: OBS 24.0.0-rc2 (64-bit, windows)
03:13:22.879: ---------------------------------
03:13:22.880: ---------------------------------
03:13:22.880: audio settings reset:
03:13:22.880:     samples per sec: 48000
03:13:22.880:     speakers:        2
03:13:22.880: ---------------------------------
03:13:22.880: Initializing D3D11...
03:13:22.880: Available Video Adapters:
03:13:22.882:     Adapter 0: NVIDIA GeForce GTX 1070 Ti
03:13:22.882:       Dedicated VRAM: 4175364096
03:13:22.882:       Shared VRAM:    3970215936
03:13:22.882:       output 0: pos={0, 0}, size={1920, 1080}, attached=true
03:13:22.882:     Adapter 1: Intel(R) HD Graphics 530
03:13:22.882:       Dedicated VRAM: 201326592
03:13:22.882:       Shared VRAM:    1711276032
03:13:22.882:       output 0: pos={1920, 0}, size={1920, 1080}, attached=true
03:13:22.884: Loading up D3D11 on adapter NVIDIA GeForce GTX 1070 Ti (0)
03:13:22.902: D3D11 loaded successfully, feature level used: 45056
03:13:23.179: ---------------------------------
03:13:23.179: video settings reset:
03:13:23.179:     base resolution:   1920x1080
03:13:23.179:     output resolution: 1920x1080
03:13:23.179:     downscale filter:  Bicubic
03:13:23.179:     fps:               30/1
03:13:23.179:     format:            NV12
03:13:23.179:     YUV mode:          601/Partial
03:13:23.180: NV12 texture support not available
03:13:23.181: Audio monitoring device:
03:13:23.181:     name: Default
03:13:23.181:     id: default
03:13:23.181: ---------------------------------
03:13:23.182: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
03:13:23.183: Failed to load 'en-US' text for module: 'decklink-ouput-ui.dll'
03:13:23.190: [AMF] AMF Test failed due to one or more errors.
03:13:23.190: Failed to initialize module 'enc-amf.dll'
03:13:23.201: [obs-browser]: Version 2.6.3
03:13:23.204: NVENC supported
03:13:23.217: LoadLibrary failed for 'F:\SSD\Applications\VLC\libvlc.dll': %1 is not a valid Win32 application.
03:13:23.217:  (193)
03:13:23.217: Couldn't find VLC installation, VLC video source disabled
03:13:23.218: No blackmagic support
03:13:23.219: ---------------------------------
03:13:23.219:   Loaded Modules:
03:13:23.219:     win-wasapi.dll
03:13:23.219:     win-mf.dll
03:13:23.219:     win-dshow.dll
03:13:23.219:     win-decklink.dll
03:13:23.219:     win-capture.dll
03:13:23.219:     vlc-video.dll
03:13:23.219:     text-freetype2.dll
03:13:23.219:     rtmp-services.dll
03:13:23.219:     obs-x264.dll
03:13:23.219:     obs-vst.dll
03:13:23.219:     obs-transitions.dll
03:13:23.219:     obs-text.dll
03:13:23.219:     obs-qsv11.dll
03:13:23.219:     obs-outputs.dll
03:13:23.219:     obs-filters.dll
03:13:23.219:     obs-ffmpeg.dll
03:13:23.219:     obs-ffmpeg-encoder.dll
03:13:23.219:     obs-browser.dll
03:13:23.219:     image-source.dll
03:13:23.219:     frontend-tools.dll
03:13:23.219:     enc-amf.dll
03:13:23.219:     decklink-ouput-ui.dll
03:13:23.219:     coreaudio-encoder.dll
03:13:23.219: ---------------------------------
03:13:23.219: ==== Startup complete ===============================================
03:13:23.220: Service '' not found
03:13:23.221: All scene data cleared
03:13:23.221: ------------------------------------------------
03:13:23.225: [WASAPISource::TryInitialize]:[Speakers (Realtek High Definition Audio)] Failed to get initialize audio client: 8889000A
03:13:23.225: [WASAPISource::WASAPISource] Device '{0.0.0.00000000}.{f1e6be10-9cdf-4335-b2a0-6e5c36a6da02}' not found.  Waiting for device
03:13:23.225: [Media Source 'bfv Replay 2019-09-13 19-09-58.mkv']: settings:
03:13:23.225:     input:                   F:/Videos/captured/obsmp test/youtube/bfv Replay 2019-09-13 19-09-58.mkv
03:13:23.225:     input_format:            (null)
03:13:23.225:     speed:                   100
03:13:23.225:     is_looping:              no
03:13:23.225:     is_hw_decoding:          yes
03:13:23.225:     is_clear_on_media_end:   yes
03:13:23.225:     restart_on_activate:     yes
03:13:23.225:     close_when_inactive:     no
03:13:23.226: Switched to scene 'Scene'
03:13:23.226: ------------------------------------------------
03:13:23.226: Loaded scenes:
03:13:23.226: - scene 'Scene':
03:13:23.226:     - source: 'bfv Replay 2019-09-13 19-09-58.mkv' (ffmpeg_source)
03:13:23.226: - scene 'Scene 2':
03:13:23.226: ------------------------------------------------
03:13:25.182: ---------------------------------
03:13:25.183: [FFmpeg aac encoder: 'Track1'] bitrate: 96, channels: 2, channel_layout: 3
03:13:25.183:
03:13:25.189: ==== Recording Start ===============================================
03:13:25.189: [ffmpeg muxer: 'adv_file_output'] Writing file 'F:/Videos/captured/obsmp test/youtube/New folder/2019-09-14_03-13-25.mov'...
03:13:25.424: [obs-ffmpeg-encoder] Failed to initalized encoder 'hevc_nvenc' due to error: Not Translated Yet(-542398533)
03:13:25.424: Error encoding with encoder 'recording_h264'
03:13:25.425: [ffmpeg muxer: 'adv_file_output'] Output of file 'F:/Videos/captured/obsmp test/youtube/New folder/2019-09-14_03-13-25.mov' stopped
03:13:25.425: Output 'adv_file_output': stopping
03:13:25.425: Output 'adv_file_output': Total frames output: 0
03:13:25.425: Output 'adv_file_output': Total drawn frames: 7
03:13:25.426: ==== Recording Stop ================================================
03:13:35.999: Settings changed (outputs)
03:13:35.999: ------------------------------------------------
```




tried nvidia drivers 419.35 and 436.30


----------



## Methanoid (Sep 14, 2019)

is there a zip version of this?, winblows blocks the exe.


----------



## DukeNukem (Sep 14, 2019)

Methanoid said:


> is there a zip version of this?, winblows blocks the exe.


https://github.com/Xaymar/obs-ffmpeg-encoder/releases  click on assets


----------



## Xaymar (Sep 15, 2019)

DukeNukem said:


> having problems with hevc recordings.
> 
> tried nvidia drivers 419.35 and 436.30



Errors like that usually either mean that the settings you used aren't supported, or are invalid.


----------



## DukeNukem (Sep 18, 2019)

Had to set b-frames to 0 because pascal doesn't support hevc b-frames *facepalm*


----------



## Drfoxtrot (Sep 19, 2019)

I am not very knowledgeable on this, but would it be possible to include this?  https://github.com/OpenVisualCloud/SVT-VP9

This is intels SVT-VP9 encoder (they also have encoders for AV1 and HEVC) and these are leagues better than the ones included in FFmpeg by default, they have a plugin for FFmpeg, but I do not know how easy or hard it would be to include. In any case Best of luck.


----------



## Xaymar (Sep 19, 2019)

Drfoxtrot said:


> I am not very knowledgeable on this, but would it be possible to include this?  https://github.com/OpenVisualCloud/SVT-VP9
> 
> This is intels SVT-VP9 encoder (they also have encoders for AV1 and HEVC) and these are leagues better than the ones included in FFmpeg by default, they have a plugin for FFmpeg, but I do not know how easy or hard it would be to include. In any case Best of luck.



If it is included in FFmpeg, yes. Otherwise no. This is only for exposing FFmpeg encoders to the normal UI.


----------



## Drfoxtrot (Sep 20, 2019)

ahhh I see thanks anyways, time to see if I can figure out a way to shove it into OBS, since it is not in FFmpeg by default


----------



## Erick Smith (Sep 21, 2019)

Xaymar said:


> If it is included in FFmpeg, yes. Otherwise no. This is only for exposing FFmpeg encoders to the normal UI.



Maybe they have something planned for their Iris or HD series graphics cards....to replace QuickSync perhaps?


----------



## Chris_faq (Sep 23, 2019)

OBS crash at opening after the plugin installation. Win10 32b OBS Studio 24.0.1


----------



## Xaymar (Sep 24, 2019)

Chris_faq said:


> OBS crash at opening after the plugin installation. Win10 32b OBS Studio 24.0.1



OBS 24.0.1 is not yet supported. The only supported version is 23.2.1 and 24.0.0-rc2 so far.


----------



## Xaymar (Sep 27, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0pre2: Better automatic Color Format support and fixed ProRes



> *Changelog*
> *0.3.0pre2*
> 
> Fixed automatic color format selection always attempting to use hardware formats in libobs 24.x.
> ...



Read the rest of this update entry...


----------



## Xaymar (Sep 28, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0pre3: Improved color format and space, logging settings, and proper framerate



> More Download Links: On GitHub
> 
> *Changelog*
> *0.3.0pre3*
> ...



Read the rest of this update entry...


----------



## Xaymar (Sep 29, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0pre4: Workaround for an FFmpeg ProRes-in-Matroska bug



> All Release Files: On GitHub
> 
> *Changelog*
> *0.3.0pre4*
> ...



Read the rest of this update entry...


----------



## Xaymar (Sep 29, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0pre5: True Hardware Encoding for NVENC



> All Release Files: On GitHub
> 
> *Changelog*
> *0.3.0pre5*
> ...



Read the rest of this update entry...


----------



## Xaymar (Oct 4, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0pre6: Frame Caching, reduced Latency and lower Memory Usage



> *Changelog*
> *0.3.0pre6*
> 
> Implemented Frame Caching for all types of encoders, which further reduces CPU and GPU usage. On a RTX 2080 Ti, a 1080p60 NV12 hardware encode now only takes 2% GPU and 0.004% CPU.
> Fixed an issue where too many frames would be allocated and never deallocated, such as during a full OBS freeze. This is unfortunately not an easy problem to fix as OBS does not have a push/pull (sink/faucet) system and instead expects us...



Read the rest of this update entry...


----------



## Xaymar (Oct 19, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.0 - Full Hardware Encoding, Lower Latency and more!



> Make way, because it's time for full hardware encoding! OBS Studio added this to their built in NVENC a while ago, and today I'm fully releasing it for this plugin. With full hardware encoding, your rendered frame never leaves the GPU, unlike with pseudo hardware encoding where it is first transferred to RAM and then back to the GPU. The benefits of this are much lower GPU usage, reduced game impact, and much lower CPU usage. However due to OBS Studio limitations this restricts you to NV12...



Read the rest of this update entry...


----------



## Xaymar (Oct 31, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.3.1 - Fix for Rescaling



> *Changelog*
> 
> *0.3.1*
> 
> ...



Read the rest of this update entry...


----------



## Kryztoval (Nov 2, 2019)

For some weird reason my install worked perfectly when i had version 0.2.0 but with the 0.3.1 is not showing the plugins anymore. I deleted the program files folder and reinstalled it all and still not showing. O_O

In the log I see this:

09:41:00.017: LoadLibrary failed for '../../obs-plugins/64bit/obs-ffmpeg-encoder.dll': The specified module could not be found.
09:41:00.017:  (126)
09:41:00.017: Module '../../obs-plugins/64bit/obs-ffmpeg-encoder.dll' not loaded

But the file does exist. so idk what is going on.
I also used the zip file from github and got the same end result.


----------



## Xaymar (Nov 2, 2019)

Kryztoval said:


> For some weird reason my install worked perfectly when i had version 0.2.0 but with the 0.3.1 is not showing the plugins anymore. I deleted the program files folder and reinstalled it all and still not showing. O_O
> 
> In the log I see this:
> 
> ...



Version 0.3.1 was built with VS2019, as it produces 6% faster code on average, with a binary size reduction of around 20%. You can get the redistributables needed for it here: https://aka.ms/vs/16/release/vc_redist.x64.exe


----------



## Kryztoval (Nov 2, 2019)

Xaymar said:


> Version 0.3.1 was built with VS2019, as it produces 6% faster code on average, with a binary size reduction of around 20%. You can get the redistributables needed for it here: https://aka.ms/vs/16/release/vc_redist.x64.exe


Yay!!! that indeed fixed it, thanks a lot! I was going crazy!


----------



## Velocity93 (Nov 8, 2019)

hevc not working with your plugins
works with custom ffmpeg

https://obsproject.com/logs/MVxP7W7p_oLjLZu_


----------



## Xaymar (Nov 8, 2019)

Velocity93 said:


> hevc not working with your plugins
> works with custom ffmpeg
> 
> https://obsproject.com/logs/MVxP7W7p_oLjLZu_



B-Frames with HEVC are Turing exclusive. You have a Pascal GPU. I really doubt that "custom ffmpeg" somehow bypasses that limitation cause the hardware doesn't have b-frame support.


----------



## Velocity93 (Nov 8, 2019)

Xaymar said:


> B-Frames with HEVC are Turing exclusive. You have a Pascal GPU. I really doubt that "custom ffmpeg" somehow bypasses that limitation cause the hardware doesn't have b-frame support.


i really am recording with nvenc_hevc
https://obsproject.com/logs/zbyJ0xqIFz-3dqq-

i am editing videos on davinci resolve with h.265 as well


----------



## Xaymar (Nov 8, 2019)

Velocity93 said:


> i really am recording with nvenc_hevc
> https://obsproject.com/logs/zbyJ0xqIFz-3dqq-
> 
> i am editing videos on davinci resolve with h.265 as well



That really doesn't change that you still have a Pascal GPU and Pascal GPUs do not have HEVC B-Frame encoding support. Set B-Frames to 0 and try again, which is the same value of B-frames custom ffmpeg output produces.


----------



## Velocity93 (Nov 8, 2019)

Xaymar said:


> That really doesn't change that you still have a Pascal GPU and Pascal GPUs do not have HEVC B-Frame encoding support. Set B-Frames to 0 and try again, which is the same value of B-frames custom ffmpeg output produces.


i am an idiot or something.
i've been trying to do that but i cant get it to work.
look.


----------



## Xaymar (Nov 8, 2019)

Velocity93 said:


> i am an idiot or something.
> i've been trying to do that but i cant get it to work.
> look.



Set Tier to high and set level to automatic.


----------



## Velocity93 (Nov 8, 2019)

Xaymar said:


> Set Tier to high and set level to automatic.


works great,thanks


----------



## developa (Nov 10, 2019)

Xaymar can help me i compile ffmpeg for windows with libfdk_aac.
obs does not work
Failed to set acodec=libfdk_aac:profile:a=aac_he:signaling=implicit:afterburner=1


----------



## Xaymar (Nov 10, 2019)

developa said:


> Xaymar can help me i compile ffmpeg for windows with libfdk_aac.
> obs does not work
> Failed to set acodec=libfdk_aac:profile:a=aac_he:signaling=implicit:afterburner=1
> View attachment 49055



Wrong support thread, this thread is for the plugin NOT the custom output.


----------



## Xaymar (Nov 16, 2019)

Xaymar updated FFmpeg Encoders for OBS Studio with a new update entry:

0.4.0 - NVENC Improvements, Single Graphics Context and more!



> Who needs lower CPU and GPU usage? Everyone! And that's why the new (Hardware) integration now shares the graphics context with OBS Studio, which should result in an even further reduced CPU and GPU usage for everyone. This change requires that you are using OBS Studio 24.0.x, and ideally you are using 24.0.3 or newer.
> 
> However due to a problem with Mixer streaming, I had to rename the unique id for each encoder so that Mixer streaming works again. Due to that you will lose all your previous...



Read the rest of this update entry...


----------



## Velocity93 (Nov 17, 2019)

can you explain what are the first two encoder options or point me somewhere to read on them please?


----------



## Xaymar (Nov 17, 2019)

Velocity93 said:


> can you explain what are the first two encoder options or point me somewhere to read on them please?



"(Hardware)" is true hardware encoding, the frame never leaves the GPU. Equivalent to the "(new)" nvenc, but with more features.
"(Software)" is pseudo hardware encoding, the frame is transferred to RAM and then back to the GPU that is selected. Equivalent to the "old" nvenc, but also with more features.


----------



## Velocity93 (Nov 17, 2019)

EXCELLENT !
So if anyone wants to stream with their gpu, they can use your plugin and get advantage of the UI instead of writing commands and screw up. testing now!
edit:
one more question.
buffer size can exceed the maximum upload speed or not?


----------



## Xaymar (Nov 17, 2019)

Velocity93 said:


> EXCELLENT !
> So if anyone wants to stream with their gpu, they can use your plugin and get advantage of the UI instead of writing commands and screw up. testing now!
> edit:
> one more question.
> buffer size can exceed the maximum upload speed or not?



Buffer Size is meant to stabilize the bitrate over a specific time frame. You would usually have this at 2x your target bitrate


----------



## Blansi (Nov 18, 2019)

Hello, I've updated the plugin to the 4.0, but now OBS don't load it. I've tried reinstalling OBS, the plugin, update windows... And nothing happens. 


```
13:12:16.917: CPU Name: AMD Ryzen 5 1600X Six-Core Processor           
13:12:16.917: CPU Speed: 3600MHz
13:12:16.917: Physical Cores: 6, Logical Cores: 12
13:12:16.917: Physical Memory: 16334MB Total, 11635MB Free
13:12:16.917: Windows Version: 10.0 Build 18362 (revision: 476; 64-bit)
13:12:16.917: Running as administrator: false
13:12:16.917: Aero is Enabled (Aero is always on for windows 8 and above)
13:12:16.917: Windows 10 Gaming Features:
13:12:16.917:     Game Bar: Off
13:12:16.917:     Game DVR: Off
13:12:16.917:     Game DVR Background Recording: Off
13:12:16.918: Sec. Software Status:
13:12:16.922:     Antivirus de Windows Defender: disabled (AV)
13:12:16.922:     Firewall de Windows: enabled (FW)
13:12:16.922: Current Date/Time: 2019-11-18, 13:12:16
13:12:16.922: Browser Hardware Acceleration: true
13:12:16.922: Portable mode: false
13:12:17.255: OBS 24.0.3 (64-bit, windows)
13:12:17.255: ---------------------------------
13:12:17.255: ---------------------------------
13:12:17.255: audio settings reset:
13:12:17.255:     samples per sec: 44100
13:12:17.255:     speakers:        2
13:12:17.257: ---------------------------------
13:12:17.257: Initializing D3D11...
13:12:17.257: Available Video Adapters: 
13:12:17.259:     Adapter 0: NVIDIA GeForce GTX 1060 6GB
13:12:17.259:       Dedicated VRAM: 2051014656
13:12:17.259:       Shared VRAM:    4269246464
13:12:17.259:       output 0: pos={0, 0}, size={1920, 1080}, attached=true
13:12:17.259:       output 1: pos={1920, 0}, size={1920, 1080}, attached=true
13:12:17.260: Loading up D3D11 on adapter NVIDIA GeForce GTX 1060 6GB (0)
13:12:17.311: D3D11 loaded successfully, feature level used: b000
13:12:17.311: D3D11 GPU priority setup failed (not admin?)
13:12:17.754: ---------------------------------
13:12:17.754: video settings reset:
13:12:17.754:     base resolution:   1920x1080
13:12:17.754:     output resolution: 1280x720
13:12:17.754:     downscale filter:  Bicubic
13:12:17.754:     fps:               30/1
13:12:17.754:     format:            NV12
13:12:17.754:     YUV mode:          601/Partial
13:12:17.754: NV12 texture support enabled
13:12:17.755: Audio monitoring device:
13:12:17.755:     name: Por defecto
13:12:17.755:     id: default
13:12:17.756: ---------------------------------
13:12:17.757: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
13:12:17.758: Failed to load 'en-US' text for module: 'decklink-ouput-ui.dll'
13:12:17.784: [AMF] AMF Test failed due to one or more errors.
13:12:17.784: Failed to initialize module 'enc-amf.dll'
13:12:17.798: [obs-browser]: Version 2.7.15
13:12:17.799: LoadLibrary failed for '../../obs-plugins/64bit/obs-ffmpeg-encoder.dll': (null) (126)
13:12:17.799: Module '../../obs-plugins/64bit/obs-ffmpeg-encoder.dll' not loaded
13:12:17.801: NVENC supported
13:12:17.908: Couldn't find VLC installation, VLC video source disabled
13:12:17.913: No blackmagic support
13:12:17.916: ---------------------------------
13:12:17.916:   Loaded Modules:
13:12:17.916:     win-wasapi.dll
13:12:17.916:     win-mf.dll
13:12:17.916:     win-dshow.dll
13:12:17.916:     win-decklink.dll
13:12:17.916:     win-capture.dll
13:12:17.916:     vlc-video.dll
13:12:17.916:     text-freetype2.dll
13:12:17.916:     rtmp-services.dll
13:12:17.916:     obs-x264.dll
13:12:17.916:     obs-vst.dll
13:12:17.916:     obs-transitions.dll
13:12:17.916:     obs-text.dll
13:12:17.916:     obs-qsv11.dll
13:12:17.916:     obs-outputs.dll
13:12:17.916:     obs-filters.dll
13:12:17.916:     obs-ffmpeg.dll
13:12:17.916:     obs-browser.dll
13:12:17.916:     image-source.dll
13:12:17.916:     frontend-tools.dll
13:12:17.916:     enc-amf.dll
13:12:17.916:     decklink-ouput-ui.dll
13:12:17.916:     coreaudio-encoder.dll
13:12:17.916: ---------------------------------
13:12:17.916: ==== Startup complete ===============================================
13:12:17.916: Service '' not found
13:12:17.918: All scene data cleared
13:12:17.918: ------------------------------------------------
13:12:17.957: WASAPI: Device 'T22B300 (2- NVIDIA High Definition Audio)' initialized
13:12:17.985: WASAPI: Device 'Blue (Blue Snowball)' initialized
13:12:17.986: Switched to scene 'Escena'
13:12:17.986: ------------------------------------------------
13:12:17.986: Loaded scenes:
13:12:17.986: - scene 'Escena':
13:12:17.986: ------------------------------------------------
13:12:18.035: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Mic/Aux)
13:12:18.035:
```


----------



## Xaymar (Nov 18, 2019)

Blansi said:


> Hello, I've updated the plugin to the 4.0, but now OBS don't load it. I've tried reinstalling OBS, the plugin, update windows... And nothing happens.



You need OBS Studio 24.x and the latest VC Redist for VS2019:
  - Windows 7 UCRT Support: https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
  - VC Redist (64-bit): https://aka.ms/vs/16/release/vc_redist.x64.exe


----------



## Blansi (Nov 18, 2019)

Xaymar said:


> You need OBS Studio 24.x and the latest VC Redist for VS2019:
> - Windows 7 UCRT Support: https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
> - VC Redist (64-bit): https://aka.ms/vs/16/release/vc_redist.x64.exe



Nice, now it works! I was using the 3.1 without update VC Redist >.<' Thanks for the fast reply and the good job with the plugin!


----------



## Tenshi3 (Nov 28, 2019)

Having some trouble with this, I seem to be able to record using the H.264/AVC NVidia NVENC (Hardware) encoder, but not stream. In fact I don't seem to be able to stream with any encoders or settings! 

Below is a snippet of the logs when attempting streaming and recording. Any help would be appreciated!



Spoiler: Streaming



14:02:14.514: [obs-ffmpeg-encoder] [opus] Initializing...
14:02:14.514: [obs-ffmpeg-encoder] [opus]   FFmpeg:
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Custom Settings: 
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Standard Compliance: Strict
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Threading: None (with 1 threads)
14:02:14.514: [obs-ffmpeg-encoder] [opus]   Video:
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Input: 0x0 (null) Unknown Partial
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Output: 0x0 (null) Unknown Partial
14:02:14.514: [obs-ffmpeg-encoder] [opus]     On GPU Index: 0
14:02:14.514: [obs-ffmpeg-encoder] [opus]     Framerate: 1/0 (inf FPS)
14:02:14.515: [obs-ffmpeg-encoder] [opus]   Keyframes: 
14:02:14.515: [obs-ffmpeg-encoder] [opus]     Distance: 60 frames
14:02:14.515: [obs-ffmpeg-encoder] Unexpected exception in function '_create': Initializing encoder 'opus' failed with error: Experimental feature (code -733130664).
14:02:14.515: Stream output type 'ftl_output' failed to start!





Spoiler: Recording



14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc] Initializing...
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]   FFmpeg:
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Custom Settings: 
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Standard Compliance: Strict
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Threading: Slice & Frame (with 1 threads)
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]   Video:
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Texture: 1920x1080 nv12 BT.601 625 tv
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Framerate: 30/1 (30.000000 FPS)
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]   Keyframes: 
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]     Distance: 60 frames
14:02:16.295: [obs-ffmpeg-encoder] [h264_nvenc]   Nvidia NVENC:
14:02:16.296: [obs-ffmpeg-encoder] [h264_nvenc]     Preset: default

etc..


----------



## Xaymar (Nov 28, 2019)

Tenshi3 said:


> Having some trouble with this, I seem to be able to record using the H.264/AVC NVidia NVENC (Hardware) encoder, but not stream. In fact I don't seem to be able to stream with any encoders or settings!
> 
> Below is a snippet of the logs when attempting streaming and recording. Any help would be appreciated!


Which version of the plugin are you using?


----------



## Tenshi3 (Nov 28, 2019)

0.4.0 with OBS 24.0.3


----------



## Xaymar (Nov 28, 2019)

Tenshi3 said:


> 0.4.0 with OBS 24.0.3



Please upload a full log file then, the snippets don't really help me figure out the issue at all.


----------



## Tenshi3 (Nov 28, 2019)

Here I start and stop a record, then attempt a stream. Let me know if you need anything else


----------



## Xaymar (Nov 28, 2019)

Tenshi3 said:


> Here I start and stop a record, then attempt a stream. Let me know if you need anything else



Odd, it's still finding the opus encoder even though it has been completely renamed from 'opus' to 'obs-ffmpeg-encoder_opus'. Since audio encoders are currently not implemented, your only choice would be to use Mixer RTMP or uninstall the plugin until they are supported (which may be quite some time)


----------



## Tenshi3 (Nov 28, 2019)

Ok, well thanks for looking into it. I've removed the plugin for now as I think the FTL is probably more important for me.

I'll keep an eye out for updates and let me know if I can be useful as a test dummy for future versions!


----------



## BangBang1337 (Dec 3, 2019)

I'm new to OBS but I have a quick question about this plugin. I see most people use this for recording but can this be used for streaming as well? Does this get better quality compared to the newest version of Nvidia NVENC? I am running a new Turing GPU. If I could get even more quality out of it then what I'm getting now that would be great!.

Also, if you can stream with it does anyone have any settings that could allow me to get the max quality on twitch streaming at 100x900 6K bit rate? Any help would be great! Thank you!


----------



## Nicktacular42 (Dec 3, 2019)

Hi, I am new to using the forums but I have an issue. I installed the plugin with the installer. but it hasn't worked? Bit unsure why
Any help would be appreciated.


----------



## Xaymar (Dec 3, 2019)

BangBang1337 said:


> I'm new to OBS but I have a quick question about this plugin. I see most people use this for recording but can this be used for streaming as well? Does this get better quality compared to the newest version of Nvidia NVENC? I am running a new Turing GPU. If I could get even more quality out of it then what I'm getting now that would be great!.
> 
> Also, if you can stream with it does anyone have any settings that could allow me to get the max quality on twitch streaming at 100x900 6K bit rate? Any help would be great! Thank you!



Quality is subjective and mostly trial and error. There are no one-shot settings, though it is possible to get slightly better quality than the built in nvenc. In theory the best settings are 2 B-Frames, High Quality CBR, Two Pass Enabled, B-Frame REference mode half, No Spatial AQ, Temporal AQ Enabled, 32 Frames Lookahead, No Weighted Prediction. However this changes per game, with some games preferring 1 B-Frame or even 3 B-Frames.



Nicktacular42 said:


> Hi, I am new to using the forums but I have an issue. I installed the plugin with the installer. but it hasn't worked? Bit unsure why
> Any help would be appreciated.



You need Visual C++ Redist 2019 and the latest Windows 10 update for these:
  - UCRT: https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
  - VC Redist (64-bit): https://aka.ms/vs/16/release/vc_redist.x64.exe


----------



## BangBang1337 (Dec 3, 2019)

Xaymar said:


> Quality is subjective and mostly trial and error. There are no one-shot settings, though it is possible to get slightly better quality than the built in nvenc. In theory the best settings are 2 B-Frames, High Quality CBR, Two Pass Enabled, B-Frame REference mode half, No Spatial AQ, Temporal AQ Enabled, 32 Frames Lookahead, No Weighted Prediction. However this changes per game, with some games preferring 1 B-Frame or even 3 B-Frames.



I mainly play FPS games like COD. But I will certainly try this out. Thank you very much. I'm always doing my best to get the best possible quality. As for me. I look for a constantly sharp and clear image. The less pixelation on movement the better kinda deal.


----------



## BangBang1337 (Dec 3, 2019)

Xaymar said:


> Quality is subjective and mostly trial and error. There are no one-shot settings, though it is possible to get slightly better quality than the built in nvenc. In theory the best settings are 2 B-Frames, High Quality CBR, Two Pass Enabled, B-Frame REference mode half, No Spatial AQ, Temporal AQ Enabled, 32 Frames Lookahead, No Weighted Prediction. However this changes per game, with some games preferring 1 B-Frame or even 3 B-Frames.
> 
> 
> 
> ...


Also as for my question from before. What would be the best preset to try these settings with? Or does that not matter? I see there's a profile spot as well which I have set too high. I'm not sure what the highest quality option is. OBS has a ton of options compared to what I am used to lol


----------



## Xaymar (Dec 3, 2019)

BangBang1337 said:


> I mainly play FPS games like COD. But I will certainly try this out. Thank you very much. I'm always doing my best to get the best possible quality. As for me. I look for a constantly sharp and clear image. The less pixelation on movement the better kinda deal.



Fast paced games prefer 2 B-Frames or even 1 B-Frame. With very low bitrates, even 0 B-Frames might be beneficial.



BangBang1337 said:


> Also as for my question from before. What would be the best preset to try these settings with? Or does that not matter?



Preset only sets up the basic parameters. For the highest quality, select "High Quality". For example, these are my settings which work quite well:


----------



## BangBang1337 (Dec 3, 2019)

Xaymar said:


> Fast paced games prefer 2 B-Frames or even 1 B-Frame. With very low bitrates, even 0 B-Frames might be beneficial.
> 
> 
> 
> Preset only sets up the basic parameters. For the highest quality, select "High Quality". For example, these are my settings which work quite well:


I see you have spatial AQ On vs off and look ahead to 16 vs 32? Would I benefit from those being the same or sticking to 32 frames look ahead off?


----------



## Xaymar (Dec 4, 2019)

BangBang1337 said:


> I see you have spatial AQ On vs off and look ahead to 16 vs 32? Would I benefit from those being the same or sticking to 32 frames look ahead off?



Spatial AQ is useful because most of my streams are text or development, very few games. In game streams I have it off.

Lookahead depends on how much you want GPU usage you want to take away from the game. In practice there's next to no noticable difference between 16, 24 and 32, but 32 will of course give the best quality (at the cost of being 32 frame delayed).


----------



## BangBang1337 (Dec 4, 2019)

Xaymar said:


> Spatial AQ is useful because most of my streams are text or development, very few games. In-game streams, I have it off.
> 
> Lookahead depends on how much you want GPU usage you want to take away from the game. In practice, there's next to no noticeable difference between 16, 24 and 32, but 32 will, of course, give the best quality (at the cost of being 32 frames delayed).



Ah, so maxing this option out wouldn't be so bad for me seeing as I use a Dual PC set up. So I don't mind having it use the entire GPU. Thank you very much for all the help. I'm excited to try these settings out shortly!


----------



## Weizhi (Dec 6, 2019)

If the FFmpeg encoder can also support 10bit, that would be great.

_MOD NOTE: Original message edited to translate to English._


----------



## Xaymar (Dec 6, 2019)

Weizhi said:


> 如果FFmpeg编码器 也可以支持10bit，那就太好了  。



Anything the encoders in ffmpeg supports is also supported by the plugin. ProRes is 10-bit btw, however OBS Studio is not, so a conversion from 8 to 10-bit is done.


----------



## cs9k (Dec 7, 2019)

Hello!  I've been using your encoders for a while and would like to thank you for the work you've done so far for OBS Studio!  I'm on current NVidia drivers 441.41, OBS Studio 24.0.3, with the latest VC Redist installed, using an NVidia GTX 1080 SC (Pascal).

I regularly record my gameplay locally.  In OBS Studio, with the NV12 color format selected, all 264 and 265 NVENC encoders work as expected (obs-native, custom ffmpeg, and Xaymar ffmpeg).  The obs-native NVENC and custom ffmpeg encoders both in 264 and 265, will accept the I444 color format and record it properly, however, when I select the I444 color format with the Xaymar encoder, I receive the following warnings when I try to start the recording:

12:13:15.668: warning: deprecated pixel format used, make sure you did set range correctly
12:13:15.668: warning: Warning: data is not aligned! This can lead to a speed loss
12:13:19.054: error:   Unsupported pixel format: yuv444p
12:13:19.054: [obs-ffmpeg-encoder] Unexpected exception in function '_create_texture': Failed to initialize AVHWFramesContext..

I have spent hours googling and tried virtually every encoder setting and command line argument, but the Xaymar encoders only function properly with the NV12 color format selected.

If I444 is a feature that is possible to add in the future, I look forward to it!  If not, then that's fine; I444 capability with your encoder would just be nice to have.  

Thank you for your help! <3


----------



## Xaymar (Dec 8, 2019)

cs9k said:


> If I444 is a feature that is possible to add in the future, I look forward to it!  If not, then that's fine; I444 capability with your encoder would just be nice to have.



I444 requires you to select the proper profile for it, H264 requires you to select high444p. I don't know if the encoders support hardware I444, so you might have to use the software-assisted versions for those.


----------



## cs9k (Dec 8, 2019)

Thank you for the prompt reply.  After some more experimenting, it appears that you are correct, despite what NVidia's encoder/decoder matrix would imply.  

Thanks, and keep being awesome!


----------



## Blansi (Dec 8, 2019)

Quick question: What are the best options to achieve max quality recording? I'm using it to record my streams, actually I'm getting a nice quality, but I would like to know from the expert :P

P.S: I'm recording PS4 with elgato HD60


----------



## Weizhi (Dec 9, 2019)

Thank you for the prompt reply.
Please tell me how to code setting,nv12+10bit streams.

thank you.


----------



## Xaymar (Dec 11, 2019)

Weizhi said:


> Thank you for the prompt reply.
> Please tell me how to code setting,nv12+10bit streams.
> 
> thank you.



You can't stream in 10 bit unless you find a H264 encoder and decoder capable of a 10-bit profile. To my knowledge, no current hardware encoder supports it.


----------



## Weizhi (Dec 12, 2019)

Xaymar said:


> You can't stream in 10 bit unless you find a H264 encoder and decoder capable of a 10-bit profile. To my knowledge, no current hardware encoder supports it.


Can the FFmpeg encoder call a 10-bit x264 software encoder to encode the streams?


----------



## Xaymar (Dec 12, 2019)

Weizhi said:


> Can the FFmpeg encoder call a 10-bit x264 software encoder to encode the streams?



Yes, if implemented. Currently that option is hidden behind a debug build for sanity reasons. Mostly for my own sanity.


----------



## laslite (Dec 28, 2019)

Hi all,

I would like pass sur custom command:
-vf "tblend=average,framestep=2 

But that change nothing but in my "normal" ffmpeg it work. 

Could you give me correct syntax ?

Regards


----------



## Xaymar (Dec 29, 2019)

laslite said:


> Hi all,
> 
> I would like pass sur custom command:
> -vf "tblend=average,framestep=2
> ...



You can't set ffmpeg filter options, only ffmpeg encoder options. For the former, try custom ffmpeg output.


----------



## tulenik (Jan 4, 2020)

It seems like Presets aren't doing anything. Is this "OK for now" or am I doing something bad?
I can use HEVC NVENC when using old ffmpeg interface but I cannot use it with this plugin; when changing presets, all settings below remain still the same.


----------



## Xaymar (Jan 4, 2020)

tulenik said:


> It seems like Presets aren't doing anything. Is this "OK for now" or am I doing something bad?
> I can use HEVC NVENC when using old ffmpeg interface but I cannot use it with this plugin; when changing presets, all settings below remain still the same.



Presets do not modify the settings below visually. If you leave them at default, you will get the values defined by the preset, otherwise your own values will be used.


----------



## BluePeer (Jan 7, 2020)

Hi
I have a "problem" by encoding with ffmpeg 264 and 264
In random timeranges the encoder stop working
OBS triggers a render stoped but at wired points
if i stream and record bottom with nvenc and it stops
obs only see one stopping the secound remains but stopped too encode process will remain active until obs close
no error message in log file
first i think there is some overload (but encoder never over 25% usage) gpu and vram load fine gpu 40-60% vram 40-95%
crashes on vram down 70% too

is there a way to find out why the encoder crash?

the only reply it gives (not every time) is
[obs-ffmpeg-encoder] Failed to receive packet: Invalid argument (-22).

i try to switch the stream on x264 to prevent the nvenc of crash by overload
but that makes the same issue the time to the crash increases a little bit by 1.2x-1.5x but with same result
it makes no different if i use on nvenc the 264 or 265 settings make no different too try about 100 different combinations of settings all result in this error only the time to is variable 

only i seen as a factor for crash is high motion there is a increased chance to crash if you have long time really fast movement on over 80% of the resolution 

GPU is a 1660 Super 6GB


----------



## Xaymar (Jan 7, 2020)

GPU and CPU load are caused by the encoder itself, which is provided by the hardware manufacturer - in this case Nvidia. Any excess GPU usage is from OBS Studio, from the Driver or from ffmpeg itself (which is a bit hard to believe).

Crashes in hardware encoders usually come from unsatisfactory cooling, stability issues, bad CPU overclocking, memory corruption, gpu overclocking, and many other reasons. Since you can reproduce the crash on another encoder which uses the CPU only and not provided by the plugin, the plugin is not at fault and you are using the wrong thread to get support.


----------



## BluePeer (Jan 8, 2020)

i think you misunderstand something

"Since you can reproduce the crash on another encoder which uses the CPU only and not provided by the plugin, the plugin is not at fault and you are using the wrong thread to get support. "

thats wrong its still the nvenc

First the issue started on use 2 nvenc sessions
stream and record so i switched to
stream x264 and record nvenc to reduce the load if the nvenc is overloaded 
but in this setup with the half load on nvenc made the same -22 error on the nvenc session

There is no OC on cpu/memory 
the cpu is watercooled ~40°c
the gpu is base none oc too with 54°c

but the error report with the -22 does not tells me anything i can work on


----------



## Xaymar (Jan 8, 2020)

BluePeer said:


> i think you misunderstand something
> 
> "Since you can reproduce the crash on another encoder which uses the CPU only and not provided by the plugin, the plugin is not at fault and you are using the wrong thread to get support. "
> 
> ...



Sorry, but your english writing is very hard to read. A log file of the problem would have made things much easier to understand, but now I get it. Unfortunately I can't reproduce this issue on my system, which points to it being an issue with your exact system setup. What exactly went wrong is something you'll have to find out yourself, including the steps to reproduce the problem.

My best guess is that your exact settings actually take a little bit longer than 1 frame to encode, which causes the frame queue to grow until it runs out of memory on the CPU or GPU (whichever comes first). The size of the frame queue is currently not limited, and this will likely change one FFmpeg Encoders is merged into StreamFX. Currently there is a feature freeze until the merge into StreamFX can be done, after which maintaining the plugins will be much easier.


----------



## BuildMineSurvive (Jan 12, 2020)

Hey! I have a question. I installed it on my system and everything is working amazingly! But I had 2 friends install it in the same way, and the encoders don't show up for them (both Nvidia GPU users) Are there any prerequisite programs or plugins required for this to work? And does it need to be in the default OBS install folder? Also, just so I can try and get it working on their PCs, do you have a download with just the plugin folders and files so I can try and install it manually? I've been using OBS for years so it shouldn't be that hard.

Thanks :D


----------



## Xaymar (Jan 12, 2020)

BuildMineSurvive said:


> Hey! I have a question. I installed it on my system and everything is working amazingly! But I had 2 friends install it in the same way, and the encoders don't show up for them (both Nvidia GPU users) Are there any prerequisite programs or plugins required for this to work? And does it need to be in the default OBS install folder? Also, just so I can try and get it working on their PCs, do you have a download with just the plugin folders and files so I can try and install it manually? I've been using OBS for years so it shouldn't be that hard.
> 
> Thanks :D



See Installation Guide, Visual C++ 2019 Redist is required to run the plugin.


----------



## Xaymar (Jan 13, 2020)

FFmpeg Encoders is being merged into StreamFX to drastically reduce the maintenance work required. This also allows me to produce higher quality updates as both plugins mostly rely on the same code to interface with libobs (most of which just deals with workarounds).


----------

