xlab / vorbis-go

Package vorbis provides Go bindings for OggVorbis implementation by the Xiph.Org Foundation.
26 stars 7 forks source link

How to encode Ogg/vorbis from wav? #6

Open vitaly-zdanevich opened 5 years ago

vitaly-zdanevich commented 5 years ago

Looks like no documentation about that in README.md.

xlab commented 5 years ago

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/

vitaly-zdanevich commented 5 years ago

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?

xlab commented 5 years ago

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.

vitaly-zdanevich commented 5 years ago

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

xlab commented 5 years ago

I think so, or bindings to ffmpeg.

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