<div dir="ltr"><div>Thank you for the tip.</div><div>Now I am sure that resampling does not apply (see below).</div><div>But unfortunately pulseaudio always consumes 30% of one CPU core! </div><div><br></div><div>Renaud</div><div><br></div><div> driver: <protocol-native.c><br>     flags: <br>       state: RUNNING<br>        source: 8 <VACmic><br>      volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB<br>            balance 0.00<br>      muted: no<br>     current latency: 0.50 ms<br>      requested latency: 2000.00 ms<br> sample spec: s16le 2ch 44100Hz<br>        channel map: front-left,front-right<br>                Stereo<br>     resample method: (null)<br>       owner module: 6<br>       client: 29 <Lavf58.20.100><br>      properties:<br>           <a href="http://media.name">media.name</a> = "record"<br>         <a href="http://application.name">application.name</a> = "Lavf58.20.100"<br>              native-protocol.peer = "UNIX socket client"<br>         native-protocol.version = "32"<br>              <a href="http://application.process.id">application.process.id</a> = "18295"<br>          application.process.user = "vagrant"<br>                application.process.host = "debian10.localdomain"<br>           application.process.binary = "ffmpeg"<br>               application.language = "C"<br>          window.x11.display = ":0"<br>           application.process.machine_id = "c79df160d01f4c7780e6da0aaf5515c3"<br>         application.process.session_id = "8"<br>                <a href="http://module-stream-restore.id">module-stream-restore.id</a> = "source-output-by-application-name:Lavf58.20.100"</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 3 févr. 2021 à 21:04, Sean Greenslade <<a href="mailto:sean@seangreenslade.com">sean@seangreenslade.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Feb 02, 2021 at 10:40:51AM +0100, Renaud GHIA wrote:<br>
> Hi,<br>
> <br>
> Below the result of the command "pacmd list".<br>
> Here without any change of resampling method.<br>
<br>
This part here shows your ffmpeg client:<br>
<br>
>     index: 1<br>
> driver: <protocol-native.c><br>
> flags:<br>
> state: RUNNING<br>
> source: 2 <VACmic><br>
> volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% /<br>
> 0.00 dB<br>
>        balance 0.00<br>
> muted: no<br>
> current latency: 0.50 ms<br>
> requested latency: 2000.00 ms<br>
> sample spec: s16le 2ch 48000Hz<br>
> channel map: front-left,front-right<br>
>             Stereo<br>
> resample method: speex-float-1<br>
<br>
It seems like ffmpeg is requesting 48 kHz audio, so pulse is forced to<br>
resample. If possible, can you try running your ffmpeg process with the<br>
flag "-sample_rate 44100" and see if that reduces the CPU usage?<br>
<br>
Everything else in your pulse chain is 44.1 kHz, so with that change<br>
there should be no resampling at all.<br>
<br>
--Sean<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div>