Ffmpeg makes choppy videos when recording with audio
Well, my issue is simple to explain, but I tried everything to solve it without success.
I like recording gameplays, just for fun. The game I currently make recordings for is not resource heavy (it's Doom 2 through GZDoom). I'm using Lubuntu 22.04.
The issue is, if I record without including the audio, then the video plays smoothly after being recorded. But if I record including the audio, no matter what parameters, codecs, bitrate or anything I use, then the video is barely watchable, with lots of choppiness, and even with delay between audio and video, apparently.
SimpleScreenRecorder works fine, but sometimes there are few frames dropped and I don't like it much. OBS is very heavy for my hardware (Mac Mini 2016, Intel Core i5 1.4 GHz 4260U, Intel HD Graphics 4000, 4 GB RAM).
I also tried VAAPI, with same results as above.
And the thing is that I remember recording some years ago, with no issues at all.
I'd definately would encode to x264 and use ffmpeg's Intel QuickSync support to save power. Encoding vp9 must be a hard workload for your small machine. Probably the video only doesn't stutter due to interlacing. If you'd want to go hardcore, you could try to profile your task with minimal overhead by using perf record.