<!doctype html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body>Even a "moderate" increase in latency can break audio playback due to permanently too late buffers. And this will either do nothing or break in the case of dynamic (e.g. TS), dynamically enabled (e.g. multiple audio tracks), or irregular (e.g. voice codec) ES.<br><br><div class="gmail_quote">Le 3 octobre 2019 15:01:05 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><br></div><div>On Thu, Oct 3, 2019, at 13:49, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>As far as I can tell, this makes broken assumptions that will break playback in some cases.<br></div></blockquote><div><br></div><div>Could you be more precise ? When will it break playback ? Which assumption is broken ?<br></div><div><br></div><div>In the worst case scenario, avcodec will continue anyway even if the latency induced by the threads is not handled.<br></div><div>In better case, avcodec will redure its number of threads.<br></div><div>In most common case, the input delay will be lightly increased.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div class="qt-gmail_quote"><div>Le 3 octobre 2019 10:37:52 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>Any last words ?<br></div><div><br></div><div>On Tue, Oct 1, 2019, at 14:33, Thomas Guillem wrote:<br></div><div>> <br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div><br></div><div>On Mon, Sep 30, 2019, at 21:52, Rémi Denis-Courmont wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>Le torstaina 26. syyskuuta 2019, 17.38.11 EEST Thomas Guillem a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(138, 226, 52);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>The highest decoder latency of all clocks will be used to setup the initial<br></div><div>dejitter delay.<br></div></blockquote><div>We cannot generally, or even usually, measure the decoder latency.<br></div></blockquote><div>I agree, but we the avcodec module can guess it, according to its <br></div><div>thread_count and fps. It's not perfect but it's sufficient to fix all <br></div><div>problems we have with low fps samples (when you have a CPU with lot of <br></div><div>cores).<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>On top of that, even if we could measure it, it does not even seem to mean <br></div><div>anything if the set of active ES changes, or if for any reason the ES are not <br></div><div>in sync (input slaves, multiple RTP sessions, etc).<br></div></blockquote><div>Yes, this is why this function can fail. vlc_clock_SetDecoderLatency() <br></div><div>won't be able to handle a big delay ( > 300ms = file-caching) if a <br></div><div>video track is enabled midstream. Everything is handled in avcodec:<br></div><div>cf. <br></div><div><a href="https://code.videolan.org/tguillem/vlc/commit/38206d600fe2eba78a72cc4b19749db087b6a408">https://code.videolan.org/tguillem/vlc/commit/38206d600fe2eba78a72cc4b19749db087b6a408</a><br></div><div><br></div><div>This is not a perfect solution but it will fix most issues we have with <br></div><div>normal media samples (video starting near the audio).<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>-- <br></div><div>レミ・デニ-クールモン<br></div><div><a href="http://www.remlab.net/">http://www.remlab.net/</a><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>