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. 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: Skipping chunk of type "LIST", length 76 Encoding using libopus 0.9.14 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 50.9 seconds (2.358x realtime) Wrote: 111194 bytes, 6001 packets, 123 pages Bitrate: 6.78414kbit/s (without overhead) Rate range: 2.8kbit/s to 12kbit/s (7 to 30 bytes per packet) Overhead: 8.47% (container+metadata) And even faster on complexity 0: Skipping chunk of type "LIST", length 76 Encoding using libopus 0.9.14 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 316 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 23.72 seconds (5.059x realtime) Wrote: 106598 bytes, 6001 packets, 123 pages Bitrate: 6.47779kbit/s (without overhead) Rate range: 2.4kbit/s to 13.6kbit/s (6 to 34 bytes per packet) Overhead: 8.83% (container+metadata) I saw the 1.1 release notes and it said speed improvements on ARM so thought I would try. I downloaded from opus-codec.org and compiled directly on the Pi. It has however turned out a lot slower. Complexity 10 barely can encode in realtime: Skipping chunk of type "LIST", length 76 Encoding using libopus 1.1 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 1 minute and 53 seconds (1.062x realtime) Wrote: 110743 bytes, 6001 packets, 123 pages Bitrate: 6.70782kbit/s (without overhead) Instant rates: 2.8kbit/s to 11.6kbit/s (7 to 29 bytes per packet) Overhead: 9.13% (container+metadata) And is also much slower at complexity 0: Skipping chunk of type "LIST", length 76 Notice: Using resampling with complexity<10. Opusenc is fastest with 48, 24, 16, 12, or 8kHz input. Encoding using libopus 1.1 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 316 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 36 seconds (3.334x realtime) Wrote: 106945 bytes, 6001 packets, 123 pages Bitrate: 6.45466kbit/s (without overhead) Instant rates: 2.4kbit/s to 12.8kbit/s (6 to 32 bytes per packet) Overhead: 9.45% (container+metadata) I tried compiling it as fixed point and it is slightly faster but no where near the older version. At complexity 10: Skipping chunk of type "LIST", length 76 Encoding using libopus 1.1-fixed (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 1 minute and 42 seconds (1.177x realtime) Wrote: 110686 bytes, 6001 packets, 123 pages Bitrate: 6.70402kbit/s (without overhead) Instant rates: 2.4kbit/s to 11.2kbit/s (6 to 28 bytes per packet) Overhead: 9.13% (container+metadata) I have tried different compiler options but nothing has brought the speed back up. Any advice on the compiler flags or why I should be seeing such a big speed regression? Stuart Marsden -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20131216/73197108/attachment-0001.htm
Hi Stuart, you are compressing it at 6kbit/s. Then, then SILK mode is probability used and the Silk mode is much faster than CELT. Do you also some figures at 64kbit/s? It is strange that Opus 1.1 got slower in the Silk mode - may the speech/voice selection adds some overhead. I would be interested in seeing the performance of the 64 kbit/s in both Opus 1.0 and Opus 1.1. With best regards, Christian Hoene PS: I also though on using Raspberry PI as a reference platform for testing the speech of Opus on a ARM processor. For measuring the speech of Opus on Intel CPUs, the MARSS86.org simulator might be appropriate. Von: opus-bounces at xiph.org [mailto:opus-bounces at xiph.org] Im Auftrag von Stuart Marsden Gesendet: Montag, 16. Dezember 2013 14:03 An: opus at xiph.org Betreff: [opus] 1.1 Much slower on Raspberry Pi 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. 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: Skipping chunk of type "LIST", length 76 Encoding using libopus 0.9.14 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 50.9 seconds (2.358x realtime) Wrote: 111194 bytes, 6001 packets, 123 pages Bitrate: 6.78414kbit/s (without overhead) Rate range: 2.8kbit/s to 12kbit/s (7 to 30 bytes per packet) Overhead: 8.47% (container+metadata) And even faster on complexity 0: Skipping chunk of type "LIST", length 76 Encoding using libopus 0.9.14 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 316 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 23.72 seconds (5.059x realtime) Wrote: 106598 bytes, 6001 packets, 123 pages Bitrate: 6.47779kbit/s (without overhead) Rate range: 2.4kbit/s to 13.6kbit/s (6 to 34 bytes per packet) Overhead: 8.83% (container+metadata) I saw the 1.1 release notes and it said speed improvements on ARM so thought I would try. I downloaded from opus-codec.org and compiled directly on the Pi. It has however turned out a lot slower. Complexity 10 barely can encode in realtime: Skipping chunk of type "LIST", length 76 Encoding using libopus 1.1 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 1 minute and 53 seconds (1.062x realtime) Wrote: 110743 bytes, 6001 packets, 123 pages Bitrate: 6.70782kbit/s (without overhead) Instant rates: 2.8kbit/s to 11.6kbit/s (7 to 29 bytes per packet) Overhead: 9.13% (container+metadata) And is also much slower at complexity 0: Skipping chunk of type "LIST", length 76 Notice: Using resampling with complexity<10. Opusenc is fastest with 48, 24, 16, 12, or 8kHz input. Encoding using libopus 1.1 (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 316 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 36 seconds (3.334x realtime) Wrote: 106945 bytes, 6001 packets, 123 pages Bitrate: 6.45466kbit/s (without overhead) Instant rates: 2.4kbit/s to 12.8kbit/s (6 to 32 bytes per packet) Overhead: 9.45% (container+metadata) I tried compiling it as fixed point and it is slightly faster but no where near the older version. At complexity 10: Skipping chunk of type "LIST", length 76 Encoding using libopus 1.1-fixed (audio) ----------------------------------------------------- Input: 44.1kHz 1 channel Output: 1 channel (1 uncoupled) 20ms packets, 6kbit/sec VBR Preskip: 356 Encoding complete ----------------------------------------------------- Encoded: 2 minutes and 0.02 seconds Runtime: 1 minute and 42 seconds (1.177x realtime) Wrote: 110686 bytes, 6001 packets, 123 pages Bitrate: 6.70402kbit/s (without overhead) Instant rates: 2.4kbit/s to 11.2kbit/s (6 to 28 bytes per packet) Overhead: 9.13% (container+metadata) I have tried different compiler options but nothing has brought the speed back up. Any advice on the compiler flags or why I should be seeing such a big speed regression? Stuart Marsden -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20131217/025dcb2e/attachment-0001.htm
Christian, I will give 64kbit/s a try and post the figures. My own project is voice only and requires low bitrate so was hoping that it was just the way I was compiling and not an actual regression in speed for SILK. The raspberry PI is quite a cheap and handy reference platform though the ARM side is fairly underpowered but has a great GPU. It also has no audio in which is a pain for playing with codecs but it does support USB soundcards. I was wondering if a microcontroller like the Cortex-M range might be able to encode and that seemed possible extrapolating from the Pi results but this speed regression if it is real would kill that hope. I should also probably try and compile the same version from the Raspbian repos myself and if I also see a big slowdown then it is something wrong with the way I am compiling. I am not a deb expert but it seemed like the only optimisation they were using was -O2 but perhaps there is something else set. Do not want to claim a regression when it may be my own fault. Thanks for your response. Best Regards, Stuart Marsden On 17 December 2013 11:04, Christian Hoene <christian.hoene at symonics.com>wrote:> Hi Stuart, > > > > you are compressing it at 6kbit/s. Then, then SILK mode is probability > used and the Silk mode is much faster than CELT. Do you also some figures > at 64kbit/s? > > > > It is strange that Opus 1.1 got slower in the Silk mode ? may the > speech/voice selection adds some overhead. I would be interested in seeing > the performance of the 64 kbit/s in both Opus 1.0 and Opus 1.1. > > > > With best regards, > > > > Christian Hoene > > > > PS: > I also though on using Raspberry PI as a reference platform for testing > the speech of Opus on a ARM processor. For measuring the speech > of Opus on Intel CPUs, the MARSS86.org simulator might be appropriate. > > > > > > > > > > > > *Von:* opus-bounces at xiph.org [mailto:opus-bounces at xiph.org] *Im Auftrag > von *Stuart Marsden > *Gesendet:* Montag, 16. Dezember 2013 14:03 > *An:* opus at xiph.org > *Betreff:* [opus] 1.1 Much slower on Raspberry Pi > > > > 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. > > > > 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: > > > > Skipping chunk of type "LIST", length 76 > > Encoding using libopus 0.9.14 (audio) > > ----------------------------------------------------- > > Input: 44.1kHz 1 channel > > Output: 1 channel (1 uncoupled) > > 20ms packets, 6kbit/sec VBR > > Preskip: 356 > > > > Encoding complete > > ----------------------------------------------------- > > Encoded: 2 minutes and 0.02 seconds > > Runtime: 50.9 seconds > > (2.358x realtime) > > Wrote: 111194 bytes, 6001 packets, 123 pages > > Bitrate: 6.78414kbit/s (without overhead) > > Rate range: 2.8kbit/s to 12kbit/s > > (7 to 30 bytes per packet) > > Overhead: 8.47% (container+metadata) > > > > And even faster on complexity 0: > > > > Skipping chunk of type "LIST", length 76 > > Encoding using libopus 0.9.14 (audio) > > ----------------------------------------------------- > > Input: 44.1kHz 1 channel > > Output: 1 channel (1 uncoupled) > > 20ms packets, 6kbit/sec VBR > > Preskip: 316 > > > > Encoding complete > > ----------------------------------------------------- > > Encoded: 2 minutes and 0.02 seconds > > Runtime: 23.72 seconds > > (5.059x realtime) > > Wrote: 106598 bytes, 6001 packets, 123 pages > > Bitrate: 6.47779kbit/s (without overhead) > > Rate range: 2.4kbit/s to 13.6kbit/s > > (6 to 34 bytes per packet) > > Overhead: 8.83% (container+metadata) > > > > I saw the 1.1 release notes and it said speed improvements on ARM so > thought I would try. I downloaded from opus-codec.org and compiled > directly on the Pi. It has however turned out a lot slower. Complexity 10 > barely can encode in realtime: > > > > Skipping chunk of type "LIST", length 76 > > Encoding using libopus 1.1 (audio) > > ----------------------------------------------------- > > Input: 44.1kHz 1 channel > > Output: 1 channel (1 uncoupled) > > 20ms packets, 6kbit/sec VBR > > Preskip: 356 > > > > Encoding complete > > > ----------------------------------------------------- > > Encoded: 2 minutes and 0.02 seconds > > Runtime: 1 minute and 53 seconds > > (1.062x realtime) > > Wrote: 110743 bytes, 6001 packets, 123 pages > > Bitrate: 6.70782kbit/s (without overhead) > > Instant rates: 2.8kbit/s to 11.6kbit/s > > (7 to 29 bytes per packet) > > Overhead: 9.13% (container+metadata) > > > > And is also much slower at complexity 0: > > > > Skipping chunk of type "LIST", length 76 > > Notice: Using resampling with complexity<10. > > Opusenc is fastest with 48, 24, 16, 12, or 8kHz input. > > > > Encoding using libopus 1.1 (audio) > > ----------------------------------------------------- > > Input: 44.1kHz 1 channel > > Output: 1 channel (1 uncoupled) > > 20ms packets, 6kbit/sec VBR > > Preskip: 316 > > > > Encoding complete > > > ----------------------------------------------------- > > Encoded: 2 minutes and 0.02 seconds > > Runtime: 36 seconds > > (3.334x realtime) > > Wrote: 106945 bytes, 6001 packets, 123 pages > > Bitrate: 6.45466kbit/s (without overhead) > > Instant rates: 2.4kbit/s to 12.8kbit/s > > (6 to 32 bytes per packet) > > Overhead: 9.45% (container+metadata) > > > > I tried compiling it as fixed point and it is slightly faster but no where > near the older version. At complexity 10: > > > > Skipping chunk of type "LIST", length 76 > > Encoding using libopus 1.1-fixed (audio) > > ----------------------------------------------------- > > Input: 44.1kHz 1 channel > > Output: 1 channel (1 uncoupled) > > 20ms packets, 6kbit/sec VBR > > Preskip: 356 > > > > Encoding complete > > > ----------------------------------------------------- > > Encoded: 2 minutes and 0.02 seconds > > Runtime: 1 minute and 42 seconds > > (1.177x realtime) > > Wrote: 110686 bytes, 6001 packets, 123 pages > > Bitrate: 6.70402kbit/s (without overhead) > > Instant rates: 2.4kbit/s to 11.2kbit/s > > (6 to 28 bytes per packet) > > Overhead: 9.13% (container+metadata) > > > > > > I have tried different compiler options but nothing has brought the speed > back up. > > > > Any advice on the compiler flags or why I should be seeing such a big > speed regression? > > > > Stuart Marsden > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20131217/2f2f9775/attachment-0001.htm
On Mon, Dec 16, 2013 at 5:03 AM, Stuart Marsden <stuartmarsden at finmars.co.uk> wrote:> 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. > > 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:Complexity 10 is new analysis code that didn't exist in prior versions, setting complexity 5 gets you basically the same analysis that the 1.0 version had. On x86 and modern arm cores with fast FPUs the other speedups are enough that complexity 10 is about the same speed in the old software or the new software (but with much higher and consistent VBR quality). But on chips with slow FPUs the new analysis code is much slower, in particular because it has not been entirely converted to fixed point (e.g. in the fixed point builds) which is what I believe you're seeing here.
Gregory, That is good to know and if therefore the true apples to apples comparison is 0.9.14 at comp 10 and 1.1 at comp 5 then things are fine. My ears are not good enough to hear the difference so for speed I would target comp 5 or lower. I just did a quick test and 0.9.14 at comp 10 was 3.872 1.1 at comp 5 was 5.218 So if the output is comparable then we do in fact see a speed improvement. Thanks for pointing this out. Is it documented? I admit I have only read some of the documentation. Best Regards, Stuart Marsden On 17 December 2013 23:50, Gregory Maxwell <gmaxwell at gmail.com> wrote:> On Mon, Dec 16, 2013 at 5:03 AM, Stuart Marsden > <stuartmarsden at finmars.co.uk> wrote: > > 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. > > > > 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: > > Complexity 10 is new analysis code that didn't exist in prior > versions, setting complexity 5 gets you basically the same analysis > that the 1.0 version had. > > On x86 and modern arm cores with fast FPUs the other speedups are > enough that complexity 10 is about the same speed in the old software > or the new software (but with much higher and consistent VBR quality). > But on chips with slow FPUs the new analysis code is much slower, in > particular because it has not been entirely converted to fixed point > (e.g. in the fixed point builds) which is what I believe you're seeing > here. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20131218/bfb69896/attachment.htm