viseron icon indicating copy to clipboard operation
viseron copied to clipboard

hevc_nvenc - out of memory [SOLVED]

Open k0stett opened this issue 1 year ago • 2 comments

Just sharing my expirience. In use:

  • Ubuntu 22.04
  • 2080 Ti
  • nvidia-525-server driver from Ubuntu repo
  • amd64-cuda-viseron Got errors:
[hevc_nvenc @ 0x55f45f5f5cc0] OpenEncodeSessionEx failed: out of memory (10): (no details)
[hevc_nvenc @ 0x55f45f5f5cc0] No capable devices found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

and as an consecuence:

[2023-04-06 09:41:21] [ERROR   ] [viseron.components.ffmpeg.recorder.nov32_2] - Failed to concatenate segments: Command '['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-protocol_whitelist', 'file,pipe', '-f', 'concat', '-safe', '0', '-i', '-', '-c:v', 'hevc_nvenc', '-c:a', 'aac', '-movflags', '+faststart', '/recordings/nov32_2/2023-04-06/09-40-52.mp4']' returned non-zero exit status 1.
[2023-04-06 09:45:14] [ERROR   ] [viseron.components.ffmpeg.stream.neuroset] - rtmp://*****:*****@viseron.homenet.local.local:1935/1c58e819-8b1c-4eb5-a9ae-5fa4332106e5.stream: Input/output error
[2023-04-06 09:45:14] [ERROR   ] [viseron.components.ffmpeg.stream.neuroset] - rtmp://*****:*****@viseron.homenet.local:1935/ac0eff90-02b8-4fa1-a566-2f9c964a731b.stream: Input/output error
[2023-04-06 09:45:14] [ERROR   ] [viseron.components.ffmpeg.camera.neuroset] - Did not receive a frame
[2023-04-06 09:45:19] [ERROR   ] [viseron.components.ffmpeg.camera.neuroset] - Restarting frame pipe
[2023-04-06 09:45:19] [ERROR   ] [viseron.components.ffmpeg.stream.neuroset] - rtmp://*****:*****@viseron.homenet.local.local:1935/ac0eff90-02b8-4fa1-a566-2f9c964a731b.stream: Input/output error
[2023-04-06 09:45:19] [ERROR   ] [viseron.components.ffmpeg.stream.neuroset] - rtmp://*****:*****@viseron.homenet.local:1935/1c58e819-8b1c-4eb5-a9ae-5fa4332106e5.stream: Input/output error
[2023-04-06 09:45:19] [ERROR   ] [viseron.components.ffmpeg.camera.neuroset] - FFmpeg process has exited
[2023-04-06 09:45:57] [WARNING ] [viseron.components.ffmpeg.recorder.neuroset] - Could not find matching start segment. Using earliest possible
[2023-04-06 09:46:39] [WARNING ] [viseron.components.ffmpeg.recorder.nov32_4] - Could not find matching start segment. Using earliest possible

Just follow instructions in https://github.com/keylase/nvidia-patch and all begins to work correctly and without errors. It happens cause nvenc in consumer GPUs supports only two processes at time, patching driver is the solution to discard this limitation. May be suitable to add this into viseron documentation.

k0stett avatar Apr 07 '23 08:04 k0stett