[Libav-user] Live MP3 stream transcoding delay
Igor Serganov
iserganoff at gmail.com
Tue Mar 28 18:59:14 EEST 2023
Hey Team,
I have managed to determine the function where the actual delay happens:
`avformat_open_input`
Event when I set max_analyze_duration to some small value, e.g. 5000 - it doesn’t have any impact.
And forgot to mention - I am using FFMPEG 5.1.2
I would really appreciate help on this issue.
Thank you in advance.
Igor Serganov
> On 10 Mar 2023, at 13:50, Igor Serganov <iserganoff at gmail.com> wrote:
>
> Hello Team!
>
> I would appreciate your help on understanding/resolving the following issue.
> When I do ffplay or transcoding of live MP3 stream, I always get around 8.5s - 9s startup delay.
> When I do the same for HLS Live input - delay is around 100ms.
>
> It seems to me I have tried all the things advised here - http://trac.ffmpeg.org/wiki/StreamingGuide to remove initial latency, but got no result.
>
> I have tried the following commands:
>
> ffmpeg -probesize 32 -re -fflags nobuffer -I <INPUT> -acodec libopus -muxdelay 0.1 -ab 98k -t 30 -ar 48k -y output.opus
>
> ffplay -probesize 32 -sync ext <INPUT>
>
> ffmpeg -probesize 32 -re -I <INPUT> -ab 128k -t 10 -ar 48k -y output.mp3
>
> ffmpeg -probesize 32 -re -analyzeduration 0 -fflags nobuffer -I <INPUT> -acodec libmp3lame -ab 128k -t 10 -ar 48k -y output.mp3
>
> It seems to me that I am missing something as when I open the same input stream in browser it starts playing much faster (I don’t have 9s delay).
>
> Can you please help me to get understanding what I can be doing wrong?
>
> Thank you in advance.
>
> Kind Regards
>
> Igor Serganov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20230328/cc6bd277/attachment.htm>
More information about the Libav-user
mailing list