Question / Help Enable NVENC encoding on AWS EC2 g2.xlarge win server 2012 instance?

dawggpie

New Member
Hi, can't seem to get OBS working with NVENC h/w encoding running on a AWS EC2 G2.2xl instance running windows 2012. I've installed the latest Nvidia GRID drivers and the Nvidia Capture SDK. This server has the K520 GPU which is supposed to support NVENC. Anyone had success with this? Help appreciated!

I'm seeing the following error in the log:

[NVENC encoder: 'simple_h264_recording'] Failed to open NVENC codec: Function not implemented

Full log output below:

07:56:56.354: CPU Name: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
07:56:56.354: CPU Speed: 2599MHz
07:56:56.354: Physical Cores: 4, Logical Cores: 8
07:56:56.354: Physical Memory: 15359MB Total, 13205MB Free
07:56:56.354: Windows Version: 6.3 Build 9600 (revision: 17415; 64-bit)
07:56:56.354: Running as aadministrator: true
07:56:56.354: Aero is Enabled (Aero is always on for windows 8 and above)
07:56:56.355: Portable mode: false
07:56:56.497: OBS 21.1.0 (64bit, windows)
07:56:56.498: ---------------------------------
07:56:56.498: ---------------------------------
07:56:56.498: audio settings reset:
07:56:56.498: samples per sec: 44100
07:56:56.498: speakers: 2
07:56:56.500: ---------------------------------
07:56:56.500: Initializing D3D11... 07:56:56.500: Available Video Adapters:
07:56:56.500: Adapter 1: NVIDIA GRID K520
07:56:56.500: Dedicated VRAM: 4157407232
07:56:56.500: Shared VRAM: 3757891584
07:56:56.500: output 1: pos={0, 0}, size={1920, 1080}, attached=true
07:56:56.502: Loading up D3D11 on adapter NVIDIA GRID K520 (0)
07:56:56.520: D3D11 loaded successfully, feature level used: 45056
07:56:57.402: ---------------------------------
07:56:57.402: video settings reset:
07:56:57.402: base resolution: 1920x1080
07:56:57.402: output resolution: 1920x1080
07:56:57.402: downscale filter: Bicubic
07:56:57.402: fps: 60/1
07:56:57.402: format: NV12
07:56:57.402: YUV mode: 601/Partial
07:56:57.404: Audio monitoring device:
07:56:57.404: name: Speakers (Razer Surround Audio Controller)
07:56:57.404: id: {0.0.0.00000000}.{66cf6dbe-42da-42f3-a729-bc0c55f86725}
07:56:57.404: ---------------------------------
07:56:57.408: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
07:56:57.425: [AMF] AMF Test failed due to one or more errors.
07:56:57.425: Failed to initialize module 'enc-amf.dll'
07:56:57.434: NVENC supported
07:56:57.479: Couldn't find VLC installation, VLC video source disabled
07:56:57.482: No blackmagic support
07:56:57.486: ---------------------------------
07:56:57.486: Loaded Modules:
07:56:57.486: win-wasapi.dll
07:56:57.486: win-mf.dll
07:56:57.486: win-dshow.dll
07:56:57.486: win-decklink.dll
07:56:57.486: win-capture.dll
07:56:57.486: vlc-video.dll
07:56:57.486: text-freetype2.dll
07:56:57.486: rtmp-services.dll
07:56:57.486: obs-x264.dll
07:56:57.486: obs-vst.dll
07:56:57.486: obs-transitions.dll
07:56:57.486: obs-text.dll
07:56:57.486: obs-qsv11.dll
07:56:57.486: obs-outputs.dll
07:56:57.486: obs-filters.dll
07:56:57.486: obs-ffmpeg.dll
07:56:57.486: image-source.dll
07:56:57.486: frontend-tools.dll
07:56:57.486: enc-amf.dll
07:56:57.486: coreaudio-encoder.dll
07:56:57.486: ---------------------------------
07:56:57.486: ==== Startup complete ===============================================
07:56:57.487: Service '' not found
07:56:57.491: All scene data cleared
07:56:57.491: ------------------------------------------------
07:56:57.522: WASAPI: Device 'Speakers (Razer Surround Audio Controller)' initialized
07:56:57.531: WASAPI: Device 'Microphone (Steam Streaming Microphone)' initialized
07:56:57.579: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
07:56:57.745: Switched to scene 'Scene'
07:56:57.746: ------------------------------------------------
07:56:57.746: Loaded scenes:
07:56:57.746: - scene 'Scene':
07:56:57.746: - source: 'Display Capture' (monitor_capture)
07:56:57.746: - source: 'Game Capture' (game_capture)
07:56:57.746: ------------------------------------------------
07:57:00.200: ---------------------------------
07:57:00.200: [NVENC encoder: 'simple_h264_recording'] settings:
07:57:00.200: rate_control: CQP
07:57:00.200: bitrate: 0
07:57:00.200: cqp: 23
07:57:00.200: keyint: 250
07:57:00.200: preset: hq
07:57:00.200: profile: high
07:57:00.200: level: auto
07:57:00.200: width: 1920
07:57:00.200: height: 1080
07:57:00.200: 2-pass: true
07:57:00.200: b-frames: 2
07:57:00.200: GPU: 0
07:57:00.200:
07:57:00.202: [NVENC encoder: 'simple_h264_recording'] Failed to open NVENC codec: Function not implemented
08:00:42.137: adding 23 milliseconds of audio buffering, total audio buffering is now 69 milliseconds
08:05:43.804: device_texture_create (D3D11): Failed to create 2D texture (80070057)
 
UPDATE: Switching to OBS version 2.0.1 seems to have solved the issue. The NVENC hardware encoding is now working. Not sure why exactly that is. Possibly there's a newer version of the Nvidia encoding sdk built into the latest OBS version that isn't compatible with the current Nvidia Grid drivers for the K520.
 
Is this a virtual machine or bare metal? The E5-2670 CPU should have 8 cores / 16 threads, not half that number.
 
Back
Top