Encode raw audio samples using Vorbis JAVA
Lorenzo Peluso <[email protected]> Sat, 3 Nov 2018 08:36:15 +0000
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.general |
|---|---|
| Message-ID | <[email protected]> |
--===============8095002680718253997==
Content-Language: it-IT
Content-Type: multipart/alternative;
boundary="_000_11500f17e1254bb290a5f12e512c1a7frcslabit_"
--_000_11500f17e1254bb290a5f12e512c1a7frcslabit_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I'm trying to encode a raw audio file (16kHz or 22050Hz, stereo) in an ogg =
file by using vorbis-java library.
I always obtain an error when calling:
encoder.vorbis_encode_init_vbr( vorbisInfo, 2, 22050, 1);
The error is:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at org.xiph.libvorbis.vorbisenc.get_setup_template(vorbisenc.java:321)
at org.xiph.libvorbis.vorbisenc.vorbis_encode_setup_vbr(vorbisenc.java:65)
at org.xiph.libvorbis.vorbisenc.vorbis_encode_init_vbr(vorbisenc.java:82)
at Vorbis.encode(Vorbis.java:390)
at Vorbis.main(Vorbis.java:510)
As I understand the library doesn't work for frequency minor then 40000.
Is it correct? Is there another way to use that library to encode to other =
frequency?
Thank you in advance.
BR,
Lorenzo.
Il contenuto di questa e-mail e degli eventuali allegati =E8 rivolto unicam=
ente alla persona o all'organizzazione cui =E8 indirizzato e pu=F2 contener=
e informazioni la cui riservatezza =E8 tutelata. Se avete ricevuto questa e=
-mail per errore, siete pregati di non copiarla, di non inviarla ad altre p=
ersone e di non usare il suo contenuto o gli eventuali allegati in alcun mo=
do. Vi preghiamo di informare il mittente e di cancellarla dal vostro siste=
ma.
This email and any attachments may be confidential and the subject of legal=
professional privilege. Any disclosure, use, storage or copying of this em=
ail without the consent of the sender is strictly prohibited. Please notify=
the sender immediately if you are not the intended recipient and then dele=
te the email from your inbox and do not disclose the contents to another pe=
rson, use, copy or store the information in any medium.
--_000_11500f17e1254bb290a5f12e512c1a7frcslabit_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
n-bottom:0;} --></style>
</head>
<body dir=3D"ltr">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font=
-family:Calibri,Arial,Helvetica,sans-serif;" dir=3D"ltr">
<p>Hello,</p>
<p><br>
</p>
<p>I'm trying to encode a raw audio file (16kHz or 22050Hz, stereo) in an o=
gg file by using vorbis-java library. </p>
<p><br>
</p>
<p>I always obtain an error when calling:</p>
<p><br>
</p>
<p><span>encoder.vorbis_encode_init_vbr( vorbisInfo, 2, 22050, 1);</span><b=
r>
</p>
<p><span><br>
</span></p>
<p><span>The error is:</span></p>
<p><span><br>
</span></p>
<p><span></p>
<div>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsEx=
ception: 1</div>
<div><span style=3D"white-space:pre"></span>at org.xiph.libvorbis.vorbisenc=
.get_setup_template(vorbisenc.java:321)</div>
<div><span style=3D"white-space:pre"></span>at org.xiph.libvorbis.vorbisenc=
.vorbis_encode_setup_vbr(vorbisenc.java:65)</div>
<div><span style=3D"white-space:pre"></span>at org.xiph.libvorbis.vorbisenc=
.vorbis_encode_init_vbr(vorbisenc.java:82)</div>
<div><span style=3D"white-space:pre"></span>at Vorbis.encode(Vorbis.java:39=
0)</div>
<div><span style=3D"white-space:pre"></span>at Vorbis.main(Vorbis.java:510)=
</div>
<div><br>
</div>
As I understand the library doesn't work for frequency minor then 40000.&nb=
sp;</span>
<p></p>
<p><span><br>
</span></p>
<p><span>Is it correct? Is there another way to use that library to encode =
to other frequency? </span></p>
<p><span><br>
</span></p>
<p><span>Thank you in advance. </span></p>
<p><span><br>
</span></p>
<p>BR,</p>
<p>Lorenzo.</p>
</div>
<i><span style=3D"font-size:8.0pt;line-height:115%;font-family:"Arial&=
quot;,"sans-serif";color:black">Il contenuto di questa e-mail e d=
egli eventuali allegati =E8 rivolto unicamente alla persona o all'organizza=
zione cui =E8 indirizzato e pu=F2 contenere informazioni la
cui riservatezza =E8 tutelata. Se avete ricevuto questa e-mail per errore,=
siete pregati di non copiarla, di non inviarla ad altre persone e di non u=
sare il suo contenuto o gli eventuali allegati in alcun modo. Vi preghiamo =
di informare il mittente e di cancellarla
dal vostro sistema.<br>
<br>
<div style=3D"height:0px; border-top:1px solid gray; border-bottom:0px; bor=
der-left:0px; border-right:0px; padding:0px 0px 0px 0px; margin:5px 0px 5px=
0px; width:100%">
</div>
This email and any attachments may be confidential and the subject of legal=
professional privilege. Any disclosure, use, storage or copying of this em=
ail without the consent of the sender is strictly prohibited. Please notify=
the sender immediately if you are
not the intended recipient and then delete the email from your inbox and d=
o not disclose the contents to another person, use, copy or store the infor=
mation in any medium.</span></i>
</body>
</html>
--_000_11500f17e1254bb290a5f12e512c1a7frcslabit_--
--===============8095002680718253997==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVm9yYmlzIG1h
aWxpbmcgbGlzdApWb3JiaXNAeGlwaC5vcmcKaHR0cDovL2xpc3RzLnhpcGgub3JnL21haWxtYW4v
bGlzdGluZm8vdm9yYmlzCg==
--===============8095002680718253997==--