You are not logged in.

#1 2020-02-27 02:40:50

chenjie199234
Member
Registered: 2019-10-12
Posts: 5

problems to use ffmpeg kmsgrab to capture screen on wayland

i can't use ffmpeg's kmsgrab to capture screen on my pc
OS:                      Archlinux
WM:                    Sway 1.4
ffmpeg:             n4.2.2
cpu:                    i5 7200u
gpu:                    the cpu's HD620
driver:                intel-media-driver 19.4.0

here is my ffmpeg cmd:
exec on root:
ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4

here is the out put:
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (Arch Linux 9.2.1+20200130-2) 20200130
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[kmsgrab @ 0x5644e2b79fc0] Using plane 31 to locate framebuffers.
[kmsgrab @ 0x5644e2b79fc0] Failed to get framebuffer 122: Invalid argument.
pipe:: Invalid argument

i report this on sway's github:
https://github.com/swaywm/sway/issues/4961

they said this is a ffmpeg's bug,i don't known how to report this to ffmpeg,the way to report to ffmpeg is really complex,and i can't do that.

is there anyone can give me a hand and solve this problem

Offline

#2 2023-11-03 11:27:53

chovy
Banned
Registered: 2020-12-29
Posts: 62

Re: problems to use ffmpeg kmsgrab to capture screen on wayland

I'm also trying to figure this out.

Offline

#3 2023-11-03 14:26:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,786
Website

Re: problems to use ffmpeg kmsgrab to capture screen on wayland

Mod note: Closing this old, abandoned topic. Banning for repeat offending, even after previous bans.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB