AMD Hardware Encoder(s) [Deleted]

Status
Not open for further replies.

Lordmau5

New Member
Just made an account to post in here.

First off, thanks for the hard work on the encoder, it was damn time someone updated it! :)

However, I can't set any decent settings or otherwise OBS is literally eating up ALL my RAM!

It went higher, but that was kinda the peak. Windows decided to close a few programs at that point (which was a good thing)

Could you perhaps look into that?
I'd really like to use this encoder, but it's literally impossible with this RAM leak.

~ Greets
 

chummy

Member
@Lordmau5 share your settings and card, but let start with some probably fix for your problem. Are you using 1080p@60fps? If answer is yes, try 1080p@30fps and 720p@60fps. This memory leak is only happening for me in 1080p@60fps recording.
 

Xaymar

Active Member
@Xaymar where did AMD say something they are going to release new SDK soon? I dont see anything from them.

Waiting AMD update their SDK Media: http://goo.gl/nbTNHy
Both in presentations and recently on reddit. Strange that reddit gets more attention than their own developer forum, isn't it? ^^

They talked about it in polaris presentations and they need to update the SDK/drivers in order to support this new features and fix some bugs/incoherences. The last update was in 2014... they need to do it otherwise they will stay far behind nvidia in this matter.
Well the last official update was in 2015. I don't think the code in it changed much though.

Just made an account to post in here.

First off, thanks for the hard work on the encoder, it was damn time someone updated it! :)

However, I can't set any decent settings or otherwise OBS is literally eating up ALL my RAM!

It went higher, but that was kinda the peak. Windows decided to close a few programs at that point (which was a good thing)

Could you perhaps look into that?
I'd really like to use this encoder, but it's literally impossible with this RAM leak.

~ Greets
Already known, fixed in 1.2.0 which I'll release when it's working completely. ^^

@Lordmau5 share your settings and card, but let start with some probably fix for your problem. Are you using 1080p@60fps? If answer is yes, try 1080p@30fps and 720p@60fps. This memory leak is only happening for me in 1080p@60fps recording.
The leak doesn't happen due to settings but due to the fact that I queue up incoming frames instead of just dropping them like other encoders. After I discovered that I have no way of telling OBS that the encoder is overloaded, I dropped that idea in 1.2.0 and went with the "submit until full" approach. Faster and all memory leaks are gone.
 

wazer

New Member
Code:
15:32:14.124: ---------------------------------
15:32:14.143: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-component-uvd-windesktop64.dll' not found, loading of module failed
15:32:14.143: ---------------------------------
15:32:14.147: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-component-vc-windesktop64.dll' not found, loading of module failed
15:32:14.147: ---------------------------------
15:32:14.151: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-component-vce-windesktop64.dll' not found, loading of module failed
15:32:14.151: ---------------------------------
15:32:14.155: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-component-vcedem-windesktop64.dll' not found, loading of module failed
15:32:14.155: ---------------------------------
15:32:14.160: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-component-vp-windesktop64.dll' not found, loading of module failed
15:32:14.160: ---------------------------------
15:32:14.160: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/amf-core-windesktop64.dll' not found, loading of module failed
15:32:14.160: ---------------------------------
15:32:14.164: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/AMFCInterface.dll' not found, loading of module failed
15:32:14.164: ---------------------------------
15:32:14.168: Loading module: coreaudio-encoder.dll
15:32:14.169: [CoreAudio encoder]: Failed loading library 'CoreAudioToolbox.dll'
15:32:14.169: [CoreAudio encoder]: Couldn't load CoreAudio AAC encoder
15:32:14.170: ---------------------------------
15:32:14.173: Loading module: image-source.dll
15:32:14.174: ---------------------------------
15:32:14.178: Loading module: obs-ffmpeg.dll
15:32:14.179: LoadLibrary failed for 'nvEncodeAPI64.dll', error: 126
15:32:14.179: ---------------------------------
15:32:14.183: Loading module: obs-filters.dll
15:32:14.184: ---------------------------------
15:32:14.192: Loading module: obs-outputs.dll
15:32:14.192: ---------------------------------
15:32:14.196: Loading module: obs-qsv11.dll
15:32:14.705: ---------------------------------
15:32:14.709: Loading module: obs-transitions.dll
15:32:14.709: ---------------------------------
15:32:14.713: Loading module: obs-x264.dll
15:32:14.713: ---------------------------------
15:32:14.717: Loading module: rtmp-services.dll
15:32:14.718: ---------------------------------
15:32:14.724: Loading module: text-freetype2.dll
15:32:14.727: ---------------------------------
15:32:14.732: Loading module: vlc-video.dll
15:32:14.733: Couldn't find VLC installation, VLC video source disabled
15:32:14.733: ---------------------------------
15:32:14.781: Loading module: win-amf.dll
15:32:14.782: ---------------------------------
15:32:14.788: Loading module: win-capture.dll
15:32:15.409: ---------------------------------
15:32:15.413: Loading module: win-decklink.dll
15:32:15.426: No blackmagic support
15:32:15.426: Failed to start search for DeckLink devices
15:32:15.426: ---------------------------------
15:32:15.430: Loading module: win-dshow.dll
15:32:15.438: ---------------------------------
15:32:15.446: Loading module: win-mf.dll
15:32:15.447: [Media Foundation encoder]: plugin is disabled for performance reasons on Windows versions less than 8
15:32:15.578: ---------------------------------
15:32:15.582: Loading module: win-wasapi.dll
15:32:15.585: =====================================================================
Your log tells me that the win-amf.dll is missing - make sure that you extracted it correctly!



