[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 17:52:10 CET 2014
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.
> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of YuGiOhJCJ Mailing-List
> Sent: Saturday, February 15, 2014 1:15 PM
> To: FFmpeg user questions
> Subject: Re: [FFmpeg-user] audio is out of sync and "ALSA buffer xrun"
>
> OK.
> I found how to stop having this "ALSA buffer xrun" message while I am on a
> NFS share.
> The solution was to update my x264 library.
> Indeed, I was using the 20120729.2245 tarball that was a bit old and now I am
> using the 20140207.2245 tarball [1].
> But the "ALSA buffer xrun" message is still there when I am streaming on
> twitch.tv.
>
> So, do you see a missing option for my command in order to avoid these
> "ALSA buffer xrun" messages?
>
> [1] ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
>
> On Tue, 11 Feb 2014 18:24:36 +0100
> YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
>
> > OK. I found a nice way to stop having this "ALSA buffer xrun" message:
> > $ ffmpeg -y -f alsa -i default -f x11grab -r 10 -s 640x480 -async 1 -i
> > :0.0 -strict -2 -c:a aac -c:v libx264 -pix_fmt yuv420p -preset
> > ultrafast -s 640x480 -threads 0 -ar 44100 -b:a 64k -b:v 64k -bufsize
> > 64k -f flv out.flv
> >
> > The command is not the only thing I have changed.
> > As I am on a network folder (shared with NFS), the read/write access is
> slower (I don't know how to find the exact speed value) than a normal
> directory.
> > So, I go in the /tmp normal directory.
> > If I stay in my /home directory shared over the network I still have these
> "ALSA buffer xrun" messages.
> >
> > Also, if I replace "out.flv" by a stream like "rtmp://live-
> fra.twitch.tv/app/live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", then I
> got the "ALSA buffer xrun" messages.
> >
> > So, the only way I found to avoid this "ALSA buffer xrun" message (and so
> the audio out of sync) is to write to a local file (I mean not over the network)
> and to use the command line above.
> >
> > Do you know how I can avoid this "ALSA buffer xrun" message when I am
> > over the network ? (e.g., NFS or twitch)
> >
> > Thank you.
> > Best regards.
> >
> > On Fri, 7 Feb 2014 14:47:57 +0100
> > YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
> >
> > > OK. I have upgrade from ffmpeg version 1.2 to ffmpeg version 2.1.git
> (474db7a696a34582ee655c07e5073a6702236be0).
> > > Also, you can find attached to this mail the complete console output of
> this command:
> > > ffmpeg -y -f x11grab -r 15 -s 640x480 -i :0.0 -f alsa -i default
> > > out.mkv 1>&2 2>ffmpeg_stdout_stderr.txt
> > >
> > > Any suggestion for my problem?
> > >
> > > On Thu, 6 Feb 2014 19:22:09 +0000 (UTC) Carl Eugen Hoyos
> > > <cehoyos at ag.or.at> wrote:
> > >
> > > > YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist <at> laposte.net> writes:
> > > >
> > > > > I am using ffmpeg version 1.2.
> > > >
> > > > Please test current git head before reporting problems.
> > > >
> > > > > To record (audio/video) my desktop with ffmpeg, I use this
> command:
> > > > > $ ffmpeg -f x11grab -r 15 -s 640x480 -i :0.0 -f alsa -i default
> > > > > out.mkv
> > > >
> > > > Please add the complete, uncut console output.
> > > >
> > > > Carl Eugen
> > > >
> > > > _______________________________________________
> > > > ffmpeg-user mailing list
> > > > ffmpeg-user at ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
________________________________
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