You are not logged in.

#1 2023-12-06 09:02:36

archuserfromtheearth
Member
Registered: 2023-11-17
Posts: 4

[Solved] Not using nvidia dGPU while watching anime

As said in the title, my AMD iGPU - NVIDIA dGPU system doesn't use the dgpu while watching Anime with mpv, but works with movies. I get a couple errors after running the command:

$  mpv --vo=opengl --hwdec=auto \[AC\]\ Fate\ Apocrypha\ -\ 01\ \[BD\ 1080p\ Hi10\ FLAC\]\[DualAudio\]\[2DDC4F0D\].mkv 
Driver 'opengl' has been replaced with 'gpu'!
 (+) Video --vid=1 (*) '[Beatrice]' (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) 'English 2.0 FLAC' (flac 2ch 48000Hz)
     Audio --aid=2 --alang=jpn 'Japanese 2.0 FLAC' (flac 2ch 48000Hz)
     Subs  --sid=1 --slang=eng (*) 'Signs/Songs' (ass)
     Subs  --sid=2 --slang=eng 'Full Subtitles [UTW/Netflix]' (ass)
Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory
[ffmpeg/video] h264: Failed setup for format vulkan: hwaccel initialisation returned error.
[E] pw.loop [loop.c:67 pw_loop_new()] 0x9e6f2068360: can't make support.system handle: No such file or directory
AO: [pulse] 48000Hz stereo 2ch s32
[ffmpeg/video] h264_cuvid: unsupported bit depth: 10
[ffmpeg/video] h264_cuvid: ctx->cvdl->cuvidDecodePicture(ctx->cudecoder, picparams) failed -> CUDA_ERROR_INVALID_HANDLE: invalid resource handle
[ffmpeg/video] h264_cuvid: cuvid decode callback error
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_cuvid: ctx->cvdl->cuvidDecodePicture(ctx->cudecoder, picparams) failed -> CUDA_ERROR_INVALID_HANDLE: invalid resource handle
[ffmpeg/video] h264_cuvid: cuvid decode callback error
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_cuvid: cuvid decode callback error
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_v4l2m2m: Could not find a valid device
[ffmpeg/video] h264_v4l2m2m: can't configure decoder
Could not open codec.
VO: [gpu] 1920x1080 yuv420p10
AV: 00:00:07 / 00:23:47 (1%) A-V:  0.000

Exiting... (Quit)

It shows up in nvidia-smi for a second, then disappears. I see that there is an issue with the encoding, but I cant seem to find a way to resolve it. I will also include the output of fmpeg -i :