Transcoding is needed for the proper codec header (at least for Twitch, YouTube accepts the others just fine). Unfortunately that means that you'll have to find proper working settings for your GPU - a configuration that works fine on a R9 390 for example doesn't have to do the same on yours.



See, that's what I ment - trial and error. And waiting for AMD to finish the new SDK that they recently talked about.
Does "when" selecting Transcoding apply other things/settings or variables in the code "we" cannot see?
What's the exact difference, we cannot trick it some way?


Old VCE branch working fine with quality on the highest
Well would be really nice if other coder could reply on this too https://obsproject.com/forum/members/jackun.17219/
 

aquamacho

New Member
Xaymar said:
Your log tells me that the win-amf.dll is missing - make sure that you extracted it correctly!
But its there in 64 and 32 bit folders "obs-studio\obs-plugins\64bit\win-amf.dll" like others dll`s or im doing something wrong here?

Or what exactly you mean by "extracting it correctly"
Im confused.
 

Attachments

Xaymar

Active Member
Does "when" selecting Transcoding apply other things/settings or variables in the code "we" cannot see?
What's the exact difference, we cannot trick it some way?


Old VCE branch working fine with quality on the highest
Well would be really nice if other coder could reply on this too https://obsproject.com/forum/members/jackun.17219/
Its not, look closer, i did some more tests, it its reduced by a lot but its still there.
This might be fixed in 1.2.0, since (I think) it was related to incorrect priorities for dropped packets being set. This could cause a valid packetstream to reference non-existing packets, which should be fixed once 1.2.0 is out.

But its there in 64 bit folder "obs-studio\obs-plugins\64bit\win-amf.dll" like others dll`s or im doing something wrong here?

Or what exactly you mean by "extracting it correctly"
That's strange, it doesn't even see the dll then. Make sure that you have the Visual Studio 2015 Redistributables installed for both x86 and x64.
 

aquamacho

New Member
I have them installed, even 4.5 gb community update :(
Something really weird going on with M$ Visual studio recently, like some games not working when ppl have them installed anyway.

Thats exactly why i hate M$ so ***** much, right here. Ugghh this is so frusterating.

Well, anyways thanks for your help and for your time.
 

Attachments

Last edited:

Lordmau5

New Member
Already known, fixed in 1.2.0 which I'll release when it's working completely. ^^

The leak doesn't happen due to settings but due to the fact that I queue up incoming frames instead of just dropping them like other encoders. After I discovered that I have no way of telling OBS that the encoder is overloaded, I dropped that idea in 1.2.0 and went with the "submit until full" approach. Faster and all memory leaks are gone.
Nice! Glad to hear that! :)
Looking forward to it.
Once again, thank you so much for doing this :D
 

Morbesity

