VLC shows pale colors with hdr videos

vlcsnap-2022-04-22-08h43m27s330
That is this hdr video
I have both nvidia and intel integrated cards and this happens with all modes ( Hybrid, NVIDIA, Integrated on optimus manager ) wayland and X11 ( I’m primarily on X11).

I have tried:

  1. this
  2. setting ouput to opengl and “Tone-mapping algorithm” to Reinhard
  3. Both together
  4. Switching to haruna, mpv or smplayer and I liked smplayer in the beginning, but smplayer has the same issue under wayland and it requires running on nvidia card ( in NVIDIA or hybrid mode ), hauruna lags sometimes and I’m not comfortable with mpv being cli (not unconfortable with cli in general).

Operating System: EndeavourOS
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.15.35-1-lts (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4340M CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
VLC Version: 3.0.17.4

Do you have an HDR-capable display?

Also, things look fine for me with mpv - worth trying that instead of VLC.

It’s not. Open mpv, drag video into it. Or, double-click on video and play.

1 Like

:point_up_2:t2:

The CLI is not nessesary to play with mpv, but mpv works smoothly everywhere VLC has been giving trouble lately.

How do I check if my monitor supports hdr? Also I didn’t clarify that mpv and smplayer (apart from the mentioned issues) work display the video fine.

That would be the solution - use the software that supports the video correctly.

I’m not comfortable with mpv haruana ,smplayer and mpv. What other options do I have? Or should I fallback to mpv?

VLC has been overrated for years …

1 Like

What would be a good alternative? I tried smplayer ,mpv and haruna. If nothing works, I’ll probably go with mpv.

Sorry, I don’t know anything better than mpv. I have never looked for an alternative. There are many example configurations for mpv on the net, or instructions for the mpv.config, if it is necessary.

1 Like

Hmm…

Although… Celluloid uses mpv as a backend, and that has more of a traditional GUI.

1 Like

@unknownuser
Colors look great with dragon on kde.

mpv is easily the best multimedia player in Linux.

Why are you uncomfortable with it? Do you like configuring things using GUI? SMPlayer is good although I prefer the simplicity of mpv itself or Celluloid.

If you don’t mind using config files and tinkering, check this out. I don’t have HDR display, so this doesn’t have special HDR options although the defaults for mpv are good.

2 Likes

Here is a simple configuration of mpv that I use. But you can configure it much more:

# General
profile=gpu-hq
vo=gpu
hwdec=auto

# Scaling algorithm for profile=gpu-hq
# Note: Press shift + I in mpv to view frame drops. Then press 2 to view frame times and processing layers. Make sure your config does not drop frames and ideally frame times should be <25ms.
scale=ewa_lanczossharp
dscale=mitchell
cscale=spline64
video-sync=display-resample
interpolation=yes
tscale=oversample

# If the video would be bigger than the screen, then reduce it to the screen size.
autofit-larger=100%x100%

# Sets the initial window position, specified as a percentage of the screen size.
geometry=50%:50%

# Audio
audio-channels=stereo
volume=60
volume-max=125

# Tweaks
keep-open=yes
save-position-on-quit=yes

Many years ago, I was using VLC and was reluctant to change to anything else, because of habit. But when I finally did, I never looked back. For Linux, there are many media players better than VLC, and mpv is really the best one.

If you do not like mpv's minimalist UI, there are many frontends for it, SMPlayer being my personal favourite, especially on KDE Plasma (if you decide to try it, don’t get shocked by the outrageously ugly default skin, you can easily change that). Celluloid is pretty good as well.

2 Likes

You’re right. :grinning: I know SMPlayer has ugly default skin but every time I see it, I get shocked all over again. Wonder why the Dev doesn’t change it.

2 Likes

Thank you all, sorry for replying too late, I’ve been really busy recently. I am going with smplayer (works currently great for me) and will soon consider switching to mpv, thanks @anon50380917 @Kresimir @jonathon @subluminal.

Edit: another issue with choppy playback in mpv (and subsequently smplayer) has arisen, I fixed it with running mpv backend on gpu, but couldn’t fix it on integrated mode, any fix?

2 Likes

What do you mean by “integrated mode” ? iGPU ? Need more info. Also for debugging, run

mpv -v URL

Then post output.

yes, iGPU
Output in hybrid mode

[cplayer] Command line options: '-v' 'video.mp4'                                                          
[cplayer] mpv 0.34.1-dirty Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects                            
[cplayer]  built on UNKNOWN                                                                               
[cplayer] FFmpeg library versions:                                                                        
[cplayer]    libavutil       57.17.100                                                                    
[cplayer]    libavcodec      59.18.100                                                                    
[cplayer]    libavformat     59.16.100                                                                    
[cplayer]    libswscale      6.4.100                                                                      
[cplayer]    libavfilter     8.24.100                                                                     
[cplayer]    libswresample   4.3.100                                                                      
[cplayer] FFmpeg version: n5.0                                                                            
[cplayer]                                                                                                 
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-d
vb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date --disable-caca         
[cplayer] List of enabled features: alsa asm cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build
drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffmpeg-aviocontext-bytes-read ffnvcodec gbm gbm.h
gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass l
ibavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua
luajit memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband shaderc shaderc-stat
ic stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau ve
ctor vt.h vulkan wayland wayland-protocols x11 xv zimg zlib                                               
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf                                             
[cplayer] Applying profile 'default'...                                                                   
[cplayer] Reading config file /home/mohamed/.config/mpv/mpv.conf                                          
[cplayer] Applying profile 'default'...                                                                   
[cplayer] Setting option 'profile' = 'gpu-hq' (flags = 4)                                                 
[cplayer] Applying profile 'gpu-hq'...                                                                    
[cplayer] Setting option 'scale' = 'spline36' (flags = 4)                                                 
[cplayer] Setting option 'cscale' = 'spline36' (flags = 4)                                                
[cplayer] Setting option 'dscale' = 'mitchell' (flags = 4)                                                
[cplayer] Setting option 'dither-depth' = 'auto' (flags = 4)                                              
[cplayer] Setting option 'correct-downscaling' = 'yes' (flags = 4)                                        
[cplayer] Setting option 'linear-downscaling' = 'yes' (flags = 4)                                         
[cplayer] Setting option 'sigmoid-upscaling' = 'yes' (flags = 4)                                          
[cplayer] Setting option 'deband' = 'yes' (flags = 4)                                                     
[cplayer] Setting option 'vo' = 'gpu' (flags = 4)                                                         
[cplayer] Setting option 'hwdec' = 'auto-safe' (flags = 4)                                                
[cplayer] Setting option 'hwdec-codecs' = 'all' (flags = 4)                                               
[cplayer] Setting option 'v' = '' (flags = 8)                                                             
[cplayer] Waiting for scripts...                                                                          
[osd/libass] libass API version: 0x1502000                                                                
[osd/libass] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122-dirty              
[osd/libass] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 4.2.1 (COMPLEX)                                  
[osd/libass] Setting up fonts...                                                                          
[osd/libass] Using font provider fontconfig                                                               
[osd/libass] Done.                                                                                        
[cplayer] Set property: shared-script-properties -> 1                                                     
[cplayer] Set property: shared-script-properties -> 1                                                     
[cplayer] Done loading scripts.                                                                           
[cplayer] Running hook: ytdl_hook/on_load                                                                 
[ytdl_hook] ytdl:// hook                                                                                  
[ytdl_hook] not a ytdl:// url                                                                             
[cplayer] Set property: shared-script-properties -> 1                                                     
[ifo_dvdnav] Opening video.mp4                                                                            
[bdmv/bluray] Opening video.mp4                                                                           
[file] Opening video.mp4                                                                                  
[demux] Trying demuxers for level=normal.                                                                 
[cplayer] Set property: shared-script-properties -> 1                                                     
[osd/libass] libass API version: 0x1502000                                                                
[osd/libass] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122-dirty              
[osd/libass] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 4.2.1 (COMPLEX)                                  
[osd/libass] Setting up fonts...                                                                          
[lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048.                                            
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set                                     
[lavf] Assuming this is an image format.                                                                  
[demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat)                                       
[cplayer] Opening done: video.mp4                                                                         
[osd/libass] Using font provider fontconfig                                                               
[osd/libass] Done.                                                                                        
[find_files] Loading external files in .                                                                  
[cplayer] Running hook: ytdl_hook/on_preloaded                                                            
[lavf] select track 0                                                                                     
[lavf] select track 1                                                                                     
[cplayer]  (+) Video --vid=1 (*) (av1 1280x720 59.940fps)                                                 
[cplayer]      Video --vid=2 [P] (png 1.000fps)
[cplayer]  (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'                                                        
[vo/gpu/opengl] Initializing GPU context 'x11egl'                                                         
[vo/gpu/x11] X11 opening display: :0                                                                      
[vo/gpu/x11] Display 0 (eDP1): [0, 0, 1920, 1080] @ 60.051768 FPS                                         
[vo/gpu/x11] Current display FPS: 60.051768                                                               
[vo/gpu/opengl] EGL_VERSION=1.5                                                                           
[vo/gpu/opengl] EGL_VENDOR=Mesa Project                                                                   
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES                                                          
[vo/gpu/opengl] Trying to create Desktop OpenGL context.                                                  
[vo/gpu/opengl] Choosing visual EGL config 0xa, visual ID 0x20                                            
[vo/gpu/opengl] GL_VERSION='4.6 (Core Profile) Mesa 22.0.3'                                               
[vo/gpu/opengl] Detected desktop OpenGL 4.6.                                                              
[vo/gpu/opengl] GL_VENDOR='Intel'                                                                         
[vo/gpu/opengl] GL_RENDERER='Mesa Intel(R) HD Graphics 4600 (HSW GT2)'                                    
[vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.60'                                                        
[vo/gpu] Testing FBO format rgba16f                                                                       
[vo/gpu] Using FBO format rgba16f.                                                                        
[vo/gpu] Assuming 60.051768 FPS for display sync.                                                         
[vd] Container reported FPS: 59.940060                                                                    
[vd] Codec list:                                                                                          
[vd]     libdav1d (av1) - dav1d AV1 decoder by VideoLAN                                                   
[vd]     libaom-av1 (av1) - libaom AV1                                                                    
[vd]     av1 - Alliance for Open Media AV1                                                                
[vd]     av1_cuvid (av1) - Nvidia CUVID AV1 decoder                                                       
[vd]     av1_qsv (av1) - AV1 video (Intel Quick Sync Video acceleration)                                  
[vd] Opening decoder libdav1d                                                                             
[vd] Looking at hwdec av1-nvdec...                                                                        
[vo/gpu] Loading hwdec driver 'vaapi-egl'                                                                 
[vo/gpu/vaapi-egl] using VAAPI EGL interop                                                                
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...                                                     
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.14                                                  
[vo/gpu/vaapi-egl] Going to probe surface formats (may log bogus errors)...                               
[vo/gpu/vaapi-egl] Done probing surface formats.                                                          
[vo/gpu] Loading hwdec driver 'cuda-nvdec'                                                                
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> C
UDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context                                     
[vo/gpu/cuda-nvdec] CUDA hwdec only works with OpenGL or Vulkan backends.                                 
[vo/gpu] Loading failed.                                                                                  
[vo/gpu] Loading hwdec driver 'drmprime-drm'                                                              
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.                                      
[vo/gpu] Loading failed.                                                                                  
[vd] Could not create device.                                                                             
[vd] Looking at hwdec av1-vaapi...                                                                        
[vd] Trying hardware decoding via av1-vaapi.                                                              
[vd] Using underlying hw-decoder 'av1'                                                                    
[vd] Selected codec: libdav1d (dav1d AV1 decoder by VideoLAN)                                             
[vf] User filter list:                                                                                    
[vf]   (empty)                                                                                            
[ad] Codec list:                                                                                          
[ad]     opus - Opus                                                                                      
[ad]     libopus (opus) - libopus Opus                                                                    
[ad] Opening decoder opus                                                                                 
[ad] Requesting 1 threads for decoding.                                                                   
[ad] Selected codec: opus (Opus)                                                                          
[af] User filter list:                                                                                    
[af]   (empty)                                                                                            
[cplayer] Starting playback...                                                                            
[af] [in] 48000Hz stereo 2ch floatp                                                                       
[af] [userspeed] 48000Hz stereo 2ch floatp                                                                
[af] [userspeed] (disabled)                                                                               
[af] [convert] 48000Hz stereo 2ch floatp                                                                  
[vd] Pixel formats supported by decoder: cuda vaapi yuv420p10le                                           
[vd] Codec profile: Main (0x0)                                                                            
[ffmpeg/video] av1: No support for codec av1 profile 0.                                                   
[vd] Hardware decoding of this stream is unsupported?                                                     
[vd] Requesting pixfmt 'yuv420p10le' from decoder.                                                        
[ffmpeg/video] av1: Your platform doesn't suppport hardware accelerated AV1 decoding.                     
[ffmpeg/video] av1: Failed to get pixel format.                                                           
[vd] Error while decoding frame (hardware decoding)!                                                      
[vd] Falling back to software decoding.                                                                   
[vd] Detected 4 logical cores.                                                                            
[vd] Requesting 5 threads for decoding.                                                                   
[ffmpeg/video] libdav1d: libdav1d 1.0.0                                                                   
[vd] Using software decoding.                                                                             
[vd] Decoder format: 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/auto CL=unknown                    
[vf] [in] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264          
[vf] [userdeint] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264   
[vf] [userdeint] (disabled)                                                                               
[vf] [autorotate] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264  
[vf] [autorotate] (disabled)                                                                              
[vf] [convert] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264     
[vf] [convert] (disabled)                                                                                 
[vf] [out] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264         
[cplayer] Set property: shared-script-properties -> 1                                                     
[ao] Trying audio driver 'pulse'                                                                          
[ao/pulse] requested format: 48000 Hz, stereo channels, floatp                                            
[ao/pulse] Library version: 15.0.0                                                                        
[ao/pulse] Proto: 35                                                                                      
[ao/pulse] Server proto: 4294967295                                                                       
[ao/pulse] Channel layouts:                                                                               
[ao/pulse]  - #fl                                                                                         
[ao/pulse]  - #fr                                                                                         
[ao/pulse]  - #fc                                                                                         
[ao/pulse]  - #lfe                                                                                        
[ao/pulse]  - #bl                                                                                         
[ao/pulse]  - #br                                                                                         
[ao/pulse]  - #flc                                                                                        
[ao/pulse]  - #frc                                                                                        
[ao/pulse]  - #bc                                                                                         
[ao/pulse]  - #sl                                                                                         
[ao/pulse]  - #sr                                                                                         
[ao/pulse]  - #tc                                                                                         
[ao/pulse]  - #tfl                                                                                        
[ao/pulse]  - #tfc                                                                                        
[ao/pulse]  - #tfr                                                                                        
[ao/pulse]  - #tbl                                                                                        
[ao/pulse]  - #tbc                                                                                        
[ao/pulse]  - #tbr                                                                                        
[ao/pulse] result: stereo                                                                                 
[ao/pulse] device buffer: 4800 samples.                                                                   
[ao/pulse] using soft-buffer of 9600 samples.                                                             
[cplayer] AO: [pulse] 48000Hz stereo 2ch float                                                            
[cplayer] AO: Description: PulseAudio audio output
[autoconvert] inserting resampler                                                                         
[swresample] format change, reinitializing resampler                                                      
[swresample] 48000Hz stereo floatp -> 48000Hz stereo float                                                
[af] [out] 48000Hz stereo 2ch float                                                                       
[cplayer] VO: [gpu] 1280x720 yuv420p10                                                                    
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h2
64                                                                                                        
[vo/gpu] Resize: 1280x720                                                                                 
[vo/gpu] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)                                                 
[vo/gpu] Video source: 1280x720 (1:1)                                                                     
[vo/gpu] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720                                                
[vo/gpu] Video scale: 1.000000/1.000000                                                                   
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0                                                                     
[vo/gpu] Video borders: l=0 t=0 r=0 b=0                                                                   
[vo/gpu] Reported display depth: 8                                                                        
[vo/gpu] Texture for plane 0: 1280x720                                                                    
[vo/gpu] Texture for plane 1: 640x360                                                                     
[vo/gpu] Texture for plane 2: 640x360                                                                     
[vo/gpu] Testing FBO format rgba16f                                                                       
[vo/gpu] Using FBO format rgba16f.                                                                        
[vo/gpu] Dither to 8.                                                                                     
[cplayer] first video frame after restart shown                                                           
[cplayer] audio ready                                                                                     
[cplayer] delaying audio start 0.007500 vs. 0.000000, diff=0.007500                                       
[cplayer] playback restart complete @ 0.000000, audio=ready, video=playing                                
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000
[cplayer] starting audio playback
[ao/pulse] starting AO                                                                                    
[cplayer] Set property: shared-script-properties -> 1                                                     
[cplayer] Set property: shared-script-properties -> 1                                                     
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.008
[vo/gpu/x11] Disabling screensaver.
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.002 Dropped: 33
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000 Dropped: 37
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Regular.ttf, 0, NotoSans-
Regular                                                                                                   
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x128.                                                            
[statusline] AV: 00:00:01 / 00:05:13 (0%) A-V:  0.000 Dropped: 43
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:01 / 00:05:13 (0%) A-V:  0.000 Dropped: 47
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:01 / 00:05:13 (0%) A-V:  0.000 Dropped: 55
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:13 / 00:05:13 (4%) A-V:  0.000 Dropped: 478
[cplayer] EOF code: 5   
[cplayer] finished playback, success (reason 3)                                                           
[cplayer]                                                                                                 
[cplayer] Exiting... (Quit)
[cplayer] Set property: shared-script-properties -> 1
[vo/gpu/x11] Enabling screensaver.

Integrated mode

[cplayer] Command line options: '-v' 'video.mp4'
[cplayer] mpv 0.34.1-dirty Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       57.17.100
[cplayer]    libavcodec      59.18.100
[cplayer]    libavformat     59.16.100
[cplayer]    libswscale      6.4.100
[cplayer]    libavfilter     8.24.100
[cplayer]    libswresample   4.3.100
[cplayer] FFmpeg version: n5.0
[cplayer] 
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date --disable-caca
[cplayer] List of enabled features: alsa asm cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffmpeg-aviocontext-bytes-read ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua luajit memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband shaderc shaderc-static stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vector vt.h vulkan wayland wayland-protocols x11 xv zimg zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Reading config file /home/mohamed/.config/mpv/mpv.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'profile' = 'gpu-hq' (flags = 4)
[cplayer] Applying profile 'gpu-hq'...
[cplayer] Setting option 'scale' = 'spline36' (flags = 4)
[cplayer] Setting option 'cscale' = 'spline36' (flags = 4)
[cplayer] Setting option 'dscale' = 'mitchell' (flags = 4)
[cplayer] Setting option 'dither-depth' = 'auto' (flags = 4)
[cplayer] Setting option 'correct-downscaling' = 'yes' (flags = 4)
[cplayer] Setting option 'linear-downscaling' = 'yes' (flags = 4)
[cplayer] Setting option 'sigmoid-upscaling' = 'yes' (flags = 4)
[cplayer] Setting option 'deband' = 'yes' (flags = 4)
[cplayer] Setting option 'vo' = 'gpu' (flags = 4)
[cplayer] Setting option 'hwdec' = 'auto-safe' (flags = 4)
[cplayer] Setting option 'hwdec-codecs' = 'all' (flags = 4)
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Waiting for scripts...
[osd/libass] libass API version: 0x1502000
[osd/libass] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122-dirty
[osd/libass] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 4.2.1 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Set property: shared-script-properties -> 1
[cplayer] Done loading scripts.
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo_dvdnav] Opening video.mp4
[bdmv/bluray] Opening video.mp4
[file] Opening video.mp4
[demux] Trying demuxers for level=normal.
[cplayer] Set property: shared-script-properties -> 1
[osd/libass] libass API version: 0x1502000
[osd/libass] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122-dirty
[osd/libass] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 4.2.1 (COMPLEX)
[osd/libass] Setting up fonts...
[lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
[lavf] Assuming this is an image format.
[demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat)
[cplayer] Opening done: video.mp4
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
[cplayer]  (+) Video --vid=1 (*) (av1 1280x720 59.940fps)
[cplayer]      Video --vid=2 [P] (png 1.000fps)
[cplayer]  (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/opengl] Initializing GPU context 'x11egl'
[vo/gpu/x11] X11 opening display: :0
[vo/gpu/x11] Display 0 (eDP1): [0, 0, 1920, 1080] @ 60.051768 FPS
[vo/gpu/x11] Current display FPS: 60.051768
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] Choosing visual EGL config 0xa, visual ID 0x20
[vo/gpu/opengl] GL_VERSION='4.6 (Core Profile) Mesa 22.0.3'
[vo/gpu/opengl] Detected desktop OpenGL 4.6.
[vo/gpu/opengl] GL_VENDOR='Intel'
[vo/gpu/opengl] GL_RENDERER='Mesa Intel(R) HD Graphics 4600 (HSW GT2)'
[vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.60'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] Assuming 60.051768 FPS for display sync.
[vd] Container reported FPS: 59.940060
[vd] Codec list:
[vd]     libdav1d (av1) - dav1d AV1 decoder by VideoLAN
[vd]     libaom-av1 (av1) - libaom AV1
[vd]     av1 - Alliance for Open Media AV1
[vd]     av1_cuvid (av1) - Nvidia CUVID AV1 decoder
[vd]     av1_qsv (av1) - AV1 video (Intel Quick Sync Video acceleration)
[vd] Opening decoder libdav1d
[vd] Looking at hwdec av1-nvdec...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.14
[vo/gpu/vaapi-egl] Going to probe surface formats (may log bogus errors)...
[vo/gpu/vaapi-egl] Done probing surface formats.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec av1-vaapi...
[vd] Trying hardware decoding via av1-vaapi.
[vd] Using underlying hw-decoder 'av1'
[vd] Selected codec: libdav1d (dav1d AV1 decoder by VideoLAN)
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     opus - Opus
[ad]     libopus (opus) - libopus Opus
[ad] Opening decoder opus
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: opus (Opus)
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[af] [in] 48000Hz stereo 2ch floatp
[af] [userspeed] 48000Hz stereo 2ch floatp
[af] [userspeed] (disabled)
[af] [convert] 48000Hz stereo 2ch floatp
[vd] Pixel formats supported by decoder: cuda vaapi yuv420p10le
[vd] Codec profile: Main (0x0)
[ffmpeg/video] av1: No support for codec av1 profile 0.
[vd] Hardware decoding of this stream is unsupported?
[vd] Requesting pixfmt 'yuv420p10le' from decoder.
[ffmpeg/video] av1: Your platform doesn't suppport hardware accelerated AV1 decoding.
[ffmpeg/video] av1: Failed to get pixel format.
[vd] Error while decoding frame (hardware decoding)!
[vd] Falling back to software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[ffmpeg/video] libdav1d: libdav1d 1.0.0
[vd] Using software decoding.
[vd] Decoder format: 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/auto CL=unknown
[vf] [in] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[vf] [userdeint] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 48000 Hz, stereo channels, floatp
[ao/pulse] Library version: 15.0.0
[ao/pulse] Proto: 35
[ao/pulse] Server proto: 4294967295
[ao/pulse] Channel layouts:
[ao/pulse]  - #fl
[ao/pulse]  - #fr
[ao/pulse]  - #fc
[ao/pulse]  - #lfe
[ao/pulse]  - #bl
[ao/pulse]  - #br
[ao/pulse]  - #flc
[ao/pulse]  - #frc
[ao/pulse]  - #bc
[ao/pulse]  - #sl
[ao/pulse]  - #sr
[ao/pulse]  - #tc
[ao/pulse]  - #tfl
[ao/pulse]  - #tfc
[ao/pulse]  - #tfr
[ao/pulse]  - #tbl
[ao/pulse]  - #tbc
[ao/pulse]  - #tbr
[ao/pulse] result: stereo
[ao/pulse] device buffer: 4800 samples.
[ao/pulse] using soft-buffer of 9600 samples.
[cplayer] AO: [pulse] 48000Hz stereo 2ch float
[cplayer] AO: Description: PulseAudio audio output
[autoconvert] inserting resampler
[swresample] format change, reinitializing resampler
[swresample] 48000Hz stereo floatp -> 48000Hz stereo float
[af] [out] 48000Hz stereo 2ch float
[cplayer] VO: [gpu] 1280x720 yuv420p10
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1280x720 yuv420p10 bt.2020-ncl/bt.2020/pq/limited/display SP=49.261086 CL=mpeg2/4/h264
[vo/gpu] Resize: 1280x720
[vo/gpu] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1280x720 (1:1)
[vo/gpu] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Texture for plane 0: 1280x720
[vo/gpu] Texture for plane 1: 640x360
[vo/gpu] Texture for plane 2: 640x360
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] Dither to 8.
[cplayer] first video frame after restart shown
[cplayer] Set property: shared-script-properties -> 1
[cplayer] audio ready
[cplayer] delaying audio start 0.007500 vs. 0.000000, diff=0.007500
[cplayer] playback restart complete @ 0.000000, audio=ready, video=playing
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000
[cplayer] starting audio playback
[ao/pulse] starting AO
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.008
[vo/gpu/x11] Disabling screensaver.
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.001 Dropped: 22
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000 Dropped: 24
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Regular.ttf, 0, NotoSans-Regular
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x128.
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000 Dropped: 31
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:00 / 00:05:13 (0%) A-V:  0.000 Dropped: 35
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:02 / 00:05:13 (1%) A-V:  0.000 Dropped: 105
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:06 / 00:05:13 (2%) A-V:  0.000 Dropped: 244
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:07 / 00:05:13 (2%) A-V:  0.000 Dropped: 273
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:08 / 00:05:13 (3%) A-V:  0.000 Dropped: 291
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:08 / 00:05:13 (3%) A-V:  0.000 Dropped: 303
[cplayer] Set property: shared-script-properties -> 1
[statusline] AV: 00:00:09 / 00:05:13 (3%) A-V:  0.000 Dropped: 344
[cplayer] EOF code: 5  
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] Exiting... (Quit)
[cplayer] Set property: shared-script-properties -> 1
[vo/gpu/x11] Enabling screensaver.

That is the first few seconds.

A few things to consider.

The video is 720p 10 bit av1 vcodec and 60 fps. mpv will use dav1d cpu-based video decoder unless your Nvidia gpu is Ampere which it isn’t I’m assuming.

Secondly, gpu-hq profile isn’t the best option because it wastes resources. To elaborate, human eye is far more sensitive to changes in Luma(greyscale) than Chroma(colour). So using cscale=spline36 is wasteful. Use cscale=bilinear(fast but crappy quality) and our eyes can’t tell the difference unless the screen resolution is much higher than video resolution. Your screen is 1080p and video 720p, so you’re fine.

Also, debanding is extremely resource intensive. Majority of the time it increases quality but sometimes there is no discernible quality improvement especially if the video is high resolution or high bitrate.

Apart from video decoding, other demanding parts are debanding, scaling and interpolation. ( here dscaling isn’t required as video is 720p and screen 1080p . Also, video as well as screen are 60 fps, so no interpolation/tscale is required)

Try this 1st on iGPU. There will be a few dropped frames perhaps. Then try on dGPU.

mpv --no-config -v --scale=spline36 --cscale=bilinear --fs --deband=no URL
1 Like

Thanks for replying.
You are right there is some framedrop on iGPU, but NOT on dGPU. So here is what I did:
I created an mpv-nvidia script in my ~/.local/bin to use as a backend for smplayer and everything is fine now.

cat $(which mpv-nvidia)

#!/bin/bash                                                                                       

if lsmod | grep -q nvidia ;then
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia
a mpv "$@"
else
mpv "$@"
fi

I got these variable names from the prime-run script so that my mpv-nvidia doesn’t depend on nvidia-prime being installed.

Limitations:

  1. Washed out colors under wayland
  2. Framedrop on iGPU/Integrated Mode ( Not very important for me as I rarely use my device on iGPU only and when I do, I usually don’t play hdr videos)