Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/opusPublic

Modern audio compression for the internet.

License

NotificationsYou must be signed in to change notification settings

xiph/opus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

== Opus audio codec ==Opus is a codec for interactive speech and audio transmission over the Internet.  Opus can handle a wide range of interactive audio applications, includingVoice over IP, videoconferencing, in-game  chat, and even remote live musicperformances. It can scale from low bit-rate narrowband speech to very highquality stereo music.  Opus, when coupled with an appropriate container format, is also suitablefor non-realtime  stored-file applications such as music distribution, gamesoundtracks, portable music players, jukeboxes, and other applications thathave historically used high latency formats such as MP3, AAC, or Vorbis.                    Opus is specified by IETF RFC 6716:https://tools.ietf.org/html/rfc6716  The Opus format and this implementation of it are subject to the royalty-free patent and copyright licenses specified in the file COPYING.This package implements a shared library for encoding and decoding raw Opusbitstreams. Raw Opus bitstreams should be used over RTP according tohttps://tools.ietf.org/html/rfc7587The package also includes a number of test tools used for testing thecorrect operation of the library. The bitstreams read/written by thesetools should not be used for Opus file distribution: They includeadditional debugging data and cannot support seeking.Opus stored in files should use the Ogg encapsulation for Opus which isdescribed at:https://tools.ietf.org/html/rfc7845An opus-tools package is available which provides encoding and decoding ofOgg encapsulated Opus files and includes a number of useful features.Opus-tools can be found at:https://gitlab.xiph.org/xiph/opus-tools.gitor on the main Opus website:https://opus-codec.org/== Deep Learning and Opus ==Lossy networks continue to be a challenge for real-time communications.While the original implementation of Opus provides an excellent packet lossconcealment mechanism, the team has continued to advance the methodology usedto improve audio quality in challenge network environments.In Opus 1.5, we added a deep learning based redundancy encoder that enhancesaudio in lossy networks by embedding one second of recovery data in the paddingdata of each packet. The underlying algorithm behind encoding and decoding therecovery data is called the deep redundancy (DRED) algorithm. By leveragingthe padding data within the packet, Opus 1.5 is fully backward compatible withprior revisions of Opus. Please see the README under the "dnn" subdirectory tounderstand DRED.DRED was developed by a team that Amazon Web Services initially sponsored,who open-sourced the implementation as well as began thestandardization process at the IETF:https://datatracker.ietf.org/doc/draft-ietf-mlcodec-opus-extension/The license behind Opus or the intellectual property position of Opus doesnot change with Opus 1.5.== Compiling libopus ==To build from a distribution tarball, you only need to do the following:    % ./configure    % makeTo build from the git repository, the following steps are necessary:0) Set up a development environment:On an Ubuntu or Debian family Linux distribution:    % sudo apt-get install git autoconf automake libtool gcc makeOn a Fedora/Redhat based Linux:    % sudo dnf install git autoconf automake libtool gcc makeOr for older Redhat/Centos Linux releases:    % sudo yum install git autoconf automake libtool gcc makeOn Apple macOS, install Xcode and brew.sh, then in the Terminal enter:    % brew install autoconf automake libtool1) Clone the repository:    % git clonehttps://gitlab.xiph.org/xiph/opus.git    % cd opus2) Compiling the source    % ./autogen.sh    % ./configure    % makeOn x86, it's a good idea to use a -march= option that allows the use of AVX2.3) Install the codec libraries (optional)    % sudo make installOnce you have compiled the codec, there will be a opus_demo executablein the top directory.Usage: opus_demo [-e] <application> <sampling rate (Hz)> <channels (1/2)>         <bits per second> [options] <input> <output>       opus_demo -d <sampling rate (Hz)> <channels (1/2)> [options]         <input> <output>mode: voip | audio | restricted-lowdelayoptions:  -e                : only runs the encoder (output the bit-stream)  -d                : only runs the decoder (reads the bit-stream as input)  -cbr              : enable constant bitrate; default: variable bitrate  -cvbr             : enable constrained variable bitrate; default:                      unconstrained  -bandwidth <NB|MB|WB|SWB|FB>                    : audio bandwidth (from narrowband to fullband);                      default: sampling rate  -framesize <2.5|5|10|20|40|60>                    : frame size in ms; default: 20  -max_payload <bytes>                    : maximum payload size in bytes, default: 1024  -complexity <comp>                    : complexity, 0 (lowest) ... 10 (highest); default: 10  -inbandfec        : enable SILK inband FEC  -forcemono        : force mono encoding, even for stereo input  -dtx              : enable SILK DTX  -loss <perc>      : simulate packet loss, in percent (0-100); default: 0input and output are little-endian signed 16-bit PCM files or opusbitstreams with simple opus_demo proprietary framing.== Testing ==This package includes a collection of automated unit and system testswhich SHOULD be run after compiling the package especially the firsttime it is run on a new platform.To run the integrated tests:    % make checkThere is also collection of standard test vectors which are notincluded in this package for size reasons but can be obtained from:https://opus-codec.org/docs/opus_testvectors-rfc8251.tar.gzTo run compare the code to these test vectors:    % curl -OLhttps://opus-codec.org/docs/opus_testvectors-rfc8251.tar.gz    % tar -zxf opus_testvectors-rfc8251.tar.gz    % ./tests/run_vectors.sh ./ opus_newvectors 48000== Compiling libopus for Windows and alternative build systems ==See cmake/README.md or meson/README.md.== Portability notes ==This implementation uses floating-point by default but can be compiled touse only fixed-point arithmetic by setting --enable-fixed-point (if usingautoconf) or by defining the FIXED_POINT macro (if building manually).The fixed point implementation has somewhat lower audio quality and isslower on platforms with fast FPUs, it is normally only used in embeddedenvironments.The implementation can be compiled with either a C89 or a C99 compiler.While it does not rely on any _undefined behavior_ as defined by C89 orC99, it relies on common _implementation-defined behavior_ for two'scomplement architectures:o Right shifts of negative values are consistent with two's  complement arithmetic, so that a>>b is equivalent to  floor(a/(2^b)),o For conversion to a signed integer of N bits, the value is reduced  modulo 2^N to be within range of the type,o The result of integer division of a negative value is truncated  towards zero, ando The compiler provides a 64-bit integer type (a C99 requirement  which is supported by most C89 compilers).

[8]ページ先頭

©2009-2025 Movatter.jp