vorbis-go icon indicating copy to clipboard operation
vorbis-go copied to clipboard

How to encode Ogg/vorbis from wav?

Open vitaly-zdanevich opened this issue 6 years ago • 5 comments

Looks like no documentation about that in README.md.

vitaly-zdanevich avatar Apr 10 '19 13:04 vitaly-zdanevich

WAV is usually combined with uncompressed audio, but Ogg Vorbis is a general-purpose compressed audio format.

https://en.wikipedia.org/wiki/WAV https://xiph.org/vorbis/

xlab avatar Apr 10 '19 14:04 xlab

Yes, description of this repository: "Package vorbis provides Go bindings for OggVorbis", so with this vorbis-go this is impossible to encode uncompressed wav to compressed Ogg/vorbis? Only option that I have is to call oggenc from Go through the os/exec?

vitaly-zdanevich avatar Apr 10 '19 15:04 vitaly-zdanevich

Sorry I misread the title as "how to decode..." :)

This example https://github.com/xiph/vorbis/blob/master/examples/encoder_example.c can be ported to Go as I did with their decoder example. I just needed to decode, so I ported only one-way example.

xlab avatar Apr 10 '19 15:04 xlab

While this is not ported to your vorbis-go - Go's os/exec to oggenc is the only option?

vitaly-zdanevich avatar Apr 10 '19 15:04 vitaly-zdanevich

I think so, or bindings to ffmpeg.

Feel free to take this issue to https://gitcoin.co

xlab avatar Apr 10 '19 16:04 xlab