I wonder if anybody try to compress a pure sine wave using OPUS codec. When I compressed the mono 1KHz, 16bits 48000 samples per sec. audio stream using the 'opus_demo' utility: opus_demo -e audio 48000 1 2min_1kHz_Sine_16bit_48kHz.wave 2min_1kHz_Sine_16bit_48kHz.opus_raw I had the output stream that is shown below. 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 .... ...... ...... The OPUS codec failed to decode this stream. Is there any restriction on the OPUS input stream that I missed or I have done something incorrectly? If somebody else had this issue and was able to solve it, please, share you solution with me. Alexander. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20160802/164b6d93/attachment.html>
On 02/08/16 10:59 AM, Kolesov, Alexander wrote:> opus_demo -e audio 48000 1 2min_1kHz_Sine_16bit_48kHz.wave > 2min_1kHz_Sine_16bit_48kHz.opus_rawYou're missing the "bitrate" argument to opus_demo... Though I'm surprised it didn't complain about it. Jean-Marc
On Tue, Aug 2, 2016 at 11:41 AM, Jean-Marc Valin <jmvalin at jmvalin.ca> wrote:> On 02/08/16 10:59 AM, Kolesov, Alexander wrote: >> opus_demo -e audio 48000 1 2min_1kHz_Sine_16bit_48kHz.wave >> 2min_1kHz_Sine_16bit_48kHz.opus_raw > > You're missing the "bitrate" argument to opus_demo... Though I'm > surprised it didn't complain about it.Works for me, even without the bitrate argument. Note that encoding with opus_demo outputs a raw opus bitstream, and that decoding that same bitstream with opus_demo will produce a raw PCM file. You can import raw PCM into Audacity, for example. Best, Tristan
Jean-Mark, Yes, you are right with the "bitrate" parameter should be in the command line, it works with it. The "opus_demo" utility does not complain about the absence of this parameter in the command line, since I was able to encode multiple audio files without it I was under impression that this parameter is optional with a default value assigned in "opus_demo". Thank you for your help. Alexander. -----Original Message----- From: Jean-Marc Valin [mailto:jmvalin at jmvalin.ca] Sent: Tuesday, August 02, 2016 11:42 AM To: Kolesov, Alexander <Alexander.Kolesov at echostar.com>; opus at xiph.org Subject: Re: [opus] OPUS encoding mono sine wave On 02/08/16 10:59 AM, Kolesov, Alexander wrote:> opus_demo -e audio 48000 1 2min_1kHz_Sine_16bit_48kHz.wave > 2min_1kHz_Sine_16bit_48kHz.opus_rawYou're missing the "bitrate" argument to opus_demo... Though I'm surprised it didn't complain about it. Jean-Marc
Maybe Matching Threads
- OPUS encoding mono sine wave
- [RFC PATCHv1] cover: celt_pitch_xcorr: Introduce ARM neon intrinsics
- [RFC PATCHv1] cover: celt_pitch_xcorr: Introduce ARM neon intrinsics
- [RFC PATCHv1] cover: celt_pitch_xcorr: Introduce ARM neon intrinsics
- Availability of the 1.1.1 stable version