With this code:
sudo ffmpeg -y -device /dev/dri/card0 -r 30 -framerate 30 -f kmsgrab -i -
-f alsa -i default -vf
'hwmap=derive_device=vaapi,scale_vaapi=w=1280:h=720:format=nv12' -c:v
h264_vaapi -g 60 -b:v 5500k -c:a aac -ac 2 -b:a 320k -f flv output.flv
record working, no errors in ffmpeg, but no audio.
With this code:
sudo ffmpeg -y -device /dev/dri/card0 -r 30 -framerate 30 -f kmsgrab -i -
-f pulse -i default -vf
'hwmap=derive_device=vaapi,scale_vaapi=w=1280:h=720:format=nv12' -c:v
h264_vaapi -g 60 -b:v 5500k -c:a aac -ac 2 -b:a 320k -f flv output2.flv
i got:
[kmsgrab @ 0x55576139cc00] Using plane 48 to locate framebuffers.
[kmsgrab @ 0x55576139cc00] Template framebuffer is 85: 1920x1080 format
34325258 modifier 0 flags 0.
Input #0, kmsgrab, from 'pipe:':
   Duration: N/A, start: 1702202199.445880, bitrate: N/A
   Stream #0:0: Video: wrapped_avframe, drm_prime, 1920x1080, 29.92 tbr,
1000k tbn
default: No such process

вс, 10 дек. 2023 г. в 04:20, Ferdi Scholten<fe...@sttc-nlp.nl>:

Cant record desktop video and audio with kmsgrab and pulseaudio/alsa on
debian/arch system with xorg. I got video without audio or ffmpeg fail to
record. If record only video with kmsgrab all works. How i can record
video
and audio with kmsgrab and alsa/pulseaudio?
_______________________________________________

kmsgrab only records video, you need to specify an audio source if you
also want to record that.

But we do not have a clue about what you are doing because you forgot
the most important part of your question!

In order to be able to start helping you we need to see what you have
already tried so please specify your full commandline and the full
output of the terminal for that command.
_______________________________________________

Maybe you need to add
-flvflags aac_seq_header_detect

Or even better, use another container like MP4 or MKV instead of the obsolete FLV
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to