New Member
I love this very much, higher quality recordings and streaming! The only concern that i have it i wish there was a more comprehensible guide on every setting, ive used the one on github but it can be hard to understand... :(
 

Xaymar

Active Member
Should you switch the "in bits" to "in kbits"? [Pretty sure you pulled that from jackun]
The code for this plugin was written entirely from scratch, jackun helped out with knowledge here and there and fixing some typo's I did. It'll be in kbit in the simple encoder.

I love this very much, higher quality recordings and streaming! The only concern that i have it i wish there was a more comprehensible guide on every setting, ive used the one on github but it can be hard to understand... :(
It's mostly trial and error anyway. Try and try again until you find a configuration that works for your causes.
 

Flaim

New Member
for some odd reason my bitrate spikes way above the target bitrate in high motion scenes. i don't know whether that happens because i'm facing the same ".dll not found" issue as mentioned on page 2, or if that's from the reported amd 16.7.x driver updates that are mentioned on the github issues page.

edit: using the 1.2.0pre2 version, but it didn't work with pre1 and 1.1.2 either.
edit2: as you can see in the png the dlls are there
 

Attachments

Last edited:

Xaymar

Active Member
Xaymar updated VCE-based Encoder (AMD Media Framework) with a new update entry:

1.2.0pre2 - The Remaking

  • Changed: Language files were updated to match new strings.
  • Changed: en-US language file now shows slightly more detail.
  • Changed: Bitrate is now limited to the value returned by AMF for the Encoder Type.
  • Changed: Advanced Encoder is now named "H264 VCE Encoder [Advanced] (AMD Media Framework)"
  • Changed: Encoder Type and Profile are now two seperate fields. (Advanced Encoder)
  • Changed: Motion Estimation is now a drop down instead of two checkboxes. (Advanced Encoder)
  • Changed: Quality Preset, Profile and Profile Level are now applied last, like shown in AMF examples.
  • Fixed: Plugin will now correctly show it is overloaded instead of eating all available memory.
  • Fixed: Encoder will now tell AMF the correct frame time instead of giving it estimated time. This caused insane bitrates to appear.
  • Fixed: De-Blocking Filter would incorrectly write to Number of B-Pictures
  • Fixed: Decode timestamp was wrong in output files.
  • Added: Additional capability logging.
  • Added: Quality Preset option 'None' which does exactly what it says - applies no quality preset. (Advanced Encoder)
  • Added: Checkbox to reset values to default. (Advanced Encoder)
  • Added: Checkbox to update values from AMD Media Framework if they were left at default. (Advanced Encoder)
Read the rest of this update entry...
 
Last edited:

Xaymar

Active Member
for some odd reason my bitrate spikes way above the target bitrate in high motion scenes. i don't know whether that happens because i'm facing the same ".dll not found" issue as mentioned on page 2, or if that's from the reported amd 16.7.x driver updates that are mentioned on the github issues page.

edit: using the 1.2.0pre2 version, but it didn't work with pre1 and 1.1.2 either.
edit2: as you can see in the png the dlls are there
The log file is missing the part where you start recording/streaming, please upload one that has that in it.
 

Xaymar

Active Member
hope this one contains the required information.
Code:
20:38:27.631: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE_H264_Encoder::VCE_H264_Encoder> Initializing...
20:38:27.631: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::H264> Attempting to create AVC Encoder...
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetMemoryType> Set to Host.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetSurfaceFormat> Set to NV12.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetUsage> Set to Transcoding.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetFrameSize> Set to 1920x1080.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetFrameRate> Set to 30/1.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetMaxOfLTRFrames> Set to 0.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetScanType> Set to Progressive.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetRateControlMethod> Set to Constant Bitrate.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::EnableFrameSkipping> Set to Disabled.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::EnableFillerData> Set to Disabled.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::EnableEnforceHRD> Set to Disabled.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetGOPSize> Set to 60.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetVBVBufferSize> Set to 20000000.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetInitialVBVBufferFullness> Set to 1.000000.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetMaximumAccessUnitSize> Set to 0.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetBPictureDeltaQP> Set to 4.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetReferenceBPictureDeltaQP> Set to 2.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetMinimumQP> Set to 18.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetMaximumQP> Set to 42.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetIFrameQP> Set to 25.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetPFrameQP> Set to 25.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetBFrameQP> Set to 25.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetTargetBitrate> Set to 7680000.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetTargetBitrate> Set to 7680000.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetHeaderInsertionSpacing> Set to 0.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetNumberOfBPictures> Set to Disabled.
20:38:27.661: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetDeblockingFilterEnabled> Set to Enabled.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetReferenceToBFrameEnabled> Set to Enabled.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetIDRPeriod> Set to 60.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetInfraRefreshMBsPerSlotInMacroblocks> Set to 0.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetNumberOfSlicesPerFrame> Set to 1.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetHalfPixelMotionEstimationEnabled> Set to Enabled.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetQuarterPixelMotionEstimationEnabled> Set to Enabled.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetQualityPreset> Set to Quality.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetProfile> Set to High.
20:38:27.662: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE::SetProfile> Set to 4.2.
20:38:27.674: [AMF Encoder 1.2.0pre2] <AMFEncoder::VCE_H264_Encoder::VCE_H264_Encoder> Complete.
Enable Frame Skipping: Disabled (Set to Enabled)
Enable Filler Data: Disabled (Set to Enabled)
GOP Size: 60 (Should be equal to Framerate)
VBV Buffer Size: 20000000 (20mbit) (Should be equal to Target Bitrate for CBR)
Target Bitrate: 7680000 (7.68mbit)
Peak Bitrate 7680000 (7.68mbit) (There's no need to set this with CBR)
Reference to B-Frames: Enabled (Set to Disabled)

That should fix it.
 

Flaim

New Member
Enable Frame Skipping: Disabled (Set to Enabled)
Enable Filler Data: Disabled (Set to Enabled)
GOP Size: 60 (Should be equal to Framerate)
VBV Buffer Size: 20000000 (20mbit) (Should be equal to Target Bitrate for CBR)
Target Bitrate: 7680000 (7.68mbit)
Peak Bitrate 7680000 (7.68mbit) (There's no need to set this with CBR)
Reference to B-Frames: Enabled (Set to Disabled)

That should fix it.
unfortunately not and on top of it frame skipping causes the craziest artifacting randomly.

edit: gonna try "default" tomorrow.
 
Status
Not open for further replies.
Top