Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When streaming my desktop to using avconv audio and video are out of sync. Sometimes it is already out of sync when starting the stream and sometimes they just drift apart after a while. This is the script I use for streaming:

INRES="1920x1080" # input resolution
FPS="30" # target FPS
QUAL="medium" # one of the many FFMPEG preset
STREAM_KEY=$(cat ~/.twitch_key)

avconv -v quiet -f x11grab -show_region $SHOW_REGION -s "$INRES" -r "$FPS" -i :0.0+$OFFSET \
-f alsa -ac 2 -b:a "$AUDIOBITRATE" -i pulse -c:v libx264 -crf 30 -preset "$QUAL" \
-s "$OUTRES" -vol 11200 -c:a libmp3lame -ar 44100 -pix_fmt yuv420p -maxrate "$MAXRATE" -bufsize "$BUFSIZE" \
-f flv "$URL"

exit $?
share|improve this question
Try with the -async option:… – Takkat Aug 24 '13 at 19:24
@Takkat This option makes the sound stutter completely. – c_korn Aug 24 '13 at 23:25
This piece of software looks fine: This commit also seems to address the issue I described here:… – c_korn Aug 28 '13 at 20:05

When ssr outputs:

Warning: Audio input is more than 5% too fast, video and audio will be out of sync.


Warning: Audio input is more than 5% too slow, video and audio will be out of sync.

Do this:

Edit /etc/pulse/daemon.conf, make sure it contains these lines (adding or uncommenting):

default-sample-rate = 44100
alternate-sample-rate = 44100

There is an upstream bug which is marked as fixed but the patch is not in the repository of Ubuntu. The simplescreenrecorder bug which contains this workaround.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.