-1

I'm trying to decode this OpusOgg file using ./opus_demo -d 48000 1 b58ccbc2f7.ogg new.wav, but get Invalid payload length: 1332176723. Also, I tried to use code from this answer but got the same error.

However, opusdec utility decodes this file normally.

What am I doing wrong when I use opus_demo? I need to decode such files in C++, but stuck on this example.

0x1337
  • 984
  • 1
  • 8
  • 27
  • 1
    What does this have to do with C++? Are you trying to debug `opus_demo`? If so, you’d need an MCVE of *its* code. – Davis Herring Oct 27 '19 at 00:06
  • Yes, I'm trying to debug `opus_demo`. I think I can take the decoding part from it but stuck with this problem while decoding my file. – 0x1337 Oct 27 '19 at 07:57
  • 1
    The obvious difference lies between your code and that of `opusdec`. Seriously, you need to provide a [mcve], your questions as it stands is just "Hey I'm doing something I'm not telling you and it gives me an error, so what am I doing wrong?". Please also take the [tour] and read [ask]. – Ulrich Eckhardt Oct 27 '19 at 08:51

2 Answers2

0

I should use https://github.com/xiph/opusfile/ for opening and decoding oggOpus files.

0x1337
  • 984
  • 1
  • 8
  • 27
0

OpusDemo uses a custom -very simple- container format not Ogg. You should use some other decoder sw.

Damiano
  • 574
  • 4
  • 14