View Issue Details

IDProjectCategoryView StatusLast Update
0001406OBS-StudioNVENC Output (Jim)public2019-04-16 15:29
ReporterFenrirAssigned To 
PriorityhighSeveritycrashReproducibilityrandom
Status newResolutionopen 
PlatformOBS StudioOSWindowsOS Version10
Product Version23.0.2 
Target Version24.0.0Fixed in Version 
Summary0001406: New NVENC crash
DescriptionAt seemingly random times, the new nvenc encoder will fail with the error:

get_encoded_packet: nv.nvEncLockBitstream(s, &lock) failed: 8 (NV_ENC_ERR_INVALID_PARAM)

When this happens, there is no notification to the user that anything has gone wrong, output simply stops. When they go to stop their stream or recording, the OBS UI will lock up and they will be force to manually end the process.

I am still factfinding on this,. Will update this issue with more info and log files as I find it.

Update: This crash appears to be happening in high-GPU load scenarios. It may be a potential out of VRAM condition?
Additional InformationLog 1: https://cdn.discordapp.com/attachments/374636015396192257/555589782504210436/2019-03-13_17-57-58.txt
Log 2: https://obsproject.com/logs/dFFOq9vYehOS4H83
Log 3: https://obsproject.com/logs/pkEQ31DT2pAFl06S
Log 4: https://obsproject.com/logs/LKXwZ5H8VT5pNt1_
Log 5: https://obsproject.com/logs/J0isD5TEd6m86GhL
Log 6: https://obsproject.com/logs/2wFUlXdB0sCmnYJL
TagsNo tags attached.

Relationships

has duplicate 0001435 closedFenrir Crash without error and stream stalling out since 23.1 update 

Activities

dodgepong

2019-03-20 01:07

administrator   ~0004383

It seems this is possible with the AMF encoder as well. The user with this log reported that OBS hung when stopping the recording, and the recording never appeared in the file system.

