Question? The task is to record simultaneously everything that we see on the monitor and hear from the speakers.
I wrote the following script:
Set the variable:
speaker=alsa_output.pci-[my speakers].analog-stereo.monitor
We write:
ffmpeg -use_wallclock_as_timestamps 1 -f pulse \
-i $speaker -f x11grab -s 1200x900 -r 15 -i :0.0 \
-vcodec qtrle screencast2.mov
The problem is that the sound is recorded with a delay, and of course I need it synchronously. What is the reason? What to fix?
I plowed the entire I> and could not find the answer.
mov
? Have you tried using different encoders? – mchid Feb 09 '22 at 11:32ffmpeg -use_wallclock_as_timestamps 1 -f pulse -i $speaker -f x11grab -s 1200x900 -r 15 -i :0.0 -acodec aac -vcodec mpeg4 -preset medium -qscale:v 0 rec.mkv
– mchid Feb 10 '22 at 06:13-vcodec libx264 -crf 0 -preset ultrafast -acodec pcm_s16le file.mkv
part at the end of your command. – mchid Feb 10 '22 at 06:16-qscale:v 0
– mchid Feb 10 '22 at 06:18