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

I'm broadcasting to Justin TV with this script found on Github on Ubuntu 12.04.

I am having issues with the audio going out of sync and getting worse as I go through my playlist.

This is the code I'm using for avconv. And I can't figure out how to set the bitrate for the audio. I've seen -b as bandwidth but it looks like it should be the audio bitrate.

How to resolve this ?

avconv \
  -f x11grab -s $INRES  -r "$FPS" -i :0.0 \
  -f alsa -ac 2 -i pulse  \
  -vcodec libx264 -s $OUTRES -preset $QUAL \
  -acodec libmp3lame -ar 44100 -threads 4 -qscale 3 -b:a 98304  -bufsize 512k \
  -f flv "rtmp://$STREAM_KEY"
share|improve this question

Try this:

Edit /etc/pulse/daemon.conf

make sure it contains these lines (adding or uncommenting)

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

share|improve this answer
it had an alternative of 48000 – Kranium31 Nov 24 '13 at 19:30
nothing changed btw the audio is way ahead – Kranium31 Nov 24 '13 at 19:46

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.