<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hey Team,<div><br></div><div>I have managed to determine the function where the actual delay happens:</div><div><br></div><div>`<span style="color: rgb(99, 99, 36); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; background-color: rgb(255, 255, 255);">avformat_open_input`</span></div><div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(99, 99, 36); white-space: pre; background-color: rgb(255, 255, 255);"><br></span></font></div><div><font color="#636324" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(99, 99, 36); white-space: pre; background-color: rgb(255, 255, 255);">Event when I set </span></font><span style="background-color: rgb(255, 255, 255);"><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">max_analyze_duration to some small value, e.g. 5000 - it doesn</span><span style="caret-color: rgb(9, 89, 132); white-space: pre;">’</span><span style="white-space: pre;">t have any impact.</span></font></span></div><div><span style="background-color: rgb(255, 255, 255);"><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><br></span></font></span></div><div><span style="background-color: rgb(255, 255, 255);"><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;">And forgot to mention - I am using FFMPEG 5.1.2</span></font></span></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);"><br></span></font></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);">I would really appreciate help on this issue. </span></font></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);"><br></span></font></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);">Thank you in advance.</span></font></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);"><br></span></font></div><div><font color="#095984" face="Menlo, Monaco, Courier New, monospace"><span style="caret-color: rgb(9, 89, 132); white-space: pre; background-color: rgb(255, 255, 255);">Igor Serganov<br></span></font><div><br><blockquote type="cite"><div>On 10 Mar 2023, at 13:50, Igor Serganov <iserganoff@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hello Team!<div><br></div><div>I would appreciate your help on understanding/resolving the following issue.</div><div>When I do ffplay or transcoding of live MP3 stream, I always get around 8.5s - 9s startup delay.</div><div>When I do the same for HLS Live input - delay is around 100ms.</div><div><br></div><div>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.</div><div><br></div><div>I have tried the following commands:</div><div><br></div><div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;">ffmpeg -probesize 32 -re </span>-fflags nobuffer -I <INPUT> -acodec libopus -muxdelay 0.1 -ab 98k -t 30 -ar 48k -y output.opus</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"><br></span></div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"></span></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;">ffplay -probesize 32 -sync ext <INPUT></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"><br></span></div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"></span></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;">ffmpeg -probesize 32 -re -I <INPUT> -ab 128k -t 10 -ar 48k -y output.mp3</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"><br></span></div><p style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;"></span></p><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Courier; color: rgb(119, 97, 0); background-color: rgb(187, 255, 220);"><span style="font-variant-ligatures: no-common-ligatures;">ffmpeg -probesize 32 -re -analyzeduration 0 -fflags nobuffer -I <INPUT> -acodec libmp3lame -ab 128k -t 10 -ar 48k -y output.mp3</span></div></div><div><br></div><div>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).</div><div><br></div><div>Can you please help me to get understanding what I can be doing wrong?</div><div><br></div><div>Thank you in advance.</div><div><br></div><div>Kind Regards</div><div><br></div><div>Igor Serganov</div></div></div></blockquote></div><br></div></body></html>