<div dir="ltr"><div>I have just started trying Opus with a view to using it in a project. I am interested in embedded hardware and tried it on the Raspberry Pi using the raspbian distro.</div><div><br></div><div>The version of libopus in the repos is 0.9.14. I installed this and tried encoding 2 minutes of speech from a librevox recording. It managed this at a respectable pace for complexity 10:</div>
<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font face="courier new, monospace">Skipping chunk of type "LIST", length 76</font></div></div><div><div><font face="courier new, monospace">Encoding using libopus 0.9.14 (audio)</font></div>
</div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div><div><div><font face="courier new, monospace"> Input: 44.1kHz 1 channel</font></div></div><div>
<div><font face="courier new, monospace"> Output: 1 channel (1 uncoupled)</font></div></div><div><div><font face="courier new, monospace"> 20ms packets, 6kbit/sec VBR</font></div></div><div><div><font face="courier new, monospace"> Preskip: 356</font></div>
</div><div><div><font face="courier new, monospace"><br></font></div></div><div><div><font face="courier new, monospace">Encoding complete </font></div></div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div>
</div><div><div><font face="courier new, monospace"> Encoded: 2 minutes and 0.02 seconds</font></div></div><div><div><font face="courier new, monospace"> Runtime: 50.9 seconds</font></div></div><div><div><font face="courier new, monospace"> (2.358x realtime)</font></div>
</div><div><div><font face="courier new, monospace"> Wrote: 111194 bytes, 6001 packets, 123 pages</font></div></div><div><div><font face="courier new, monospace"> Bitrate: 6.78414kbit/s (without overhead)</font></div>
</div><div><div><font face="courier new, monospace"> Rate range: 2.8kbit/s to 12kbit/s</font></div></div><div><div><font face="courier new, monospace"> (7 to 30 bytes per packet)</font></div></div><div><div><font face="courier new, monospace"> Overhead: 8.47% (container+metadata)</font></div>
</div></blockquote><div><div><br></div></div><span style="font-family:arial,helvetica,sans-serif">And even faster on complexity 0:</span><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font face="courier new, monospace"><br>
</font></div></div><div><div><div><font face="courier new, monospace">Skipping chunk of type "LIST", length 76</font></div></div></div><div><div><div><font face="courier new, monospace">Encoding using libopus 0.9.14 (audio)</font></div>
</div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div></div><div><div><div><font face="courier new, monospace"> Input: 44.1kHz 1 channel</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Output: 1 channel (1 uncoupled)</font></div></div></div><div><div><div><font face="courier new, monospace"> 20ms packets, 6kbit/sec VBR</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Preskip: 316</font></div></div></div><div><div><div><font face="courier new, monospace"><br></font></div></div></div><div><div><div><font face="courier new, monospace">Encoding complete </font></div>
</div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div></div><div><div><div><font face="courier new, monospace"> Encoded: 2 minutes and 0.02 seconds</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Runtime: 23.72 seconds</font></div></div></div><div><div><div><font face="courier new, monospace"> (5.059x realtime)</font></div></div></div><div>
<div><div><font face="courier new, monospace"> Wrote: 106598 bytes, 6001 packets, 123 pages</font></div></div></div><div><div><div><font face="courier new, monospace"> Bitrate: 6.47779kbit/s (without overhead)</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Rate range: 2.4kbit/s to 13.6kbit/s</font></div></div></div><div><div><div><font face="courier new, monospace"> (6 to 34 bytes per packet)</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Overhead: 8.83% (container+metadata)</font></div></div></div></blockquote><div><div><br></div><div>I saw the 1.1 release notes and it said speed improvements on ARM so thought I would try. I downloaded from <a href="http://opus-codec.org">opus-codec.org</a> and compiled directly on the Pi. It has however turned out a lot slower. Complexity 10 barely can encode in realtime:</div>
<div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div><font face="courier new, monospace">Skipping chunk of type "LIST", length 76</font></div></div></div><div><div>
<div><font face="courier new, monospace">Encoding using libopus 1.1 (audio)</font></div></div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div>
</div><div><div><div><font face="courier new, monospace"> Input: 44.1kHz 1 channel</font></div></div></div><div><div><div><font face="courier new, monospace"> Output: 1 channel (1 uncoupled)</font></div></div></div><div>
<div><div><font face="courier new, monospace"> 20ms packets, 6kbit/sec VBR</font></div></div></div><div><div><div><font face="courier new, monospace"> Preskip: 356</font></div></div></div><div><div><div><font face="courier new, monospace"><br>
</font></div></div></div><div><div><div><font face="courier new, monospace">Encoding complete </font></div></div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Encoded: 2 minutes and 0.02 seconds</font></div></div></div><div><div><div><font face="courier new, monospace"> Runtime: 1 minute and 53 seconds</font></div>
</div></div><div><div><div><font face="courier new, monospace"> (1.062x realtime)</font></div></div></div><div><div><div><font face="courier new, monospace"> Wrote: 110743 bytes, 6001 packets, 123 pages</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Bitrate: 6.70782kbit/s (without overhead)</font></div></div></div><div><div><div><font face="courier new, monospace"> Instant rates: 2.8kbit/s to 11.6kbit/s</font></div>
</div></div><div><div><div><font face="courier new, monospace"> (7 to 29 bytes per packet)</font></div></div></div><div><div><div><font face="courier new, monospace"> Overhead: 9.13% (container+metadata)</font></div>
</div></div></blockquote><div><div><br></div><div>And is also much slower at complexity 0:</div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div><font face="courier new, monospace">Skipping chunk of type "LIST", length 76</font></div>
</div></div><div><div><div><font face="courier new, monospace">Notice: Using resampling with complexity<10.</font></div></div></div><div><div><div><font face="courier new, monospace">Opusenc is fastest with 48, 24, 16, 12, or 8kHz input.</font></div>
</div></div><div><div><div><font face="courier new, monospace"><br></font></div></div></div><div><div><div><font face="courier new, monospace">Encoding using libopus 1.1 (audio)</font></div></div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Input: 44.1kHz 1 channel</font></div></div></div><div><div><div><font face="courier new, monospace"> Output: 1 channel (1 uncoupled)</font></div></div></div>
<div><div><div><font face="courier new, monospace"> 20ms packets, 6kbit/sec VBR</font></div></div></div><div><div><div><font face="courier new, monospace"> Preskip: 316</font></div></div></div><div><div><div><font face="courier new, monospace"><br>
</font></div></div></div><div><div><div><font face="courier new, monospace">Encoding complete </font></div></div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Encoded: 2 minutes and 0.02 seconds</font></div></div></div><div><div><div><font face="courier new, monospace"> Runtime: 36 seconds</font></div></div>
</div><div><div><div><font face="courier new, monospace"> (3.334x realtime)</font></div></div></div><div><div><div><font face="courier new, monospace"> Wrote: 106945 bytes, 6001 packets, 123 pages</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Bitrate: 6.45466kbit/s (without overhead)</font></div></div></div><div><div><div><font face="courier new, monospace"> Instant rates: 2.4kbit/s to 12.8kbit/s</font></div>
</div></div><div><div><div><font face="courier new, monospace"> (6 to 32 bytes per packet)</font></div></div></div><div><div><div><font face="courier new, monospace"> Overhead: 9.45% (container+metadata)</font></div>
</div></div></blockquote><div><div><br></div><div>I tried compiling it as fixed point and it is slightly faster but no where near the older version. At complexity 10:<br></div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><div><font face="courier new, monospace">Skipping chunk of type "LIST", length 76</font></div></div></div><div><div><div><font face="courier new, monospace">Encoding using libopus 1.1-fixed (audio)</font></div>
</div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div></div><div><div><div><font face="courier new, monospace"> Input: 44.1kHz 1 channel</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Output: 1 channel (1 uncoupled)</font></div></div></div><div><div><div><font face="courier new, monospace"> 20ms packets, 6kbit/sec VBR</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Preskip: 356</font></div></div></div><div><div><div><font face="courier new, monospace"><br></font></div></div></div><div><div><div><font face="courier new, monospace">Encoding complete </font></div>
</div></div><div><div><div><font face="courier new, monospace">-----------------------------------------------------</font></div></div></div><div><div><div><font face="courier new, monospace"> Encoded: 2 minutes and 0.02 seconds</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Runtime: 1 minute and 42 seconds</font></div></div></div><div><div><div><font face="courier new, monospace"> (1.177x realtime)</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Wrote: 110686 bytes, 6001 packets, 123 pages</font></div></div></div><div><div><div><font face="courier new, monospace"> Bitrate: 6.70402kbit/s (without overhead)</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Instant rates: 2.4kbit/s to 11.2kbit/s</font></div></div></div><div><div><div><font face="courier new, monospace"> (6 to 28 bytes per packet)</font></div>
</div></div><div><div><div><font face="courier new, monospace"> Overhead: 9.13% (container+metadata)</font></div></div></div></blockquote><div><div><br></div><div><br></div><div>I have tried different compiler options but nothing has brought the speed back up. </div>
<div><br></div><div>Any advice on the compiler flags or why I should be seeing such a big speed regression?</div><div><br></div><div>Stuart Marsden</div><div><br></div></div>
</div>