Jump to content

Recommended Posts

Posted (edited)
1 hour ago, jock said:

I compiled mpv 0.40.0 on Debian Trixie with the patches for v4l2request, but the outcome is messy at best. There is a new hwdec v4l2request, but also two new gpu-hwdec-interop v4l2request and v4l2request-overlay. It works with acceleration when launched from a terminal, but in wayland/weston v4l2request refuses to work. I don't know what happened, but it looks like a big regression from 0.39. Better use the old mpv version IMHO.

 

I thought that v4l2request was exclusively in this github project and branch: https://github.com/philipl/mpv/tree/v4l2request

Which github project and branch/release are you trying?

 

I successfully compiled and installed the mpv from https://github.com/philipl/mpv/tree/v4l2request

I made the /etc/mpv.conf as per the original post

Result: 50% cpu in 4 cores, about half dropped frames:

Spoiler

roberto@orangepizero3:~/mpv-philippl-v4l2request/mpv$ DISPLAY=:0.0 mpv -v ~/donde\ venderan\ buen\ trago\ 720p.mp4 
[cplayer] Command line options: '-v' '/home/roberto/donde venderan buen trago 720p.mp4'
[cplayer] mpv v0.1.0-18356-g17a8ef7e8 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Oct  5 2025 18:48:33
[cplayer] libplacebo version: v7.349.0
[cplayer] FFmpeg version: 7.1.1-1
[cplayer] FFmpeg library versions:
[cplayer]    libavcodec      61.19.101
[cplayer]    libavdevice     61.3.100
[cplayer]    libavfilter     10.4.100
[cplayer]    libavformat     61.7.100
[cplayer]    libavutil       59.39.100
[cplayer]    libswresample   5.3.100
[cplayer]    libswscale      8.3.100
[cplayer] Configuration: 
[cplayer] List of enabled features: alsa build-date caca cdda cplugins debug dmabuf-interop-gl dmabuf-wayland drm dvbin dvdnav egl egl-drm egl-wayland egl-x11 ffmpeg gbm gl glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libplacebo linux-fstatfs lua52 memfd-create memrchr pipewire posix posix-shm ppoll pthread-condattr-setclock pulse rubberband rubberband-3 sixel sndio sndio-1-9 uchardet v4l2request vaapi vaapi-drm vaapi-wayland vaapi-x11 vdpau vector vk-khr-display vt.h vulkan wayland wayland-protocols-1-32 wayland-protocols-1-38 wayland-protocols-1-39 wayland-protocols-1-41 wayland-protocols-1-44 x11 xv zlib
[cplayer] Setting option 'v' = '' (flags = 😎
[clipboard] Initialized vo clipboard backend.
[cplayer] Waiting for scripts...
[cplayer] Set property: user-data/osc/visibility="auto" -> 1
[cplayer] Set property: user-data/osc/margins={"l":0,"b":0,"r":0,"t":0} -> 1
[cplayer] Done loading scripts.
[cplayer] Running hook: auto_profiles/on_before_start_file
[cplayer] Failed sending hook command auto_profiles/on_before_start_file. Removing hook.
[cplayer] Running hook: auto_profiles/on_load
[cplayer] Failed sending hook command auto_profiles/on_load. Removing hook.
[cplayer] Running hook: ytdl_hook/on_load
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] playlist hook
[ifo_dvdnav] Opening /home/roberto/donde venderan buen trago 720p.mp4
[bdmv/bluray] Opening /home/roberto/donde venderan buen trago 720p.mp4
[file] Opening /home/roberto/donde venderan buen trago 720p.mp4
[demux] Trying demuxers for level=normal.
[cplayer] Set property: user-data/osc/margins={"l":0,"b":0,"r":0,"t":0} -> 1
[cplayer] Set property: user-data/osc/margins={"l":0,"b":0,"r":0,"t":0} -> 1
[osd/libass] libass API version: 0x1703000
[osd/libass] libass source: tarball: 0.17.3
[osd/libass] Shaper: FriBidi 1.0.15 (SIMPLE) HarfBuzz-ng 10.2.0 (COMPLEX)
[osd/libass] Setting up fonts...
[lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048.
[demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat)
[cplayer] Opening done: /home/roberto/donde venderan buen trago 720p.mp4
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[find_files] Loading external files in /home/roberto/
[cplayer] Running hook: auto_profiles/on_preloaded
[cplayer] Failed sending hook command auto_profiles/on_preloaded. Removing hook.
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
[cplayer] ● Video  --vid=1               (h264 1280x720 29.97 fps) [default]
[cplayer] ● Audio  --aid=1  --alang=eng  (aac 2ch 44100 Hz 128 kbps) [default]
[vo/gpu-next] Probing for best GPU context.
[vo/gpu-next/auto] Initializing GPU context 'auto'
[vo/gpu-next/vulkan] Initializing GPU context 'waylandvk'
[vo/gpu-next/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu-next/libplacebo] Creating vulkan instance with extensions:
[vo/gpu-next/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu-next/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_KHR_wayland_surface
[vo/gpu-next/libplacebo] Failed creating instance: VK_ERROR_INCOMPATIBLE_DRIVER
[vo/gpu-next/libplacebo] Failed initializing vulkan instance
[vo/gpu-next/vulkan] Initializing GPU context 'x11vk'
[vo/gpu-next/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu-next/libplacebo] Creating vulkan instance with extensions:
[vo/gpu-next/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu-next/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_KHR_xlib_surface
[vo/gpu-next/libplacebo] Failed creating instance: VK_ERROR_INCOMPATIBLE_DRIVER
[vo/gpu-next/libplacebo] Failed initializing vulkan instance
[vo/gpu-next/opengl] Initializing GPU context 'wayland'
[vo/gpu-next/opengl] Initializing GPU context 'x11egl'
[vo/gpu-next/x11] X11 opening display: :0.0
[vo/gpu-next/x11] Display 0 (HDMI-1): [0, 0, 1920, 1080] @ 60.000000 FPS
[vo/gpu-next/x11] Current display FPS: 60.000000
[vo/gpu-next/opengl] EGL_VERSION=1.5
[vo/gpu-next/opengl] EGL_VENDOR=Mesa Project
[vo/gpu-next/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu-next/opengl] Trying to create Desktop OpenGL context.
[vo/gpu-next/opengl] Choosing visual EGL config 0x9, visual ID 0x21
[vo/gpu-next/x11] The XPresent extension was found.
[vo/gpu-next/x11] XPresent enabled.
[vo/gpu-next/opengl] GL_VERSION='3.1 Mesa 25.0.7-2'
[vo/gpu-next/opengl] Detected desktop OpenGL 3.1.
[vo/gpu-next/opengl] GL_VENDOR='Mesa'
[vo/gpu-next/opengl] GL_RENDERER='Mali-G31 (Panfrost)'
[vo/gpu-next/opengl] GL_SHADING_LANGUAGE_VERSION='1.40'
[vo/gpu-next/opengl] Loaded extension GL_ARB_sync.
[vo/gpu-next/opengl] Loaded extension GL_ARB_timer_query.
[vo/gpu-next/opengl] Loaded extension GL_ARB_invalidate_subdata.
[vo/gpu-next/opengl] Loaded extension GL_ARB_get_program_binary.
[vo/gpu-next/opengl] Loaded extension GL_ARB_buffer_storage.
[vo/gpu-next/opengl] Loaded extension GL_ARB_shader_image_load_store.
[vo/gpu-next/opengl] Loaded extension GL_ARB_shader_storage_buffer_object.
[vo/gpu-next/opengl] Loaded extension GL_ARB_arrays_of_arrays.
[vo/gpu-next/opengl] Loaded extension GL_ARB_debug_output.
[vo/gpu-next/opengl] Loaded extension GL_KHR_debug.
[vo/gpu-next/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu-next/libplacebo] Detected OpenGL version strings:
[vo/gpu-next/libplacebo]     GL_VERSION:  3.1 Mesa 25.0.7-2
[vo/gpu-next/libplacebo]     GL_VENDOR:   Mesa
[vo/gpu-next/libplacebo]     GL_RENDERER: Mali-G31 (Panfrost)
[vo/gpu-next/libplacebo]     GL_SHADING_LANGUAGE_VERSION: 1.40
[vo/gpu-next/libplacebo] GPU information:
[vo/gpu-next/libplacebo]     GLSL version: 140
[vo/gpu-next/libplacebo]       subgroup_size:             0
[vo/gpu-next/libplacebo]       min_gather_offset:         0
[vo/gpu-next/libplacebo]       max_gather_offset:         0
[vo/gpu-next/libplacebo]     Limits:
[vo/gpu-next/libplacebo]       thread_safe:               0
[vo/gpu-next/libplacebo]       callbacks:                 1
[vo/gpu-next/libplacebo]       max_buf_size:              18446744073709551615
[vo/gpu-next/libplacebo]       max_ubo_size:              65536
[vo/gpu-next/libplacebo]       max_ssbo_size:             134217728
[vo/gpu-next/libplacebo]       max_vbo_size:              18446744073709551615
[vo/gpu-next/libplacebo]       max_mapped_size:           18446744073709551615
[vo/gpu-next/libplacebo]       max_buffer_texels:         0
[vo/gpu-next/libplacebo]       align_host_ptr:            0
[vo/gpu-next/libplacebo]       host_cached:               0
[vo/gpu-next/libplacebo]       max_tex_1d_dim:            16384
[vo/gpu-next/libplacebo]       max_tex_2d_dim:            16384
[vo/gpu-next/libplacebo]       max_tex_3d_dim:            16384
[vo/gpu-next/libplacebo]       blittable_1d_3d:           0
[vo/gpu-next/libplacebo]       buf_transfer:              1
[vo/gpu-next/libplacebo]       align_tex_xfer_pitch:      4
[vo/gpu-next/libplacebo]       align_tex_xfer_offset:     32
[vo/gpu-next/libplacebo]       max_variable_comps:        16380
[vo/gpu-next/libplacebo]       max_constants:             0
[vo/gpu-next/libplacebo]       max_pushc_size:            0
[vo/gpu-next/libplacebo]       align_vertex_stride:       1
[vo/gpu-next/libplacebo]       fragment_queues:           1
[vo/gpu-next/libplacebo]       compute_queues:            0
[vo/gpu-next/libplacebo]     External API interop:
[vo/gpu-next/libplacebo]       UUID: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
[vo/gpu-next/libplacebo]       PCI: 0000:00:00:0
[vo/gpu-next/libplacebo]       buf export caps: 0x0
[vo/gpu-next/libplacebo]       buf import caps: 0x0
[vo/gpu-next/libplacebo]       tex export caps: 0x8
[vo/gpu-next/libplacebo]       tex import caps: 0x8
[vo/gpu-next/libplacebo]       sync export caps: 0x0
[vo/gpu-next/libplacebo]       sync import caps: 0x0
[vo/gpu-next] Assuming 60.000000 FPS for display sync.
[vd] Container reported FPS: 29.970030
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening decoder h264
[vd] No hardware decoding requested.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected decoder: h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     aac - AAC (Advanced Audio Coding)
[ad]     aac_fixed (aac) - AAC (Advanced Audio Coding)
[ad] Opening decoder aac
[ad] Requesting 1 threads for decoding.
[ad] Selected decoder: aac - AAC (Advanced Audio Coding)
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[af] [in] 44100Hz stereo 2ch floatp
[af] [userspeed] 44100Hz stereo 2ch floatp
[af] [userspeed] (disabled)
[af] [convert] 44100Hz stereo 2ch floatp
[vd] DR failed - disabling.
[vd] Using software decoding.
[vd] Decoder format: 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vd] Using container aspect ratio.
[vf] [in] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vf] [userdeint] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vf] [userdeint] (disabled)
[vf] [autovflip] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vf] [autovflip] (disabled)
[vf] [autorotate] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vf] [autorotate] (disabled)
[vf] [convert] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vf] [convert] (disabled)
[vf] [out] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[osd/libass] libass API version: 0x1703000
[osd/libass] libass source: tarball: 0.17.3
[osd/libass] Shaper: FriBidi 1.0.15 (SIMPLE) HarfBuzz-ng 10.2.0 (COMPLEX)
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[ao] Trying audio driver 'pipewire'
[ao/pipewire] requested format: 44100 Hz, stereo channels, floatp
[ao/pipewire] Headers version: 1.4.2
[ao/pipewire] Library version: 1.4.2
[W][19:21:30.962233] pw.conf      | [          conf.c: 1182 try_load_conf()] can't load config client.conf: No such file or directory
[E][19:21:30.962448] pw.conf      | [          conf.c: 1215 pw_conf_load_conf_for_context()] can't load config client.conf: No such file or directory
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 44100 Hz, stereo channels, floatp
[ao/pulse] Library version: 17.0.0
[ao/pulse] Proto: 35
[ao/pulse] Server proto: 35
[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: 6172 samples.
[ao/pulse] using soft-buffer of 8820 samples.
[cplayer] AO: [pulse] 44100Hz stereo 2ch float
[cplayer] AO: Description: PulseAudio audio output
[autoconvert] inserting resampler
[swresample] format change, reinitializing resampler
[swresample] 44100Hz stereo floatp -> 44100Hz stereo float
[af] [out] 44100Hz stereo 2ch float
[cplayer] VO: [gpu-next] 1280x720 yuv420p
[cplayer] VO: Description: Video output based on libplacebo
[vo/gpu-next] reconfig to 1280x720 yuv420p bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1280x720+0+0 A=none
[vo/gpu-next] Window size: 1280x720 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu-next] Video source: 1280x720 (1:1)
[vo/gpu-next] Video display: (0, 0) 1280x720 -> (0, 0) 1280x720
[vo/gpu-next] Video scale: 1.000000/1.000000
[vo/gpu-next] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu-next] Video borders: l=0 t=0 r=0 b=0
[vo/gpu-next/libplacebo] Dithering to 8 bit depth
[cplayer] first video frame after restart shown
[cplayer] audio ready
[cplayer] starting audio playback
[vo/gpu-next/x11] Disabling screensaver.
[cplayer] playback restart complete @ 0.000000, audio=playing, video=playing
[ao/pulse] starting AO
[vo/gpu-next/libplacebo] Detected fps ratio 0.0000 below threshold 0.0100, disabling interpolation
[cplayer] Set property: user-data/osc/margins={"l":0,"b":0,"r":0,"t":0} -> 1
[vo/gpu-next/libplacebo] Detected fps ratio 0.5000 exceeds threshold 0.0100, re-enabling interpolation
[vo/gpu-next/libplacebo] Estimated source FPS: 29.970, display FPS: 9.990
[vo/gpu-next/libplacebo] Estimated source FPS: 29.970, display FPS: 14.985
[vo/gpu-next/libplacebo] Estimated source FPS: 29.970, display FPS: 9.990
[vo/gpu-next/libplacebo] Estimated source FPS: 29.970, display FPS: 14.985
[cplayer] EOF code: 5  
[statusline] AV: 00:00:15 / 00:04:18 (6%) A-V:  0.000 Dropped: 283
[cplayer] finished playback, success (reason 3)
[cplayer] Running hook: ytdl_hook/on_after_end_file
[vo/gpu-next/x11] Enabling screensaver.
[cplayer] Exiting... (Quit)
roberto@orangepizero3:~/mpv-philippl-v4l2request/mpv$

 

I don't see any mention of hwdec=drm in the mpv log

 

I used the libplacebo from Trixie, not compiled on my own... I can try that next. <- final update for this post: libplacebo downloaded and built by myself did not help... but now I will try mpv 0.3.9

Edited by robertoj
Posted
39 minutes ago, robertoj said:

Which github project and branch/release are you trying?

mpv official github repo. v4l2request commits are in a pull request.

Posted

I am not sure if I am using the git command correctly to get mpv-0.3.9 with PR14690.. Please help

 

roberto@orangepizero3:~$ mkdir mpv-official
roberto@orangepizero3:~$ cd mpv-official/
roberto@orangepizero3:~/mpv-official$ git clone https://github.com/mpv-player/mpv

roberto@orangepizero3:~/mpv-official$ cd mpv

roberto@orangepizero3:~/mpv-official/mpv$ git checkout -b release/0.39

roberto@orangepizero3:~/mpv-official/mpv$ git fetch origin pull/14690/head:0.39

roberto@orangepizero3:~/mpv-official/mpv$ nano video/out/gpu/hwdec.c

... I don't see the added changes in the hwdec.c file

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines