{"id":16237739,"url":"https://github.com/pschatzmann/arduino-libopus","last_synced_at":"2025-03-19T16:30:25.885Z","repository":{"id":113206034,"uuid":"488417688","full_name":"pschatzmann/arduino-libopus","owner":"pschatzmann","description":"The Opus Codec for Arduino","archived":false,"fork":false,"pushed_at":"2024-03-01T14:13:50.000Z","size":2779,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T08:45:39.781Z","etag":null,"topics":["arduino-library","audio","codec","opus"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pschatzmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-04T01:38:10.000Z","updated_at":"2025-02-09T13:13:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"3510253e-834a-41c3-8fd3-debc7f19f676","html_url":"https://github.com/pschatzmann/arduino-libopus","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-libopus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-libopus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-libopus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschatzmann%2Farduino-libopus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pschatzmann","download_url":"https://codeload.github.com/pschatzmann/arduino-libopus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244463546,"owners_count":20456909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-library","audio","codec","opus"],"created_at":"2024-10-10T13:36:51.643Z","updated_at":"2025-03-19T16:30:25.195Z","avatar_url":"https://github.com/pschatzmann.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Opus Codec for Arduino\n\nOpus is a codec for interactive speech and audio transmission over the Internet.\n\nOpus can handle a wide range of interactive audio applications, including\nVoice over IP, videoconferencing, in-game  chat, and even remote live music\nperformances. It can scale from low bit-rate narrowband speech to very high\nquality stereo music.\n\nOpus, when coupled with an appropriate container format, is also suitable\nfor non-realtime  stored-file applications such as music distribution, game\nsoundtracks, portable music players, jukeboxes, and other applications that\nhave historically used high latency formats such as MP3, AAC, or Vorbis.\n\n                    Opus is specified by IETF RFC 6716:\n                    https://tools.ietf.org/html/rfc6716\n\nThe Opus format and this implementation of it are subject to the royalty-\nfree patent and copyright licenses specified in the file COPYING.\n\nOpus packets are not self-delimiting, but are designed to be used inside a __container__ of some sort which supplies the decoder with each packet's length. Opus was originally specified for encapsulation in __Ogg containers__.\n\nThis project contains\n\n- [the opus codec](https://opus-codec.org/)\n- [libogg](https://xiph.org/ogg/)\n- [liboggz](https://www.xiph.org/oggz/)\n\n\n## Installation in Arduino\n\nYou can download the library as zip and call include Library -\u003e zip library. Or you can git clone this project into the Arduino libraries folder e.g. with\n\n```\ncd  ~/Documents/Arduino/libraries\ngit clone https://github.com/pschatzmann/arduino-libopus.git\n\n```\n\n## Documentation\n\nI recommend to use this library together with my [Arduino Audio Tools](https://github.com/pschatzmann/arduino-audio-tools). \nThis is just one of many __codecs__ that I have collected so far: Further details can be found in the [Encoding and Decoding Wiki](https://github.com/pschatzmann/arduino-audio-tools/wiki/Encoding-and-Decoding-of-Audio) of the Audio Tools.\n\n## Design\n\nIn order to create an Arduino compatible library I executed the following steps:\n\n- Added the projects to the src directory\n- Symlinked the header files into src\n- Symlinked additional header subdirectories\n- Replaced symlinks with regular files that conain an #include to the originally symlinked location, because Windows does not support symlinks properly\n- Moved offending code which was platform specific or contained a main() to the /incompatible directory\n- Renamed all config.h to opus_config.h to avoid conflicts with the standard Arduino environment. I disabled the floating point api and activated the fixed point api instead!\n- Added a opus_config.h to the src directory \n- Replaced #ifdef HAVE_CONFIG_H with #if defined(HAVE_CONFIG_H) || defined(ARDUINO) to make sure the config is used\n- Added define guards to .c files in float and fixed directories to prevent compile errors \n- The functionality requires a big stack. Fortunately we can use a psydostack implementation with NONTHREADSAFE_PSEUDOSTACK you can fine tune the memory requirement by defining GLOBAL_STACK_SIZE. The default setting is 120000 which is too big for most microcontrollers!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschatzmann%2Farduino-libopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpschatzmann%2Farduino-libopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschatzmann%2Farduino-libopus/lists"}