[FFmpeg-user] Desktop audio falls behind when recording microphone + desktop audio + screen using ffmpeg
anders.ytterstrom at gmail.com
Fri Sep 13 00:09:21 CEST 2013
I have put together this script for recording my microphone, my desktop
audio and my screen using ffmpeg:
ffmpeg -y -vsync 1 \
-f pulse -ac 2 -i
-f pulse -ac 1 -ar 25000 -i
-filter_complex aresample=async=1,amix=duration=shortest,apad \
-f x11grab -r $FPS -s $RESO -i :0.0 \
-acodec libvorbis \
-vcodec libx264 -pix_fmt yuv420p -preset $PRESET -threads 0 \
Everything is recorded and between the screen and the microphone sound
there are no issues what so ever, however the desktop audio falls
It begins in sync but gets worse over time during playback, also in
ffplay. It does not matter what application I am getting sound from:
both Dota 2 (linux native) and Rhythmbox (playing a couple of seconds
of song then stops, wait and repeat) gets out of sync.
The terminal output complain about
"ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred22.73
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred"
and similarbut I do not know what that means.
Full terminal output here:
Please help me, I am really close to get this working!
More information about the ffmpeg-user