TeamPyOgg / PyOgg

Simple OGG Vorbis, Opus and FLAC bindings for Python
The Unlicense
63 stars 27 forks source link

Feature/ogg opus wrapper #108

Open cain986 opened 2 months ago

cain986 commented 2 months ago

I made a class that just wraps pre-encoded opus data in an ogg stream instead of encoding PCM data and wrapping it. I needed it for an opus stream from a camera. It seems to work with FFMPEG. It seems like this could be useful to others, so I thought I would submit a PR.

Please let me know if I've done something foolish. I did not handle the pre-skip stuff at all, which may be an issue, but I don't know many of the low-level opus settings the camera is using (frame size, pre-skip, etc.) and I've had a hard time finding out how to infer them from the opus packets (if that's even possible)