2019-03-19 14-25-54.txt (10,572 bytes)
14:25:55.183: CPU Name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
14:25:55.183: CPU Speed: 4008MHz
14:25:55.183: Physical Cores: 4, Logical Cores: 8
14:25:55.183: Physical Memory: 16317MB Total, 5646MB Free
14:25:55.183: Windows Version: 10.0 Build 17134 (revision: 590; 64-bit)
14:25:55.183: Running as administrator: false
14:25:55.183: Aero is Enabled (Aero is always on for windows 8 and above)
14:25:55.184: Windows 10 Gaming Features:
14:25:55.184: 	Game DVR: On
14:25:55.185: Sec. Software Status:
14:25:55.187: 	Bitdefender Antivirus Free Antimalware: enabled (AV)
14:25:55.187: 	Windows Defender Antivirus: disabled (AV)
14:25:55.187: 	Windows Firewall: enabled (FW)
14:25:55.187: 	Bitdefender Antivirus Free Antimalware: enabled (ASW)
14:25:55.187: 	Windows Defender Antivirus: disabled (ASW)
14:25:55.188: Browser Hardware Acceleration: true
14:25:55.188: Portable mode: false
14:25:55.298: OBS 22.0.2 (64-bit, windows)
14:25:55.298: ---------------------------------
14:25:55.299: ---------------------------------
14:25:55.299: audio settings reset:
14:25:55.299: 	samples per sec: 44100
14:25:55.299: 	speakers:        2
14:25:55.301: ---------------------------------
14:25:55.301: Initializing D3D11...
14:25:55.301: Available Video Adapters: 
14:25:55.302: 	Adapter 1: Radeon (TM) RX 480 Graphics
14:25:55.302: 	  Dedicated VRAM: 4239470592
14:25:55.302: 	  Shared VRAM:    4259991552
14:25:55.302: 	  output 1: pos={0, 0}, size={1920, 1080}, attached=true
14:25:55.302: 	  output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
14:25:55.305: Loading up D3D11 on adapter Radeon (TM) RX 480 Graphics (0)
14:25:55.329: D3D11 loaded successfully, feature level used: 45056
14:25:55.858: ---------------------------------
14:25:55.858: video settings reset:
14:25:55.858: 	base resolution:   1920x1080
14:25:55.858: 	output resolution: 1920x1080
14:25:55.858: 	downscale filter:  Bicubic
14:25:55.858: 	fps:               60/1
14:25:55.858: 	format:            NV12
14:25:55.858: 	YUV mode:          601/Partial
14:25:55.860: Audio monitoring device:
14:25:55.860: 	name: Default
14:25:55.860: 	id: default
14:25:55.860: ---------------------------------
14:25:55.868: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
14:25:55.870: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
14:25:56.167: [AMF] The AMF Runtime is very old and unsupported, consider updating your drivers.
14:25:56.167: [AMF] Version 2.4.2 loaded (Compiled: 1.4.7.0, Runtime: 1.4.4.0, Library: 1;4;4;0;17.30.1091.1011;201709221648;CL#1462378).
14:25:56.235: [AMF] [Capability Manager] Testing Direct3D 11 Adapter 'Radeon (TM) RX 480 Graphics (VEN_1002/DEV_67df/SUB_4fd1043/REV_00c7)':
14:25:56.235:   H264/AVC: Supported
14:25:56.235:   H265/HEVC: Supported
14:25:56.235: 
14:25:56.273: [AMF] [Capability Manager] Testing Direct3D 9 Adapter 'Radeon (TM) RX 480 Graphics [\\.\DISPLAY1] (VEN_1002/DEV_67df/SUB_4fd1043/REV_00c7)':
14:25:56.273:   H264/AVC: Supported
14:25:56.273:   H265/HEVC: Supported
14:25:56.273: 
14:25:56.330: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
14:25:56.332: LoadLibrary failed for '../../obs-plugins/64bit/libEGL.dll': The specified procedure could not be found.
14:25:56.332:  (127)
14:25:56.332: Module '../../obs-plugins/64bit/libEGL.dll' not loaded
14:25:56.340: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
14:25:56.350: [obs-browser]: Version 2.1.5
14:25:56.372: LoadLibrary failed for 'nvEncodeAPI64.dll': The specified module could not be found.
14:25:56.372:  (126)
14:25:56.638: Couldn't find VLC installation, VLC video source disabled
14:25:56.647: No blackmagic support
14:25:56.675: ---------------------------------
14:25:56.675:   Loaded Modules:
14:25:56.675:     win-wasapi.dll
14:25:56.675:     win-mf.dll
14:25:56.675:     win-dshow.dll
14:25:56.675:     win-decklink.dll
14:25:56.675:     win-capture.dll
14:25:56.675:     vlc-video.dll
14:25:56.675:     text-freetype2.dll
14:25:56.675:     rtmp-services.dll
14:25:56.675:     obs-x264.dll
14:25:56.675:     obs-vst.dll
14:25:56.675:     obs-transitions.dll
14:25:56.675:     obs-text.dll
14:25:56.675:     obs-qsv11.dll
14:25:56.675:     obs-outputs.dll
14:25:56.675:     obs-filters.dll
14:25:56.675:     obs-ffmpeg.dll
14:25:56.675:     obs-browser.dll
14:25:56.675:     image-source.dll
14:25:56.675:     frontend-tools.dll
14:25:56.675:     enc-amf.dll
14:25:56.675:     coreaudio-encoder.dll
14:25:56.675: ---------------------------------
14:25:56.675: ==== Startup complete ===============================================
14:25:56.676: Service '' not found
14:25:56.681: All scene data cleared
14:25:56.681: ------------------------------------------------
14:25:56.722: WASAPI: Device 'Speakers (Realtek High Definition Audio)' initialized
14:25:56.753: WASAPI: Device 'Microphone (2- Samson C01U              )' initialized
14:25:56.758: WASAPI: Device 'Microphone (2- Samson C01U              )' initialized
14:25:56.762: Switched to scene 'Scene'
14:25:56.762: ------------------------------------------------
14:25:56.762: Loaded scenes:
14:25:56.762: - scene 'Scene':
14:25:56.762:     - source: 'Audio Input Capture' (wasapi_input_capture)
14:25:56.763:     - source: 'Display Capture 2' (monitor_capture)
14:25:56.763: ------------------------------------------------
14:25:56.790: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
14:27:16.075: [AMF] [H264]<Id: 5> Encoder Parameters:
14:27:16.075: [AMF] [H264]<Id: 5>   Backend:
14:27:16.075: [AMF] [H264]<Id: 5>     Video API: Direct3D 11
14:27:16.075: [AMF] [H264]<Id: 5>     Video Adapter: Radeon (TM) RX 480 Graphics (VEN_1002/DEV_67df/SUB_4fd1043/REV_00c7)
14:27:16.075: [AMF] [H264]<Id: 5>     OpenCL: Not Supported
14:27:16.075: [AMF] [H264]<Id: 5>       Transfer: Disabled
14:27:16.075: [AMF] [H264]<Id: 5>       Conversion: Disabled
14:27:16.075: [AMF] [H264]<Id: 5>     Multi-Threading: Disabled
14:27:16.075: [AMF] [H264]<Id: 5>     Queue Size: 8
14:27:16.075: [AMF] [H264]<Id: 5>   Frame:
14:27:16.075: [AMF] [H264]<Id: 5>     Format: NV12 601 Partial
14:27:16.075: [AMF] [H264]<Id: 5>     Resolution: 1920x1080
14:27:16.075: [AMF] [H264]<Id: 5>     Frame Rate: 60/1
14:27:16.075: [AMF] [H264]<Id: 5>     Aspect Ratio: 1:1
14:27:16.076: [AMF] [H264]<Id: 5>   Static:
14:27:16.076: [AMF] [H264]<Id: 5>     Usage: Transcoding
14:27:16.076: [AMF] [H264]<Id: 5>     Quality Preset: Balanced
14:27:16.076: [AMF] [H264]<Id: 5>     Profile: High 4.2
14:27:16.076: [AMF] [H264]<Id: 5>     Coding Type: Automatic
14:27:16.076: [AMF] [H264]<Id: 5>     Max. Reference Frames: 4
14:27:16.076: [AMF] [H264]<Id: 5>     Max. Long-Term Reference Frames: 0
14:27:16.076: [AMF] [H264]<Id: 5>   Rate Control:
14:27:16.076: [AMF] [H264]<Id: 5>     Method: Constant Quantization Parameter
14:27:16.076: [AMF] [H264]<Id: 5>     Pre-Pass Mode: Disabled
14:27:16.076: [AMF] [H264]<Id: 5>     QP:
14:27:16.076: [AMF] [H264]<Id: 5>       Range: 0 - 51
14:27:16.076: [AMF] [H264]<Id: 5>       I-Frame: 23
14:27:16.076: [AMF] [H264]<Id: 5>       P-Frame: 23
14:27:16.076: [AMF] [H264]<Id: 5>       B-Frame: 22
14:27:16.076: [AMF] [H264]<Id: 5>     Bitrate:
14:27:16.076: [AMF] [H264]<Id: 5>       Target: 20000000 bit/s
14:27:16.076: [AMF] [H264]<Id: 5>       Peak: 30000000 bit/s
14:27:16.076: [AMF] [H264]<Id: 5>     Flags:
14:27:16.076: [AMF] [H264]<Id: 5>       Filler Data: Disabled
14:27:16.076: [AMF] [H264]<Id: 5>       Frame Skipping: Disabled
14:27:16.076: [AMF] [H264]<Id: 5>         Period: 0 Frames
14:27:16.076: [AMF] [H264]<Id: 5>         Behaviour: Skip every Nth frame
14:27:16.076: [AMF] [H264]<Id: 5>       Variance Based Adaptive Quantization: Disabled
14:27:16.076: [AMF] [H264]<Id: 5>       Enforce Hypothetical Reference Decoder: Enabled
14:27:16.076: [AMF] [H264]<Id: 5>     Video Buffering Verfier:
14:27:16.076: [AMF] [H264]<Id: 5>       Buffer Size: 100000000 bits
14:27:16.076: [AMF] [H264]<Id: 5>       Initial Fullness: 100 %
14:27:16.076: [AMF] [H264]<Id: 5>     Max. Access Unit Size: 0
14:27:16.076: [AMF] [H264]<Id: 5>   Picture Control:
14:27:16.076: [AMF] [H264]<Id: 5>     Period:
14:27:16.076: [AMF] [H264]<Id: 5>       IDR: 120 Frames
14:27:16.076: [AMF] [H264]<Id: 5>       I: 0 Frames
14:27:16.076: [AMF] [H264]<Id: 5>       P: 0 Frames
14:27:16.076: [AMF] [H264]<Id: 5>       B: 0 Frames
14:27:16.076: [AMF] [H264]<Id: 5>     Header Insertion Spacing: 0
14:27:16.076: [AMF] [H264]<Id: 5>     GOP Alignment: Enabled
14:27:16.076: [AMF] [H264]<Id: 5>     Deblocking Filter: Enabled
14:27:16.076: [AMF] [H264]<Id: 5>     Motion Estimation: Quarter, Half
14:27:16.076: [AMF] [H264]<Id: 5>     B-Frames:
14:27:16.076: [AMF] [H264]<Id: 5>       Pattern: 0
14:27:16.076: [AMF] [H264]<Id: 5>       Delta QP: N/A
14:27:16.076: [AMF] [H264]<Id: 5>       Reference: Disabled
14:27:16.077: [AMF] [H264]<Id: 5>       Reference Delta QP: N/A
14:27:16.077: [AMF] [H264]<Id: 5>   Intra-Refresh:
14:27:16.077: [AMF] [H264]<Id: 5>     Number of Macroblocks Per Slot: 0
14:27:16.077: [AMF] [H264]<Id: 5>     Number of Stripes: 2147483647
14:27:16.077: ---------------------------------
14:27:16.080: [FFmpeg aac encoder: 'simple_aac_recording'] bitrate: 128, channels: 2, channel_layout: 3
14:27:16.080: 
14:27:16.098: ==== Recording Start ===============================================
14:27:16.098: [ffmpeg muxer: 'simple_file_output'] Writing file 'C:/Users/James Chen/Videos/2019-03-19 14-27-15.flv'...
14:27:21.221: [AMF] <Id: 5> [Main] Retrieving Packet failed, error AMF_FAIL (code 1)
14:27:22.834: Device Remove/Reset!  Rebuilding all assets...
14:27:28.857: Error encoding with encoder 'simple_h264_recording'
15:08:45.529: ==== Shutting down ==================================================
15:08:45.534: Switched to scene '(null)'
15:08:45.535: WASAPI: Device 'Microphone (2- Samson C01U              )' Terminated
15:08:45.538: WASAPI: Device 'Speakers (Realtek High Definition Audio)' Terminated
15:08:45.542: WASAPI: Device 'Microphone (2- Samson C01U              )' Terminated
15:08:45.545: All scene data cleared
15:08:45.545: ------------------------------------------------
2019-03-19 14-25-54.txt (10,572 bytes)

dodgepong

2019-03-20 01:09

administrator   ~0004384

Sorry, that note should probably be its own Mantis issue. What we really need is to deal with issue 0000789.

Fenrir

2019-03-25 15:24

administrator   ~0004393

Indeed. I've updated this issue for clarity it is about the actual crash. The silent failure aspect was only included for severity scoping.

Fenrir

2019-04-12 14:38

administrator   ~0004490

More logs in 0001435 (duplicate).

They show:

21:21:10.864: error: Failed locking nvenc input buffer: invalid version (15)
21:21:10.864: [NVENC encoder: 'streaming_h264'] nvenc_encode: Error encoding: Invalid argument
21:21:10.870: [jim-nvenc: 'recording_h264'] init_encoder: nvEncGetEncodePresetConfig failed: 15 (NV_ENC_ERR_INVALID_VERSION)

Issue History

Date Modified Username Field Change
2019-03-14 03:33 Fenrir New Issue
2019-03-14 14:25 Fenrir Additional Information Updated View Revisions
2019-03-20 01:07 dodgepong File Added: 2019-03-19 14-25-54.txt
2019-03-20 01:07 dodgepong Note Added: 0004383
2019-03-20 01:09 dodgepong Note Added: 0004384
2019-03-25 15:24 Fenrir Summary New NVENC crashes silently to the user => New NVENC crash
2019-03-25 15:24 Fenrir Description Updated View Revisions
2019-03-25 15:24 Fenrir Note Added: 0004393
2019-04-12 14:37 Fenrir Relationship added has duplicate 0001435
2019-04-12 14:38 Fenrir Note Added: 0004490
2019-04-12 14:38 Fenrir Target Version 23.1.0 => 24.0.0