opus编解码

本文档详细介绍了Opus 1.3.1编解码的步骤,包括安装依赖、源码编译、16k PCM文件的编码与解码,以及wav到opus的转换。注意,opus-1.3.1的编码不包含ogg封装,而opus-tools-0.2则提供了该功能。
摘要由CSDN通过智能技术生成
  1. 安装编译过程中的依赖包

     sudo apt-get install git autoconf automake libtool gcc make
    
  2. 下载opus官方源码

     地址:https://www.opus-codec.org/downloads/
    
     资源:opus-1.3.1.tar.gz   和      opus-tools-0.2.tar.gz
    
  3. 解压文件

              tar zxvf   opus-1.3.1.tar.gz
    
              tar zxvf   opus-tools-0.2.tar.gz
    
  4. 编译opus

      cd  opus-1.3.1
    
      ./configure
    
      make
    
      make    install
    
  5. 对16k 单声道 pcm文件进行16k opus编码

    ./opus_demo -e voip 16000 1 16000 ./test.pcm  ./b.opus
    
  6. 对opus文件进行pcm解码

           ./opus_demo -d 16000 1  b.opus b.pcm
    
  7. wav转opus(转换后的opus无法播放,不带ogg封装)

            ./opus_demo -e voip 16000 1 16000 ./你是谁.wav  ./test.opus
    

notes:
opus-1.3.1 编解码不带ogg封装
opus-tools-0.2 带ogg封装

.
.
.

opus-1.3.1/README文件

== 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, including
Voice over IP, videoconferencing, in-game  chat, and even remote live music
performances. It can scale from low bit-rate narrowband speech to very high
quality stereo music.

  Opus, when coupled with an appropriate container format, is also suitable
for non-realtime  stored-file applications such as music distribution, game
soundtracks, portable music players, jukeboxes, and other applications that
have 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 Opus
bitstreams. Raw Opus bitstreams should be used over RTP according to
 https://tools.ietf.org/html/rfc7587

The package also includes a number of test  tools used for testing the
correct operation of the library. The bitstreams read/written by these
tools should not be used for Opus file distribution: They include
additional debugging data a
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值