[FFmpeg-user] Realtime Audio Transcoding delay

shahab shirazi shahab.sh.70 at gmail.com
Wed Dec 26 21:55:40 CET 2012


I talked to Justin Ruggles in the IRC channel and found the problem.
The problem is that libav (and most probably ffmpeg) has a 32kb buffer and
only flushes when it's full and since the audio that I'm using was very low
quality, 32 kb means over 8 seconds. Here is a patch I got that is supposed
to fix it (I cannot confirm until next week when I go home and re-compile
ffmpeg):
http://goo.gl/1SkLw
On 26 Dec 2012 18:56, "Roger Pack" <rogerdpack2 at gmail.com> wrote:

> On 12/21/12, shahab shirazi <shahab.sh.70 at gmail.com> wrote:
> > Hi,
> >
> > I'm writing an Android app. This app gets audio stream from the mic,
> > encodes it and sends this stream to my server (through a tcp connection).
> > The server is supposed to read this stream, transcode it on the fly and
> > send it to an external device which only supports g726 audio format.
> >
> > Now the problem is the delay. Currently it's about 10 seconds. After some
> > digging here is what I found:
> > The Android app -> server seems to be working fine. Sends audio stream of
> > AMR-NB format, 8000 Hz, 1 channels, flt, 12 kb/s
> > Server feeds ffmpeg (or vlc) at about 1.6 KBytes/s and it takes about 8
> > seconds for ffmpeg/vlc to output any data. This is the bottle neck.
> >
> > Here is the command I used for ffmpeg:
> >     ffmpeg -i - -acodec g726 -ar 8k -ac 1 -b:a 8k -f wav -
>
> Is there latency introduced "before" it hits ffmpeg?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list