[FFmpeg-user] kmsgrab on non primary card, libva/hwmap advice?

test thisisatest0667 at gmail.com
Thu Jan 30 13:00:40 EET 2020

Hi All. Thanks in advance for any assistance provided.

I've been trying to get kmsgrab to work on my second rx570.
Aim is to record multiple framebuffers on both cards. Both cards are
maxed in terms of CRTC's, so switching all to one card isn't an
option. x11grab has not been performant enough.

I have three "cards":

/dev/dri/card0 -> intel iGPU
/dev/dri/card1 -> rx 570
/dev/dri/card2 -> rx 570

I have card1 working fine, it's the primary card. I haven't tried card0.

/home/test/.local/bin/ffmpeg  -framerate 60 -device /dev/dri/card1  -f
kmsgrab  -i - -vf 'hwmap=derive_device=vaapi,hwdownload,format=bgr0'

Whilst trying for card2 and a similar command I get errors.
I've tried advice under https://trac.ffmpeg.org/wiki/Hardware/VAAPI
regarding device selection.
The error doesn't change?

./ffmpeg -init_hw_device
-filter_hw_device foo -framerate 60 -device /dev/dri/card2  -f kmsgrab
 -i - -vf 'hwmap=
derive_device=vaapi,hwdownload,format=bgr0' /home/test/card2.mp4

Any advice would be appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: card1_text_output_example
Type: application/octet-stream
Size: 4804 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200130/846b4379/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: card2_text_output_error_example
Type: application/octet-stream
Size: 2771 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200130/846b4379/attachment-0001.obj>

More information about the ffmpeg-user mailing list