{"id":13435625,"url":"https://github.com/xiph/opus","last_synced_at":"2025-04-23T20:52:36.659Z","repository":{"id":19835698,"uuid":"23097173","full_name":"xiph/opus","owner":"xiph","description":"Modern audio compression for the internet.","archived":false,"fork":false,"pushed_at":"2025-04-22T00:00:16.000Z","size":23464,"stargazers_count":2538,"open_issues_count":145,"forks_count":662,"subscribers_count":98,"default_branch":"main","last_synced_at":"2025-04-22T01:19:09.435Z","etag":null,"topics":["audio","c","codec","compression"],"latest_commit_sha":null,"homepage":"https://opus-codec.org/","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/xiph.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-19T04:45:15.000Z","updated_at":"2025-04-22T00:00:21.000Z","dependencies_parsed_at":"2023-11-20T20:30:21.066Z","dependency_job_id":"ce96bc96-ee1b-4c55-9a70-b1fc829a5f7a","html_url":"https://github.com/xiph/opus","commit_stats":{"total_commits":4136,"total_committers":127,"mean_commits":32.56692913385827,"dds":0.749274661508704,"last_synced_commit":"101a71e03bbf860aaafb7090a0e440675cb27660"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiph%2Fopus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiph%2Fopus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiph%2Fopus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiph%2Fopus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiph","download_url":"https://codeload.github.com/xiph/opus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514758,"owners_count":21443208,"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":["audio","c","codec","compression"],"created_at":"2024-07-31T03:00:37.574Z","updated_at":"2025-04-23T20:52:36.634Z","avatar_url":"https://github.com/xiph.png","language":"C","readme":"== Opus audio codec ==\n\nOpus is a codec for interactive speech and audio transmission over the Internet.\n\n  Opus 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\n  Opus, 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\n  The Opus format and this implementation of it are subject to the royalty-\nfree patent and copyright licenses specified in the file COPYING.\n\nThis package implements a shared library for encoding and decoding raw Opus\nbitstreams. Raw Opus bitstreams should be used over RTP according to\n https://tools.ietf.org/html/rfc7587\n\nThe package also includes a number of test tools used for testing the\ncorrect operation of the library. The bitstreams read/written by these\ntools should not be used for Opus file distribution: They include\nadditional debugging data and cannot support seeking.\n\nOpus stored in files should use the Ogg encapsulation for Opus which is\ndescribed at:\n https://tools.ietf.org/html/rfc7845\n\nAn opus-tools package is available which provides encoding and decoding of\nOgg encapsulated Opus files and includes a number of useful features.\n\nOpus-tools can be found at:\n https://gitlab.xiph.org/xiph/opus-tools.git\nor on the main Opus website:\n https://opus-codec.org/\n\n== Deep Learning and Opus ==\n\nLossy networks continue to be a challenge for real-time communications.\nWhile the original implementation of Opus provides an excellent packet loss\nconcealment mechanism, the team has continued to advance the methodology used\nto improve audio quality in challenge network environments.\n\nIn Opus 1.5, we added a deep learning based redundancy encoder that enhances\naudio in lossy networks by embedding one second of recovery data in the padding\ndata of each packet. The underlying algorithm behind encoding and decoding the\nrecovery data is called the deep redundancy (DRED) algorithm. By leveraging\nthe padding data within the packet, Opus 1.5 is fully backward compatible with\nprior revisions of Opus. Please see the README under the \"dnn\" subdirectory to\nunderstand DRED.\n\nDRED was developed by a team that Amazon Web Services initially sponsored,\nwho open-sourced the implementation as well as began the\nstandardization process at the IETF:\n  https://datatracker.ietf.org/doc/draft-ietf-mlcodec-opus-extension/\nThe license behind Opus or the intellectual property position of Opus does\nnot change with Opus 1.5.\n\n== Compiling libopus ==\n\nTo build from a distribution tarball, you only need to do the following:\n\n    % ./configure\n    % make\n\nTo build from the git repository, the following steps are necessary:\n\n0) Set up a development environment:\n\nOn an Ubuntu or Debian family Linux distribution:\n\n    % sudo apt-get install git autoconf automake libtool gcc make\n\nOn a Fedora/Redhat based Linux:\n\n    % sudo dnf install git autoconf automake libtool gcc make\n\nOr for older Redhat/Centos Linux releases:\n\n    % sudo yum install git autoconf automake libtool gcc make\n\nOn Apple macOS, install Xcode and brew.sh, then in the Terminal enter:\n\n    % brew install autoconf automake libtool\n\n1) Clone the repository:\n\n    % git clone https://gitlab.xiph.org/xiph/opus.git\n    % cd opus\n\n2) Compiling the source\n\n    % ./autogen.sh\n    % ./configure\n    % make\n\nOn x86, it's a good idea to use a -march= option that allows the use of AVX2.\n\n3) Install the codec libraries (optional)\n\n    % sudo make install\n\nOnce you have compiled the codec, there will be a opus_demo executable\nin the top directory.\n\nUsage: opus_demo [-e] \u003capplication\u003e \u003csampling rate (Hz)\u003e \u003cchannels (1/2)\u003e\n         \u003cbits per second\u003e [options] \u003cinput\u003e \u003coutput\u003e\n       opus_demo -d \u003csampling rate (Hz)\u003e \u003cchannels (1/2)\u003e [options]\n         \u003cinput\u003e \u003coutput\u003e\n\nmode: voip | audio | restricted-lowdelay\noptions:\n  -e                : only runs the encoder (output the bit-stream)\n  -d                : only runs the decoder (reads the bit-stream as input)\n  -cbr              : enable constant bitrate; default: variable bitrate\n  -cvbr             : enable constrained variable bitrate; default:\n                      unconstrained\n  -bandwidth \u003cNB|MB|WB|SWB|FB\u003e\n                    : audio bandwidth (from narrowband to fullband);\n                      default: sampling rate\n  -framesize \u003c2.5|5|10|20|40|60\u003e\n                    : frame size in ms; default: 20\n  -max_payload \u003cbytes\u003e\n                    : maximum payload size in bytes, default: 1024\n  -complexity \u003ccomp\u003e\n                    : complexity, 0 (lowest) ... 10 (highest); default: 10\n  -inbandfec        : enable SILK inband FEC\n  -forcemono        : force mono encoding, even for stereo input\n  -dtx              : enable SILK DTX\n  -loss \u003cperc\u003e      : simulate packet loss, in percent (0-100); default: 0\n\ninput and output are little-endian signed 16-bit PCM files or opus\nbitstreams with simple opus_demo proprietary framing.\n\n== Testing ==\n\nThis package includes a collection of automated unit and system tests\nwhich SHOULD be run after compiling the package especially the first\ntime it is run on a new platform.\n\nTo run the integrated tests:\n\n    % make check\n\nThere is also collection of standard test vectors which are not\nincluded in this package for size reasons but can be obtained from:\nhttps://opus-codec.org/docs/opus_testvectors-rfc8251.tar.gz\n\nTo run compare the code to these test vectors:\n\n    % curl -OL https://opus-codec.org/docs/opus_testvectors-rfc8251.tar.gz\n    % tar -zxf opus_testvectors-rfc8251.tar.gz\n    % ./tests/run_vectors.sh ./ opus_newvectors 48000\n\n== Compiling libopus for Windows and alternative build systems ==\n\nSee cmake/README.md or meson/README.md.\n\n== Portability notes ==\n\nThis implementation uses floating-point by default but can be compiled to\nuse only fixed-point arithmetic by setting --enable-fixed-point (if using\nautoconf) or by defining the FIXED_POINT macro (if building manually).\nThe fixed point implementation has somewhat lower audio quality and is\nslower on platforms with fast FPUs, it is normally only used in embedded\nenvironments.\n\nThe implementation can be compiled with either a C89 or a C99 compiler.\nWhile it does not rely on any _undefined behavior_ as defined by C89 or\nC99, it relies on common _implementation-defined behavior_ for two's\ncomplement architectures:\n\no Right shifts of negative values are consistent with two's\n  complement arithmetic, so that a\u003e\u003eb is equivalent to\n  floor(a/(2^b)),\n\no For conversion to a signed integer of N bits, the value is reduced\n  modulo 2^N to be within range of the type,\n\no The result of integer division of a negative value is truncated\n  towards zero, and\n\no The compiler provides a 64-bit integer type (a C99 requirement\n  which is supported by most C89 compilers).\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiph%2Fopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiph%2Fopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiph%2Fopus/lists"}