Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.66k stars 82 forks source link

CUDA_ERROR_UNKNOWN #499

Closed friki67 closed 2 months ago

friki67 commented 2 months ago

I'm getting an error when trying to transcode some of my files. The log for one of these files is

input #0, matroska,webm, from '/library/myfile.mkv':

   Metadata:

     encoder : libebml v1.4.4 + libmatroska v1.7.1

     creation_time : 2024-05-16T09:07:34.000000Z

   Duration: 00:52:05.02, start: 0.000000, bitrate: 7399 kb/s

   Chapters:

     Chapter #0:0: start 0.000000, end 2891.450000

       Metadata:

         title : Part 01

     Chapter #0:1: start 2891.450000, end 3125.024000

       Metadata:

         title : Credits

   Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default) (original)

     Metadata:

       BPS : 5989569

       DURATION : 00:52:04.622000000

       NUMBER_OF_FRAMES: 74916

       NUMBER_OF_BYTES : 2339392709

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

   Stream #0:1(spa): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default) (forced)

     Metadata:

       BPS : 640000

       DURATION : 00:52:05.024000000

       NUMBER_OF_FRAMES: 97657

       NUMBER_OF_BYTES : 250001920

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

   Stream #0:2(eng): Audio: eac3 (Dolby Digital Plus + Dolby Atmos), 48000 Hz, 5.1(side), fltp, 768 kb/s (original)

     Metadata:

       BPS : 768000

       DURATION : 00:52:04.608000000

       NUMBER_OF_FRAMES: 97644

       NUMBER_OF_BYTES : 299962368

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

   Stream #0:3(spa): Subtitle: subrip (dub)

     Metadata:

       BPS : 65

       DURATION : 00:49:10.906000000

       NUMBER_OF_FRAMES: 685

       NUMBER_OF_BYTES : 24098

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

   Stream #0:4(eng): Subtitle: subrip (original)

     Metadata:

       BPS : 78

       DURATION : 00:47:21.338000000

       NUMBER_OF_FRAMES: 721

       NUMBER_OF_BYTES : 27994

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

   Stream #0:5(eng): Subtitle: subrip (original) (hearing impaired)

     Metadata:

       title : SDH

       BPS : 83

       DURATION : 00:49:18.872000000

       NUMBER_OF_FRAMES: 821

       NUMBER_OF_BYTES : 30808

       _STATISTICS_WRITING_APP: mkvmerge v78.0 ('Running') 64-bit

       _STATISTICS_WRITING_DATE_UTC: 2024-05-16 09:07:34

       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Stream mapping:

   Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))

   Stream #0:1 -> #0:1 (copy)

   Stream #0:2 -> #0:2 (copy)

   Stream #0:3 -> #0:3 (copy)

   Stream #0:4 -> #0:4 (copy)

   Stream #0:5 -> #0:5 (copy)

Press [q] to stop, [?] for help

[hevc_nvenc @ 0x55da27436980] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_UNKNOWN: unknown error

[vost#0:0/hevc_nvenc @ 0x55da27436600] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Conversion failed!

nvidia-smi

Just Rescan Library and all those files are giving this error. This is a new installation. In my old computer it was working, same OS, older NVIDIA driver.

Versions

Unmanic: Version: 0.2.8+925008e+dirty

cat /etc/os-release

NAME="Rocky Linux"
VERSION="9.4 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"

nvidia-smi into docker container

Fri Aug 30 12:20:32 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.100                Driver Version: 550.100        CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1070        Off |   00000000:03:00.0 Off |                  N/A |
|  0%   36C    P8              5W /  151W |      48MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+

Installation Method Used

Docker installation, using this compose file (working in my old computer)

services:

  unmanic:
    container_name: unmanic
    image: josh5/unmanic:latest
    ports:
      - 8888:8888
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Madrid
      - NVIDIA_VISIBLE_DEVICES=ALL
    volumes:
      - /mnt/main/conf/unmanic:/config
      - /mnt/storage/data/media:/library
      - /mnt/storage/transcode_cache:/tmp/unmanic
    runtime: nvidia
    restart: unless-stopped

Additional Information

I applied this patch to unlock NVENC multiple transcoding: https://github.com/keylase/nvidia-patch as instructed in the docs https://docs.unmanic.app/docs/guides/nvidia_support_unmanic_on_linux#2-install-gpu-driver

friki67 commented 2 months ago

This is fixed after uninstall and reinstall nvidia drivers, container toolkit and docker.