$ ffmpeg -i \[AC\]\ Fate\ Apocrypha\ -\ 01\ \[BD\ 1080p\ Hi10\ FLAC\]\[DualAudio\]\[2DDC4F0D\].mkv
ffmpeg version n6.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.1 (GCC) 20230801
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, matroska,webm, from '[AC] Fate Apocrypha - 01 [BD 1080p Hi10 FLAC][DualAudio][2DDC4F0D].mkv':
  Metadata:
    encoder         : libebml v1.3.7 + libmatroska v1.5.0
    creation_time   : 2019-07-07T14:21:05.000000Z
  Duration: 00:23:47.06, start: 0.000000, bitrate: 12672 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 255.005000
      Metadata:
        title           : Avant
    Chapter #0:1: start 255.005000, end 437.896000
      Metadata:
        title           : Part A
    Chapter #0:2: start 437.896000, end 659.534000
      Metadata:
        title           : Part B
    Chapter #0:3: start 659.534000, end 862.028000
      Metadata:
        title           : Part C
    Chapter #0:4: start 862.028000, end 1081.580000
      Metadata:
        title           : Part D
    Chapter #0:5: start 1081.580000, end 1109.108000
      Metadata:
        title           : Part E
    Chapter #0:6: start 1109.108000, end 1300.049000
      Metadata:
        title           : Part F
    Chapter #0:7: start 1300.049000, end 1395.019000
      Metadata:
        title           : ED
    Chapter #0:8: start 1395.019000, end 1427.055000
      Metadata:
        title           : Part G
  Stream #0:0(jpn): Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      title           : [Beatrice]
      BPS-eng         : 9826756
      DURATION-eng    : 00:23:47.051000000
      NUMBER_OF_FRAMES-eng: 34215
      NUMBER_OF_BYTES-eng: 1752910251
      _STATISTICS_WRITING_APP-eng: mkvmerge v33.1.0 ('Primrose') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 14:21:05
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: flac, 48000 Hz, stereo, s32 (24 bit) (default)
    Metadata:
      title           : English 2.0 FLAC
      BPS-eng         : 1398436
      DURATION-eng    : 00:23:47.008000000
      NUMBER_OF_FRAMES-eng: 16723
      NUMBER_OF_BYTES-eng: 249447590
      _STATISTICS_WRITING_APP-eng: mkvmerge v33.1.0 ('Primrose') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 14:21:05
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(jpn): Audio: flac, 48000 Hz, stereo, s32 (24 bit)
    Metadata:
      title           : Japanese 2.0 FLAC
      BPS-eng         : 1438091
      DURATION-eng    : 00:23:47.055000000
      NUMBER_OF_FRAMES-eng: 16724
      NUMBER_OF_BYTES-eng: 256529370
      _STATISTICS_WRITING_APP-eng: mkvmerge v33.1.0 ('Primrose') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 14:21:05
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Subtitle: ass (default)
    Metadata:
      title           : Signs/Songs
      BPS-eng         : 601
      DURATION-eng    : 00:01:37.970000000
      NUMBER_OF_FRAMES-eng: 82
      NUMBER_OF_BYTES-eng: 7368
      _STATISTICS_WRITING_APP-eng: mkvmerge v33.1.0 ('Primrose') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 14:21:05
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(eng): Subtitle: ass
    Metadata:
      title           : Full Subtitles [UTW/Netflix]
      BPS-eng         : 141
      DURATION-eng    : 00:23:23.650000000
      NUMBER_OF_FRAMES-eng: 335
      NUMBER_OF_BYTES-eng: 24909
      _STATISTICS_WRITING_APP-eng: mkvmerge v33.1.0 ('Primrose') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2019-07-07 14:21:05
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5: Attachment: ttf
    Metadata:
      filename        : IWAOMINPRO-BD-FATE.TTF
      mimetype        : application/x-truetype-font
  Stream #0:6: Attachment: otf
    Metadata:
      filename        : Profile-Medium.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:7: Attachment: otf
    Metadata:
      filename        : Profile-MediumItalic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:8: Attachment: ttf
    Metadata:
      filename        : FOT-MATISSEPRO-EB-TOARU.TTF
      mimetype        : application/x-truetype-font
At least one output file must be specified

Thank you in advance if you help me.

Last edited by archuserfromtheearth (2024-02-19 03:02:52)

Offline

#2 2023-12-06 10:15:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [Solved] Not using nvidia dGPU while watching anime

Your GPU (... which?) doesn't support hardware decoding the format of the video, you'd have to reencode it with a lower bit depth. There's a reason mpv doesn't enable hwaccel by default, this is one of them.

FWIW what's your output of vdpauinfo for example? Also please adjust your post and  wrap outputs in [ code ] [ /code ] tags without the spaces instead of markdown.

Last edited by V1del (2023-12-06 10:15:23)

Offline

#3 2023-12-06 11:20:47

archuserfromtheearth
Member
Registered: 2023-11-17
Posts: 4

Re: [Solved] Not using nvidia dGPU while watching anime

The output of vdpauinfo is the following:

$ vdpauinfo
display: :0.0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 
420_16 16384 16384  
422_16 16384 16384  
444_16 16384 16384  

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3 65536  4096  4096
MPEG2_MAIN                      3 65536  4096  4096
H264_BASELINE                  52 65536  4096  4096
H264_MAIN                      52 65536  4096  4096
H264_HIGH                      52 65536  4096  4096
VC1_SIMPLE                      1 65536  4096  4096
VC1_MAIN                        2 65536  4096  4096
VC1_ADVANCED                    4 65536  4096  4096
MPEG4_PART2_SP                  3 65536  4096  4096
MPEG4_PART2_ASP                 5 65536  4096  4096
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE       0 65536  4096  4096
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      186 139264  8192  4352
HEVC_MAIN_10                   186 139264  8192  4352
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---
AV1_MAIN                       --- not supported ---
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 I8A8 
R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 I8A8 
R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 I8A8 
B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     4096
VIDEO_SURFACE_HEIGHT             y        48     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y

My gpus are:

$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c6)

And my laptop is an ASUS TUF Gaming A15 FA506IU_FX506IU 1.0

Offline

#4 2023-12-06 13:14:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,048

Offline

Board footer

Powered by FluxBB