opus-go/examples/playback
Sean DuBois 27b0cc9a06 Fix README for examples/playback
URL to faiface was poorly formatted
2022-10-03 23:17:57 -04:00
..
go.mod Add examples/playback 2022-10-01 23:09:51 -04:00
go.sum Add examples/playback 2022-10-01 23:09:51 -04:00
main.go Panic on decode error in examples/playback 2022-10-02 21:11:11 -04:00
README.md Fix README for examples/playback 2022-10-03 23:17:57 -04:00

playback

playback demonstrates decoding a ogg file and then playing using the faiface/beep library

Instructions

Install playback

Download and install playback

go install github.com/pion/opus/examples/playback@latest

Create a ogg file to decode

Encode Opus into an ogg file, or use one that you already have. This implementation doesn't support most Opus features yet, so encoding will be constrained.

ffmpeg -i $INPUT_FILE -c:a libopus -ac 1 -b:a 10K output.ogg

Decode

Demux and decode the provided ogg file. The output audio samples will be played.

playback `pwd`/output.ogg