[FFmpeg-user] audio is out of sync and "ALSA buffer xrun"

LANGLOIS Olivier PIS -EXT olivier.pis.langlois at transport.alstom.com
Mon Feb 17 20:21:39 CET 2014


note that I'm not a ffmpeg expert. I would say that if anything blocks downstream in ffmpeg pipe, data stops being collected from the input.

In your setup if it only happen once at the beginning, it could be caused by rtmp "handshake" which is 3 or 4 ways if my memory is correct. Check Adobe "open" specs of rtmp to validate that. You can then approximate the time the handshake takes with rtt between you and your server with ping.

Then you can check your alsa capture buffer size in time. I don't know if I added extra debug switches on when I compiled my kernel but you should be able to get some hw params of your alsa capture stream while it is used. it should be at

cat /proc/asound/cardX/pcmXc/subX/hw_param

divide buffer_size/rate

it will give you the number of seconds before you get a buffer overrun.

> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of YuGiOhJCJ Mailing-List
> Sent: Monday, February 17, 2014 1:59 PM
> To: FFmpeg user questions
> Subject: Re: [FFmpeg-user] audio is out of sync and "ALSA buffer xrun"
>
> In fact, all is good for the CPU usage and for the Internet bandwidth usage:
> - with top: ffmpeg is using approximately 16% of my CPU
> - with iftop: ffmpeg is using approximately 132kb/s of my Bandwidth (it
> represents a little part of my total upload bandwidth that is approximately at
> 800kb/s).
>
> A thing that I can remark is that the "ALSA buffer xrun" message seems to
> appear only 1 time at the beginning of the capture now.
>
> Does it tell you something?
>
> On Mon, 17 Feb 2014 16:52:10 +0000
> LANGLOIS Olivier PIS -EXT <olivier.pis.langlois at transport.alstom.com>
> wrote:
>
> > I would say that you have something too slow in your setup.
> >
> > Monitor ffmpeg cpu usage with top
> >
> > but since you mention NFS and rtmp over the Internet, I would suspect
> your network connection. If ffmpeg cannot push out the stream fast enough,
> something in input needs to be dropped to not run out of memory in the
> long run. In your instance, it is audio.
> >



________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.


More information about the ffmpeg-user mailing list